aptechka 0.62.3 → 0.62.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +25 -25
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +20 -20
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +15 -15
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +165 -165
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -13,21 +13,21 @@ var Fe = (u, n, e) => n in u ? Ye(u, n, { enumerable: !0, configurable: !0, writ
|
|
|
13
13
|
};
|
|
14
14
|
var ke = (u, n, e) => n.has(u) || Ne("Cannot " + e);
|
|
15
15
|
var t = (u, n, e) => (ke(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ne("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (ke(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), a = (u, n, e) => (ke(u, n, "access private method"), e);
|
|
16
|
-
var
|
|
17
|
-
var
|
|
16
|
+
var Ge = (u, n, e) => is(ts(u), e, n);
|
|
17
|
+
var Ue = (u, n, e) => new Promise((i, r) => {
|
|
18
18
|
var l = (g) => {
|
|
19
19
|
try {
|
|
20
20
|
S(e.next(g));
|
|
21
21
|
} catch (gt) {
|
|
22
22
|
r(gt);
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, m = (g) => {
|
|
25
25
|
try {
|
|
26
26
|
S(e.throw(g));
|
|
27
27
|
} catch (gt) {
|
|
28
28
|
r(gt);
|
|
29
29
|
}
|
|
30
|
-
}, S = (g) => g.done ? i(g.value) : Promise.resolve(g.value).then(l,
|
|
30
|
+
}, S = (g) => g.done ? i(g.value) : Promise.resolve(g.value).then(l, m);
|
|
31
31
|
S((e = e.apply(u, n)).next());
|
|
32
32
|
});
|
|
33
33
|
import { S as rs } from "../Store-swP_0ymB.js";
|
|
@@ -48,22 +48,22 @@ import { windowResizer as Bt } from "../window-resizer/index.js";
|
|
|
48
48
|
import { scrollEntries as yt } from "../scroll-entries/index.js";
|
|
49
49
|
import { cssUnitParser as Ke } from "../css-unit-parser/index.js";
|
|
50
50
|
import { CSSProperty as p } from "../css-property/index.js";
|
|
51
|
-
import { device as
|
|
51
|
+
import { device as bs } from "../device/index.js";
|
|
52
52
|
import { elementResizer as ae } from "../element-resizer/index.js";
|
|
53
|
-
import { s as
|
|
53
|
+
import { s as ms } from "../gestures-CcXV6fCp.js";
|
|
54
54
|
import { b as je } from "../dom-CVWzyXPH.js";
|
|
55
55
|
import { ScrollSegmentElement as Ss } from "../scroll-segment/index.js";
|
|
56
|
-
var f, Ft, y, ue, de, Ct,
|
|
56
|
+
var f, Ft, y, ue, de, Ct, B, et, wt, Et, oe;
|
|
57
57
|
class gs {
|
|
58
58
|
constructor(n, e, i) {
|
|
59
|
-
s(this,
|
|
59
|
+
s(this, Et);
|
|
60
60
|
s(this, f);
|
|
61
61
|
s(this, Ft);
|
|
62
62
|
s(this, y);
|
|
63
63
|
s(this, ue, 0);
|
|
64
64
|
s(this, de, 0);
|
|
65
65
|
s(this, Ct, 0);
|
|
66
|
-
s(this,
|
|
66
|
+
s(this, B, 0);
|
|
67
67
|
s(this, et, null);
|
|
68
68
|
s(this, wt, 0);
|
|
69
69
|
h(this, f, n), h(this, Ft, e), h(this, y, i), yt.register(t(this, f)), this.setIndex(t(this, Ft));
|
|
@@ -84,7 +84,7 @@ class gs {
|
|
|
84
84
|
return t(this, de);
|
|
85
85
|
}
|
|
86
86
|
get position() {
|
|
87
|
-
return t(this,
|
|
87
|
+
return t(this, B);
|
|
88
88
|
}
|
|
89
89
|
get transformPosition() {
|
|
90
90
|
return t(this, wt);
|
|
@@ -99,18 +99,18 @@ class gs {
|
|
|
99
99
|
n ? (t(this, f).style.setProperty("--size", n + "px"), t(this, y).axisCSSProperty.current === "x" ? (t(this, f).style.width = n + "px", t(this, f).style.height = "") : (t(this, f).style.height = n + "px", t(this, f).style.width = "")) : (t(this, f).style.width = "", t(this, f).style.height = "", t(this, f).style.removeProperty("--size"));
|
|
100
100
|
}
|
|
101
101
|
resize() {
|
|
102
|
-
h(this, ue, t(this, f).offsetWidth), h(this, de, t(this, f).offsetHeight), h(this, Ct, t(this, y).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this,
|
|
102
|
+
h(this, ue, t(this, f).offsetWidth), h(this, de, t(this, f).offsetHeight), h(this, Ct, t(this, y).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this, B, t(this, y).vertical ? Ae(t(this, f)) : Me(t(this, f))), h(this, B, t(this, B) - t(this, y).contentPosition);
|
|
103
103
|
}
|
|
104
104
|
transform() {
|
|
105
105
|
const n = t(this, y).shiftSectionPositionCSSProperty.current;
|
|
106
106
|
let e = n;
|
|
107
107
|
const i = t(this, y).viewportSize * t(this, y).sectionDistanceScaleCSSProperty.current;
|
|
108
|
-
t(this, y).loopCSSProperty.current && t(this,
|
|
108
|
+
t(this, y).loopCSSProperty.current && t(this, B) + t(this, Ct) <= t(this, y).currentScrollValue - n / 2 && (e = (t(this, y).distance - n) * -1 - t(this, y).gap), yt.update(
|
|
109
109
|
t(this, f),
|
|
110
110
|
t(this, y).axisCSSProperty.current,
|
|
111
111
|
e
|
|
112
112
|
);
|
|
113
|
-
const r = t(this, y).currentScrollValue + e, l = t(this,
|
|
113
|
+
const r = t(this, y).currentScrollValue + e, l = t(this, B) - t(this, y).viewportSize - i, m = t(this, B) + t(this, Ct) + i, S = hs(_e(r, l, m), 3);
|
|
114
114
|
h(this, wt, S * -1), t(this, y).vertical ? t(this, f).style.transform = `translate3d(0px, ${t(this, wt)}px, 0px)` : t(this, f).style.transform = `translate3d(${t(this, wt)}px, 0px, 0px)`;
|
|
115
115
|
}
|
|
116
116
|
setMark(n) {
|
|
@@ -126,19 +126,19 @@ class gs {
|
|
|
126
126
|
t(this, f).classList.toggle("middle", n);
|
|
127
127
|
}
|
|
128
128
|
setIndex(n) {
|
|
129
|
-
a(this,
|
|
129
|
+
a(this, Et, oe).call(this, "index", n);
|
|
130
130
|
}
|
|
131
131
|
setCurrentIndex(n) {
|
|
132
|
-
a(this,
|
|
132
|
+
a(this, Et, oe).call(this, "current-index", n);
|
|
133
133
|
}
|
|
134
134
|
setCurrentIndexArc(n) {
|
|
135
|
-
a(this,
|
|
135
|
+
a(this, Et, oe).call(this, "current-index-arc", n);
|
|
136
136
|
}
|
|
137
137
|
setCurrentIndexArcAbs(n) {
|
|
138
|
-
a(this,
|
|
138
|
+
a(this, Et, oe).call(this, "current-index-arc-abs", n);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
f = new WeakMap(), Ft = new WeakMap(), y = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), Ct = new WeakMap(),
|
|
141
|
+
f = new WeakMap(), Ft = new WeakMap(), y = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), Ct = new WeakMap(), B = new WeakMap(), et = new WeakMap(), wt = new WeakMap(), Et = new WeakSet(), oe = function(n, e) {
|
|
142
142
|
e !== null ? (t(this, f).style.setProperty(`--${n}`, e.toString()), t(this, f).setAttribute(`data-${n}`, e.toString())) : (t(this, f).style.removeProperty(`--${n}`), t(this, f).removeAttribute(`data-${n}`));
|
|
143
143
|
};
|
|
144
144
|
const vs = Ze({
|
|
@@ -180,20 +180,20 @@ const vs = Ze({
|
|
|
180
180
|
flexShrink: "0"
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var d,
|
|
183
|
+
var d, xt, P, st, W, F, N, D, it, rt, q, nt, Pt, R, w, Lt, zt, kt, It, Nt, At, A, Mt, ht, M, ot, G, Tt, lt, Dt, ct, at, ut, b, qt, c, pe, fe, C, v, I, V, dt, O, x, L, Gt, U, K, Z, _, Ut, pt, j, Rt, H, E, Kt, J, Vt, Zt, o, De, le, $t, Pe, Le, Re, Ve, z, be, Je, _t, me, Oe, He, vt, Qe, Se, ce, ge;
|
|
184
184
|
class Wt extends HTMLElement {
|
|
185
185
|
constructor() {
|
|
186
186
|
super();
|
|
187
187
|
s(this, o);
|
|
188
188
|
s(this, d, null);
|
|
189
|
-
s(this,
|
|
189
|
+
s(this, xt, new p(this, "--controls", !0));
|
|
190
190
|
s(this, P, new p(this, "--axis", "y"));
|
|
191
191
|
s(this, st, new p(this, "--reverse", !1));
|
|
192
|
-
s(this,
|
|
193
|
-
s(this,
|
|
192
|
+
s(this, W, new p(this, "--direction", 0));
|
|
193
|
+
s(this, F, new p(this, "--pages", 0, {
|
|
194
194
|
validate: (e) => Math.max(0, e - 1)
|
|
195
195
|
}));
|
|
196
|
-
s(this,
|
|
196
|
+
s(this, N, new p(this, "--split", !1));
|
|
197
197
|
s(this, D, new p(this, "--sectional", !1));
|
|
198
198
|
s(this, it, new p(
|
|
199
199
|
this,
|
|
@@ -205,7 +205,7 @@ class Wt extends HTMLElement {
|
|
|
205
205
|
"--tween-duration",
|
|
206
206
|
!1
|
|
207
207
|
));
|
|
208
|
-
s(this,
|
|
208
|
+
s(this, q, new p(this, "--auto-size", !1));
|
|
209
209
|
s(this, nt, new p(
|
|
210
210
|
this,
|
|
211
211
|
"--wheel-max-delta",
|
|
@@ -245,7 +245,7 @@ class Wt extends HTMLElement {
|
|
|
245
245
|
"--current-index-start-offset",
|
|
246
246
|
0
|
|
247
247
|
));
|
|
248
|
-
s(this,
|
|
248
|
+
s(this, G, new p(
|
|
249
249
|
this,
|
|
250
250
|
"--current-index-end-offset",
|
|
251
251
|
0
|
|
@@ -265,7 +265,7 @@ class Wt extends HTMLElement {
|
|
|
265
265
|
s(this, ct, new p(this, "--disabled", !1));
|
|
266
266
|
s(this, at, new p(this, "--hibernate", !1));
|
|
267
267
|
s(this, ut, null);
|
|
268
|
-
s(this,
|
|
268
|
+
s(this, b, null);
|
|
269
269
|
s(this, qt, null);
|
|
270
270
|
s(this, c, []);
|
|
271
271
|
s(this, pe, 0);
|
|
@@ -276,21 +276,21 @@ class Wt extends HTMLElement {
|
|
|
276
276
|
s(this, V, null);
|
|
277
277
|
s(this, dt, null);
|
|
278
278
|
s(this, O, null);
|
|
279
|
-
s(this,
|
|
279
|
+
s(this, x, null);
|
|
280
280
|
s(this, L, new rs(0));
|
|
281
|
-
s(this,
|
|
281
|
+
s(this, Gt, 0);
|
|
282
282
|
s(this, U, 0);
|
|
283
|
-
s(this,
|
|
284
|
-
s(this, K, !0);
|
|
283
|
+
s(this, K, !1);
|
|
285
284
|
s(this, Z, !0);
|
|
286
|
-
s(this,
|
|
285
|
+
s(this, _, !0);
|
|
286
|
+
s(this, Ut);
|
|
287
287
|
s(this, pt);
|
|
288
|
-
s(this,
|
|
288
|
+
s(this, j, new as());
|
|
289
289
|
s(this, Rt, !1);
|
|
290
290
|
s(this, H, null);
|
|
291
|
-
s(this,
|
|
291
|
+
s(this, E, !1);
|
|
292
292
|
s(this, Kt, null);
|
|
293
|
-
s(this,
|
|
293
|
+
s(this, J, []);
|
|
294
294
|
s(this, Vt, !1);
|
|
295
295
|
s(this, Zt);
|
|
296
296
|
s(this, z, (e) => {
|
|
@@ -300,16 +300,16 @@ class Wt extends HTMLElement {
|
|
|
300
300
|
}
|
|
301
301
|
this.resize();
|
|
302
302
|
});
|
|
303
|
-
s(this,
|
|
304
|
-
if (!t(this,
|
|
303
|
+
s(this, be, () => {
|
|
304
|
+
if (!t(this, K) || t(this, _) || t(this, Z))
|
|
305
305
|
return;
|
|
306
306
|
const e = this.currentScrollValue;
|
|
307
|
-
if (h(this,
|
|
307
|
+
if (h(this, Gt, Math.max(0, e - t(this, v))), t(this, c).length) {
|
|
308
308
|
for (let i = 0; i < t(this, c).length; i++)
|
|
309
309
|
t(this, c)[i].transform();
|
|
310
310
|
t(this, L).current = a(this, o, ce).call(this);
|
|
311
311
|
} else
|
|
312
|
-
this.vertical ? t(this,
|
|
312
|
+
this.vertical ? t(this, b).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
313
313
|
a(this, o, Qe).call(this), yt.update(
|
|
314
314
|
this,
|
|
315
315
|
t(this, P).current,
|
|
@@ -317,16 +317,16 @@ class Wt extends HTMLElement {
|
|
|
317
317
|
);
|
|
318
318
|
});
|
|
319
319
|
s(this, _t, (e, i) => {
|
|
320
|
-
t(this,
|
|
320
|
+
t(this, xt).current && (a(this, o, Oe).call(this, Math.sign(i) || 1), t(this, me).call(this, e, i));
|
|
321
321
|
});
|
|
322
|
-
s(this,
|
|
323
|
-
if (t(this,
|
|
324
|
-
if (t(this,
|
|
322
|
+
s(this, me, (e, i) => {
|
|
323
|
+
if (t(this, W).current) {
|
|
324
|
+
if (t(this, W).current < 0 && i > 0)
|
|
325
325
|
return;
|
|
326
|
-
if (t(this,
|
|
326
|
+
if (t(this, W).current > 0 && i < 0)
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
if (t(this, pt) || t(this,
|
|
329
|
+
if (t(this, pt) || t(this, j).unlistenAnimationFrame(), !t(this, A).current && t(this, lt).current && (clearInterval(t(this, Ut)), h(this, Ut, setTimeout(() => {
|
|
330
330
|
const r = t(this, c)[a(this, o, ce).call(this)];
|
|
331
331
|
r && this.scrollToSection(r.index, {
|
|
332
332
|
tween: {
|
|
@@ -334,7 +334,7 @@ class Wt extends HTMLElement {
|
|
|
334
334
|
easing: ns
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
|
-
}, t(this, lt).current))), !(e.includes("drag") && !
|
|
337
|
+
}, t(this, lt).current))), !(e.includes("drag") && !bs.isTouch && !t(this, It).current)) {
|
|
338
338
|
if (t(this, D).current && e !== "drag") {
|
|
339
339
|
const r = Math.sign(i);
|
|
340
340
|
if (t(this, c).length) {
|
|
@@ -353,7 +353,7 @@ class Wt extends HTMLElement {
|
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
355
|
s(this, Se, Ie(() => {
|
|
356
|
-
const e = t(this,
|
|
356
|
+
const e = t(this, J).reduce((i, r) => {
|
|
357
357
|
const l = this.vertical ? r.width : r.height;
|
|
358
358
|
return l > i ? l : i;
|
|
359
359
|
}, 0);
|
|
@@ -362,13 +362,13 @@ class Wt extends HTMLElement {
|
|
|
362
362
|
}, 10));
|
|
363
363
|
}, 20));
|
|
364
364
|
s(this, ge, () => {
|
|
365
|
-
h(this,
|
|
365
|
+
h(this, E, !0), this.hibernatedCSSProperty.current || a(this, o, Ve).call(this);
|
|
366
366
|
});
|
|
367
367
|
if (T) {
|
|
368
368
|
const e = this.attachShadow({ mode: "open" });
|
|
369
369
|
e.adoptedStyleSheets = [vs];
|
|
370
370
|
const i = document.createElement("div");
|
|
371
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this,
|
|
371
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this, b, document.createElement("div")), t(this, b).className = "content", h(this, qt, document.createElement("slot")), t(this, b).appendChild(t(this, qt)), t(this, ut).appendChild(t(this, b)), e.appendChild(t(this, ut)), h(this, Kt, new MutationObserver(
|
|
372
372
|
Ie(() => {
|
|
373
373
|
this.tryResplit();
|
|
374
374
|
}, 10)
|
|
@@ -379,7 +379,7 @@ class Wt extends HTMLElement {
|
|
|
379
379
|
return t(this, d);
|
|
380
380
|
}
|
|
381
381
|
get controlsCSSProperty() {
|
|
382
|
-
return t(this,
|
|
382
|
+
return t(this, xt);
|
|
383
383
|
}
|
|
384
384
|
get axisCSSProperty() {
|
|
385
385
|
return t(this, P);
|
|
@@ -388,13 +388,13 @@ class Wt extends HTMLElement {
|
|
|
388
388
|
return t(this, st);
|
|
389
389
|
}
|
|
390
390
|
get directionCSSProperty() {
|
|
391
|
-
return t(this,
|
|
391
|
+
return t(this, W);
|
|
392
392
|
}
|
|
393
393
|
get pagesCSSProperty() {
|
|
394
|
-
return t(this,
|
|
394
|
+
return t(this, F);
|
|
395
395
|
}
|
|
396
396
|
get splitCSSProperty() {
|
|
397
|
-
return t(this,
|
|
397
|
+
return t(this, N);
|
|
398
398
|
}
|
|
399
399
|
get sectionalCSSProperty() {
|
|
400
400
|
return t(this, D);
|
|
@@ -406,7 +406,7 @@ class Wt extends HTMLElement {
|
|
|
406
406
|
return t(this, rt);
|
|
407
407
|
}
|
|
408
408
|
get autoSizeCSSProperty() {
|
|
409
|
-
return t(this,
|
|
409
|
+
return t(this, q);
|
|
410
410
|
}
|
|
411
411
|
get wheelMaxDeltaCSSProperty() {
|
|
412
412
|
return t(this, nt);
|
|
@@ -454,7 +454,7 @@ class Wt extends HTMLElement {
|
|
|
454
454
|
return t(this, ot);
|
|
455
455
|
}
|
|
456
456
|
get currentIndexEndOffsetCSSProperty() {
|
|
457
|
-
return t(this,
|
|
457
|
+
return t(this, G);
|
|
458
458
|
}
|
|
459
459
|
get shiftSectionPositionCSSProperty() {
|
|
460
460
|
return t(this, Tt);
|
|
@@ -481,7 +481,7 @@ class Wt extends HTMLElement {
|
|
|
481
481
|
return t(this, ut);
|
|
482
482
|
}
|
|
483
483
|
get contentElement() {
|
|
484
|
-
return t(this,
|
|
484
|
+
return t(this, b);
|
|
485
485
|
}
|
|
486
486
|
get sections() {
|
|
487
487
|
return t(this, c);
|
|
@@ -516,10 +516,10 @@ class Wt extends HTMLElement {
|
|
|
516
516
|
return t(this, w).current ? t(this, U) + t(this, I) : t(this, U);
|
|
517
517
|
}
|
|
518
518
|
get hasOverflow() {
|
|
519
|
-
return t(this,
|
|
519
|
+
return t(this, K);
|
|
520
520
|
}
|
|
521
521
|
get overscroll() {
|
|
522
|
-
return t(this,
|
|
522
|
+
return t(this, Gt);
|
|
523
523
|
}
|
|
524
524
|
get scrollLine() {
|
|
525
525
|
return t(this, H);
|
|
@@ -540,7 +540,7 @@ class Wt extends HTMLElement {
|
|
|
540
540
|
return t(this, P).current === "x" ? 0 : t(this, d).distance;
|
|
541
541
|
}
|
|
542
542
|
tryResplit() {
|
|
543
|
-
!t(this,
|
|
543
|
+
!t(this, _) && (t(this, w).current || t(this, N).current || t(this, w).current || t(this, q).current || t(this, D).current) && a(this, o, le).call(this);
|
|
544
544
|
}
|
|
545
545
|
onScroll(...e) {
|
|
546
546
|
return t(this, d).subscribe(...e);
|
|
@@ -550,32 +550,32 @@ class Wt extends HTMLElement {
|
|
|
550
550
|
}
|
|
551
551
|
//https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
|
|
552
552
|
range(e, i, r = 0) {
|
|
553
|
-
const l = e - r,
|
|
554
|
-
return this.currentProgress < l ? 0 : this.currentProgress >
|
|
553
|
+
const l = e - r, m = l + i + r * 2;
|
|
554
|
+
return this.currentProgress < l ? 0 : this.currentProgress > m ? 1 : (this.currentProgress - l) / (m - l);
|
|
555
555
|
}
|
|
556
556
|
curve(e, i, r = 0) {
|
|
557
557
|
return Math.sin(this.range(e, i, r) * Math.PI);
|
|
558
558
|
}
|
|
559
559
|
visible(e, i, r = 0) {
|
|
560
|
-
const l = e - r,
|
|
561
|
-
return this.currentProgress >= l && this.currentProgress <=
|
|
560
|
+
const l = e - r, m = l + i + r * 2;
|
|
561
|
+
return this.currentProgress >= l && this.currentProgress <= m;
|
|
562
562
|
}
|
|
563
563
|
scrollToSection(e, i) {
|
|
564
564
|
if (!t(this, c).length)
|
|
565
565
|
return;
|
|
566
|
-
const r = t(this, L).current, l = a(this, o, Je).call(this, e),
|
|
567
|
-
if (
|
|
566
|
+
const r = t(this, L).current, l = a(this, o, Je).call(this, e), m = t(this, c)[r], S = t(this, c)[l];
|
|
567
|
+
if (m && S) {
|
|
568
568
|
let g = 0;
|
|
569
569
|
const gt = a(this, o, ce).call(this), Ht = t(this, c)[gt];
|
|
570
570
|
let ne = Ht ? this.targetScrollValue - Ht.position : 0;
|
|
571
|
-
t(this, w).current ? l === 0 && r === t(this, c).length - 1 ? (g = t(this, v) + t(this, C) -
|
|
571
|
+
t(this, w).current ? l === 0 && r === t(this, c).length - 1 ? (g = t(this, v) + t(this, C) - m.position + t(this, I), t(this, Rt) || (ne = 0)) : l === t(this, c).length - 1 && r === 0 ? g = S.position - (t(this, v) + t(this, C) + t(this, I)) : g = S.position - m.position : g = S.position - m.position, this.shiftPosition(g - ne, i);
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
shiftSections(e, i) {
|
|
575
575
|
t(this, c).length && this.scrollToSection(t(this, L).current + e, i);
|
|
576
576
|
}
|
|
577
577
|
setPosition(e, i) {
|
|
578
|
-
a(this, o, Oe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, pt) || (t(this,
|
|
578
|
+
a(this, o, Oe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, pt) || (t(this, j).set(t(this, d).current, { equalize: !0 }), t(this, j).set(e, qe({}, i.tween)), h(this, pt, setTimeout(() => {
|
|
579
579
|
h(this, pt, void 0);
|
|
580
580
|
}, i.tween.duration || 0))) : t(this, d).set(e, {
|
|
581
581
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
@@ -589,14 +589,14 @@ class Wt extends HTMLElement {
|
|
|
589
589
|
return;
|
|
590
590
|
t(this, d).unlistenAnimationFrame();
|
|
591
591
|
const e = this.currentScrollValue / t(this, v) || 0, i = t(this, L).current;
|
|
592
|
-
if (h(this, pe, this.vertical ? Ae(this) : Me(this)), h(this, fe, this.vertical ? Ae(t(this,
|
|
593
|
-
getComputedStyle(t(this,
|
|
592
|
+
if (h(this, pe, this.vertical ? Ae(this) : Me(this)), h(this, fe, this.vertical ? Ae(t(this, b)) : Me(t(this, b))), h(this, C, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Ke.parse(
|
|
593
|
+
getComputedStyle(t(this, b)).rowGap
|
|
594
594
|
)) : h(this, I, Ke.parse(
|
|
595
|
-
getComputedStyle(t(this,
|
|
596
|
-
)), t(this,
|
|
595
|
+
getComputedStyle(t(this, b)).columnGap
|
|
596
|
+
)), t(this, q).current && t(this, c).length) {
|
|
597
597
|
const r = t(this, R).current, l = (t(this, C) - t(this, I) * (r - 1)) / r;
|
|
598
|
-
t(this, c).forEach((
|
|
599
|
-
|
|
598
|
+
t(this, c).forEach((m) => {
|
|
599
|
+
m.setSize(l);
|
|
600
600
|
});
|
|
601
601
|
} else
|
|
602
602
|
t(this, c).forEach((r) => {
|
|
@@ -604,19 +604,19 @@ class Wt extends HTMLElement {
|
|
|
604
604
|
});
|
|
605
605
|
if (t(this, c).forEach((r) => {
|
|
606
606
|
r.resize();
|
|
607
|
-
}), t(this,
|
|
608
|
-
h(this, v, t(this, C) * t(this,
|
|
607
|
+
}), t(this, F).current) {
|
|
608
|
+
h(this, v, t(this, C) * t(this, F).current);
|
|
609
609
|
const r = t(this, v) + t(this, C);
|
|
610
|
-
this.vertical ? (t(this,
|
|
610
|
+
this.vertical ? (t(this, b).style.width = r + "px", t(this, b).style.height = "100%") : (t(this, b).style.height = r + "px", t(this, b).style.width = "100%");
|
|
611
611
|
} else
|
|
612
|
-
this.vertical ? (t(this,
|
|
612
|
+
this.vertical ? (t(this, b).style.width = "100%", t(this, b).style.height = "max-content", h(this, v, t(this, b).offsetHeight - t(this, C))) : (t(this, b).style.width = "max-content", t(this, b).style.height = "100%", h(this, v, t(this, b).offsetWidth - t(this, C)));
|
|
613
613
|
if (!t(this, w).current) {
|
|
614
614
|
const r = getComputedStyle(this), l = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
615
615
|
h(this, v, t(this, v) + l), t(this, d).max = t(this, v);
|
|
616
616
|
}
|
|
617
617
|
if (t(this, w).current && t(this, c).length) {
|
|
618
|
-
const r = t(this, c)[t(this, c).length - 1], l = r.position + r.size - t(this, C),
|
|
619
|
-
h(this, U, r.position + r.size +
|
|
618
|
+
const r = t(this, c)[t(this, c).length - 1], l = r.position + r.size - t(this, C), m = t(this, v) - l;
|
|
619
|
+
h(this, U, r.position + r.size + m);
|
|
620
620
|
} else
|
|
621
621
|
h(this, U, t(this, v));
|
|
622
622
|
if (t(this, D).current && t(this, c).length) {
|
|
@@ -628,23 +628,23 @@ class Wt extends HTMLElement {
|
|
|
628
628
|
t(this, d).set(e * t(this, v), {
|
|
629
629
|
equalize: !0
|
|
630
630
|
});
|
|
631
|
-
h(this,
|
|
631
|
+
h(this, K, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, C)), this.classList.toggle("has-overflow", t(this, K)), t(this, K) ? t(this, ct).current || a(this, o, Le).call(this) : a(this, o, Pe).call(this), t(this, Se).call(this), he(this, "scrollResize", { custom: !0 }), t(this, d).notify();
|
|
632
632
|
}
|
|
633
633
|
connectedCallback() {
|
|
634
634
|
yt.register(this), h(this, d, new cs(0, {
|
|
635
635
|
damping: 0.01,
|
|
636
636
|
min: 0,
|
|
637
637
|
order: ls.SCROLL
|
|
638
|
-
})), this.setAttribute("tabindex", "0"), h(this, V, new us({ element: t(this,
|
|
638
|
+
})), this.setAttribute("tabindex", "0"), h(this, V, new us({ element: t(this, b) })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, dt, new ds({
|
|
639
639
|
element: this
|
|
640
640
|
})), t(this, dt).changeEvent.subscribe(
|
|
641
641
|
t(this, _t)
|
|
642
642
|
), h(this, O, new ps({
|
|
643
|
-
element: t(this,
|
|
643
|
+
element: t(this, b),
|
|
644
644
|
rootElement: this
|
|
645
|
-
})), t(this, O).changeEvent.subscribe(t(this, _t)), h(this,
|
|
645
|
+
})), t(this, O).changeEvent.subscribe(t(this, _t)), h(this, x, new fs({
|
|
646
646
|
culling: this
|
|
647
|
-
})), t(this,
|
|
647
|
+
})), t(this, x).changeEvent.subscribe(t(this, me)), t(this, P).subscribe(() => {
|
|
648
648
|
a(this, o, De).call(this);
|
|
649
649
|
}), t(this, st).subscribe(() => {
|
|
650
650
|
a(this, o, De).call(this);
|
|
@@ -652,18 +652,18 @@ class Wt extends HTMLElement {
|
|
|
652
652
|
t(this, V).axis = e.current ? "max" : t(this, P).current;
|
|
653
653
|
}), t(this, Pt).subscribe((e) => {
|
|
654
654
|
t(this, O).inertion = typeof e.current == "number" ? e.current : 1;
|
|
655
|
-
}), t(this,
|
|
656
|
-
t(this,
|
|
657
|
-
}), t(this,
|
|
658
|
-
t(this,
|
|
655
|
+
}), t(this, F).subscribe(() => {
|
|
656
|
+
t(this, E) && t(this, z).call(this);
|
|
657
|
+
}), t(this, N).subscribe(({ current: e }) => {
|
|
658
|
+
t(this, E) && (e ? a(this, o, le).call(this) : a(this, o, $t).call(this));
|
|
659
659
|
}), t(this, D).subscribe((e) => {
|
|
660
|
-
t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this,
|
|
661
|
-
}), t(this,
|
|
662
|
-
t(this,
|
|
660
|
+
t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, x).interval = e.current, t(this, E) && (e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
|
|
661
|
+
}), t(this, q).subscribe((e) => {
|
|
662
|
+
t(this, E) && (t(this, z).call(this), e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
|
|
663
663
|
}), t(this, R).subscribe((e) => {
|
|
664
|
-
t(this,
|
|
664
|
+
t(this, E) && (t(this, z).call(this), a(this, o, vt).call(this));
|
|
665
665
|
}), t(this, w).subscribe((e) => {
|
|
666
|
-
e.current ? (t(this,
|
|
666
|
+
e.current ? (t(this, E) && (t(this, c).length || (t(this, N).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Gt, 0), t(this, d).max = t(this, v), t(this, d).min = 0);
|
|
667
667
|
}), t(this, Lt).subscribe((e) => {
|
|
668
668
|
t(this, d).damping = e.current;
|
|
669
669
|
}), t(this, zt).subscribe((e) => {
|
|
@@ -671,40 +671,40 @@ class Wt extends HTMLElement {
|
|
|
671
671
|
}), t(this, kt).subscribe((e) => {
|
|
672
672
|
t(this, d).stiffness = e.current;
|
|
673
673
|
}), t(this, A).subscribe((e) => {
|
|
674
|
-
t(this,
|
|
674
|
+
t(this, x).speed = e.current, !t(this, Z) && e.current && !e.previous ? t(this, x).connect() : !e.current && e.previous && t(this, x).disconnect();
|
|
675
675
|
}), t(this, ht).subscribe((e) => {
|
|
676
|
-
e.current || (t(this,
|
|
676
|
+
e.current || (t(this, x).direction = 1);
|
|
677
677
|
}), t(this, M).subscribe((e) => {
|
|
678
|
-
t(this,
|
|
678
|
+
t(this, E) && a(this, o, vt).call(this);
|
|
679
679
|
}), t(this, ot).subscribe((e) => {
|
|
680
|
-
t(this,
|
|
681
|
-
}), t(this,
|
|
682
|
-
t(this,
|
|
680
|
+
t(this, E) && t(this, M).current && a(this, o, vt).call(this);
|
|
681
|
+
}), t(this, G).subscribe((e) => {
|
|
682
|
+
t(this, E) && t(this, M).current && a(this, o, vt).call(this);
|
|
683
683
|
}), t(this, Tt).subscribe((e) => {
|
|
684
|
-
t(this,
|
|
684
|
+
t(this, E) && t(this, d).notify();
|
|
685
685
|
}), t(this, d).isRunning.subscribe((e) => {
|
|
686
686
|
this.classList.toggle("active", e.current);
|
|
687
687
|
}), t(this, L).subscribe((e) => {
|
|
688
688
|
t(this, c).length && a(this, o, vt).call(this), this.style.setProperty("--counter", e.current + "");
|
|
689
|
-
}), t(this,
|
|
690
|
-
t(this,
|
|
689
|
+
}), t(this, j).subscribe((e) => {
|
|
690
|
+
t(this, j).isRunning.current && t(this, d).set(e.current, { equalize: !0 });
|
|
691
691
|
}), t(this, ct).subscribe((e) => {
|
|
692
692
|
e.current && !e.previous ? (this.classList.add("disabled"), a(this, o, Pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), a(this, o, Le).call(this));
|
|
693
693
|
}), t(this, at).subscribe((e) => {
|
|
694
694
|
e.current && !e.previous ? (this.classList.add("hibernated"), a(this, o, Re).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), a(this, o, Ve).call(this));
|
|
695
|
-
}), t(this,
|
|
695
|
+
}), t(this, xt).observe(), t(this, P).observe(), t(this, st).observe(), t(this, W).observe(), t(this, F).observe(), t(this, N).observe(), t(this, D).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, Pt).observe(), t(this, R).observe(), t(this, w).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, kt).observe(), t(this, It).observe(), t(this, Nt).observe(), t(this, At).observe(), t(this, A).observe(), t(this, A).observe(), t(this, Mt).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, G).observe(), t(this, Tt).observe(), t(this, lt).observe(), t(this, Dt).observe(), t(this, ct).observe(), t(this, at).observe(), Bt.subscribe(t(this, ge), Te.LAST), ae.subscribe(this, t(this, z)), t(this, Kt).observe(this, { childList: !0 });
|
|
696
696
|
}
|
|
697
697
|
disconnectedCallback() {
|
|
698
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this,
|
|
698
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, xt).unobserve(), t(this, P).unobserve(), t(this, st).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, N).unobserve(), t(this, D).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, Pt).unobserve(), t(this, R).unobserve(), t(this, w).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, kt).unobserve(), t(this, It).unobserve(), t(this, Nt).unobserve(), t(this, At).unobserve(), t(this, A).unobserve(), t(this, Mt).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, G).unobserve(), t(this, Tt).unobserve(), t(this, lt).unobserve(), t(this, Dt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Bt.unsubscribe(t(this, ge)), ae.unsubscribe(t(this, z)), a(this, o, Re).call(this), t(this, Kt).disconnect();
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
d = new WeakMap(),
|
|
701
|
+
d = new WeakMap(), xt = new WeakMap(), P = new WeakMap(), st = new WeakMap(), W = new WeakMap(), F = new WeakMap(), N = new WeakMap(), D = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Pt = new WeakMap(), R = new WeakMap(), w = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), A = new WeakMap(), Mt = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(), lt = new WeakMap(), Dt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), b = new WeakMap(), qt = new WeakMap(), c = new WeakMap(), pe = new WeakMap(), fe = new WeakMap(), C = new WeakMap(), v = new WeakMap(), I = new WeakMap(), V = new WeakMap(), dt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), L = new WeakMap(), Gt = new WeakMap(), U = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _ = new WeakMap(), Ut = new WeakMap(), pt = new WeakMap(), j = new WeakMap(), Rt = new WeakMap(), H = new WeakMap(), E = new WeakMap(), Kt = new WeakMap(), J = new WeakMap(), Vt = new WeakMap(), Zt = new WeakMap(), o = new WeakSet(), De = function() {
|
|
702
702
|
const e = t(this, P).current, i = t(this, st).current ? "-reverse" : "";
|
|
703
|
-
t(this,
|
|
703
|
+
t(this, b).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, z).call(this);
|
|
704
704
|
}, le = function() {
|
|
705
705
|
a(this, o, $t).call(this), t(this, qt).assignedElements().forEach((e, i) => {
|
|
706
706
|
e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, c).push(new gs(e, i, this));
|
|
707
|
-
}), t(this,
|
|
707
|
+
}), t(this, b).style.transform = "", this.style.setProperty("--sections", t(this, c).length.toString()), he(this, "scrollSectionsChange", {
|
|
708
708
|
custom: !0,
|
|
709
709
|
composed: !0
|
|
710
710
|
}), t(this, z).call(this), a(this, o, vt).call(this);
|
|
@@ -716,22 +716,22 @@ d = new WeakMap(), Et = new WeakMap(), P = new WeakMap(), st = new WeakMap(), B
|
|
|
716
716
|
composed: !0
|
|
717
717
|
});
|
|
718
718
|
}, Pe = function() {
|
|
719
|
-
t(this,
|
|
719
|
+
t(this, Z) || (h(this, Z, !0), t(this, d).unsubscribe(t(this, be)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Ut)), clearInterval(t(this, pt)), t(this, j).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, dt).disconnect(), t(this, O).disconnect(), t(this, x).disconnect(), t(this, K) || (this.sections.forEach((e) => {
|
|
720
720
|
e.unsetTransform();
|
|
721
721
|
}), t(this, z).call(this)));
|
|
722
722
|
}, Le = function() {
|
|
723
|
-
t(this,
|
|
723
|
+
t(this, Z) && (h(this, Z, !1), t(this, d).subscribe(t(this, be), -1e4), t(this, d).notify(), t(this, V).connect(), t(this, dt).connect(), t(this, O).connect(), t(this, A).current && t(this, x).connect());
|
|
724
724
|
}, Re = function() {
|
|
725
|
-
t(this,
|
|
725
|
+
t(this, _) || (h(this, _, !0), clearTimeout(t(this, Zt)), Bt.unsubscribe(t(this, z)), a(this, o, Pe).call(this), t(this, b).style.transform = "", t(this, b).style.height = "", t(this, b).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, c).length ? a(this, o, $t).call(this) : (t(this, L).reset(), t(this, d).reset()), yt.unregister(this));
|
|
726
726
|
}, Ve = function() {
|
|
727
|
-
t(this,
|
|
727
|
+
t(this, _) && (h(this, _, !1), yt.register(this), this.tryResplit(), a(this, o, Le).call(this), this.scrollToSection(t(this, At).current, {
|
|
728
728
|
behaviour: "instant"
|
|
729
729
|
}), Bt.subscribe(t(this, z), Te.SCROLL));
|
|
730
|
-
}, z = new WeakMap(),
|
|
730
|
+
}, z = new WeakMap(), be = new WeakMap(), Je = function(e) {
|
|
731
731
|
let i = t(this, L).current;
|
|
732
732
|
return t(this, w).current ? i = os(e, t(this, c).length) : i = _e(e, 0, this.limit), i;
|
|
733
|
-
}, _t = new WeakMap(),
|
|
734
|
-
t(this, ht).current && (t(this,
|
|
733
|
+
}, _t = new WeakMap(), me = new WeakMap(), Oe = function(e = 1) {
|
|
734
|
+
t(this, ht).current && (t(this, x).direction = e), t(this, A).current && t(this, x).pauseAndContinue(
|
|
735
735
|
t(this, Mt).current,
|
|
736
736
|
this.sectionalCSSProperty.current
|
|
737
737
|
);
|
|
@@ -748,28 +748,28 @@ d = new WeakMap(), Et = new WeakMap(), P = new WeakMap(), st = new WeakMap(), B
|
|
|
748
748
|
detail: { line: t(this, H) }
|
|
749
749
|
}), t(this, M).current) {
|
|
750
750
|
this.classList.remove("end", "start"), t(this, H) && this.classList.add(t(this, H));
|
|
751
|
-
const i = t(this, R).current + t(this,
|
|
752
|
-
h(this,
|
|
751
|
+
const i = t(this, R).current + t(this, G).current;
|
|
752
|
+
h(this, J, []), t(this, c).forEach((r, l) => {
|
|
753
753
|
r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null), r.setMiddle(!1);
|
|
754
|
-
const
|
|
755
|
-
l >= e && l < S || l <=
|
|
754
|
+
const m = e - this.limit - 1 + t(this, G).current, S = e + i, g = this.sections.length - S;
|
|
755
|
+
l >= e && l < S || l <= m ? (r.setMark("current"), t(this, J).push(r)) : l >= S && l < S + g / 2 || l <= m + i ? r.setMark("next") : r.setMark("previous");
|
|
756
756
|
}), t(this, Se).call(this);
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
}, Qe = function() {
|
|
760
760
|
if (t(this, M).current) {
|
|
761
|
-
const e = Math.floor(t(this,
|
|
762
|
-
t(this,
|
|
761
|
+
const e = Math.floor(t(this, J).length / 2);
|
|
762
|
+
t(this, J).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, J).forEach((i, r) => {
|
|
763
763
|
const l = r - e;
|
|
764
764
|
i.setCurrentIndex(r), i.setCurrentIndexArc(l), i.setCurrentIndexArcAbs(Math.abs(l)), i.setMiddle(r === e);
|
|
765
765
|
});
|
|
766
766
|
}
|
|
767
767
|
}, Se = new WeakMap(), ce = function(e = !1) {
|
|
768
768
|
let i = this.targetScrollValue, r = 1 / 0, l = 0;
|
|
769
|
-
const
|
|
769
|
+
const m = t(this, d).direction;
|
|
770
770
|
for (let S = 0; S < t(this, c).length; S++) {
|
|
771
771
|
const g = t(this, c)[S];
|
|
772
|
-
let gt = t(this, Rt) ? g.size *
|
|
772
|
+
let gt = t(this, Rt) ? g.size * m * -1 * 0.4 : 0, Ht = g.position;
|
|
773
773
|
this.overscroll && Ht === 0 && e && (Ht = t(this, U));
|
|
774
774
|
let ne = Math.abs(Ht + gt - i);
|
|
775
775
|
ne <= r && (r = ne, l = S);
|
|
@@ -792,38 +792,38 @@ class ze extends HTMLElement {
|
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
794
|
ve = new WeakMap();
|
|
795
|
-
var ft, k,
|
|
795
|
+
var ft, k, Q, X, jt, Jt, bt, Qt, ye, Ce;
|
|
796
796
|
class ys extends ze {
|
|
797
797
|
constructor() {
|
|
798
798
|
super();
|
|
799
799
|
s(this, ft, null);
|
|
800
800
|
s(this, k, null);
|
|
801
|
-
s(this,
|
|
802
|
-
s(this,
|
|
801
|
+
s(this, Q, !1);
|
|
802
|
+
s(this, X, 0);
|
|
803
803
|
s(this, jt, 0);
|
|
804
804
|
s(this, Jt, 0);
|
|
805
|
-
s(this,
|
|
806
|
-
h(this,
|
|
807
|
-
const e = t(this,
|
|
808
|
-
h(this,
|
|
805
|
+
s(this, bt, () => {
|
|
806
|
+
h(this, Q, this.offsetWidth > this.offsetHeight);
|
|
807
|
+
const e = t(this, Q) ? this.offsetWidth : this.offsetHeight;
|
|
808
|
+
h(this, X, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, X, Math.max(t(this, X), 30)), t(this, Q) ? (t(this, k).style.width = t(this, X) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, X) + "px"), h(this, jt, e - t(this, X)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Qt).call(this);
|
|
809
809
|
});
|
|
810
810
|
s(this, Qt, () => {
|
|
811
|
-
h(this, Jt, this.scrollElement.currentProgress * t(this, jt)), t(this,
|
|
811
|
+
h(this, Jt, this.scrollElement.currentProgress * t(this, jt)), t(this, Q) ? t(this, k).style.transform = `translate3d(${t(this, Jt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Jt)}px, 0px)`;
|
|
812
812
|
});
|
|
813
813
|
s(this, ye, () => {
|
|
814
814
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
815
815
|
});
|
|
816
816
|
s(this, Ce, (e) => {
|
|
817
|
-
document.documentElement.classList.add("grabbing"),
|
|
817
|
+
document.documentElement.classList.add("grabbing"), ms(
|
|
818
818
|
(l) => {
|
|
819
|
-
const
|
|
819
|
+
const m = t(this, Q) ? l.x : l.y, S = this.scrollElement.distance / t(this, jt), g = (m - r) * S;
|
|
820
820
|
this.scrollElement.setPosition(i + g);
|
|
821
821
|
},
|
|
822
822
|
() => {
|
|
823
823
|
document.documentElement.classList.remove("grabbing");
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
const i = this.scrollElement.damped.target, r = t(this,
|
|
826
|
+
const i = this.scrollElement.damped.target, r = t(this, Q) ? e.x : e.y;
|
|
827
827
|
});
|
|
828
828
|
if (T) {
|
|
829
829
|
const e = this.attachShadow({ mode: "open" });
|
|
@@ -866,13 +866,13 @@ class ys extends ze {
|
|
|
866
866
|
connectedCallback() {
|
|
867
867
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
868
868
|
const e = t(this, ft).assignedElements()[0] || t(this, ft).firstElementChild;
|
|
869
|
-
h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, Ce)), Bt.subscribe(t(this,
|
|
869
|
+
h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, Ce)), Bt.subscribe(t(this, bt), Te.SCROLL), ae.subscribe(this, t(this, bt)), ae.subscribe(this.scrollElement, t(this, bt)), this.scrollElement.onScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ye));
|
|
870
870
|
}
|
|
871
871
|
disconnectedCallback() {
|
|
872
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, Ce)), Bt.unsubscribe(t(this,
|
|
872
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, Ce)), Bt.unsubscribe(t(this, bt)), ae.unsubscribe(t(this, bt)), this.scrollElement.offScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ye));
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
ft = new WeakMap(), k = new WeakMap(),
|
|
875
|
+
ft = new WeakMap(), k = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), bt = new WeakMap(), Qt = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap();
|
|
876
876
|
T && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ys);
|
|
877
877
|
var Xt, Yt, te;
|
|
878
878
|
class Xe extends ze {
|
|
@@ -919,62 +919,62 @@ class Cs extends Xe {
|
|
|
919
919
|
}
|
|
920
920
|
ee = new WeakMap();
|
|
921
921
|
T && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Cs);
|
|
922
|
-
var
|
|
922
|
+
var Y, se;
|
|
923
923
|
class ws extends Xe {
|
|
924
924
|
constructor() {
|
|
925
925
|
super(...arguments);
|
|
926
|
-
s(this,
|
|
926
|
+
s(this, Y, new p(this, "--step", 1));
|
|
927
927
|
s(this, se, () => {
|
|
928
|
-
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this,
|
|
928
|
+
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, Y).current > 0 && this.scrollElement.scrollLine === "end" || t(this, Y).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
handleClick(e) {
|
|
932
|
-
this.scrollElement.shiftSections(t(this,
|
|
932
|
+
this.scrollElement.shiftSections(t(this, Y).current, e);
|
|
933
933
|
}
|
|
934
934
|
connectedCallback() {
|
|
935
|
-
super.connectedCallback(), this.scrollElement && (t(this,
|
|
935
|
+
super.connectedCallback(), this.scrollElement && (t(this, Y).subscribe(() => {
|
|
936
936
|
t(this, se).call(this);
|
|
937
|
-
}), t(this,
|
|
937
|
+
}), t(this, Y).observe(), this.scrollElement.addEventListener(
|
|
938
938
|
"scrollLine",
|
|
939
939
|
t(this, se)
|
|
940
940
|
), t(this, se).call(this));
|
|
941
941
|
}
|
|
942
942
|
disconnectedCallback() {
|
|
943
|
-
super.disconnectedCallback(), t(this,
|
|
943
|
+
super.disconnectedCallback(), t(this, Y).close(), this.removeAttribute("disabled");
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
|
|
946
|
+
Y = new WeakMap(), se = new WeakMap();
|
|
947
947
|
T && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ws);
|
|
948
|
-
var
|
|
949
|
-
class
|
|
948
|
+
var $, mt, ie, we, Ee, re;
|
|
949
|
+
class Es {
|
|
950
950
|
constructor(n, e, i) {
|
|
951
|
-
s(this,
|
|
952
|
-
s(this,
|
|
951
|
+
s(this, $, null);
|
|
952
|
+
s(this, mt, null);
|
|
953
953
|
s(this, ie, null);
|
|
954
954
|
s(this, we, null);
|
|
955
|
-
s(this,
|
|
956
|
-
t(this,
|
|
955
|
+
s(this, Ee, () => {
|
|
956
|
+
t(this, mt).scrollToSection(t(this, ie), {
|
|
957
957
|
behaviour: t(this, we)
|
|
958
958
|
});
|
|
959
959
|
});
|
|
960
960
|
s(this, re, () => {
|
|
961
|
-
t(this,
|
|
961
|
+
t(this, $).classList.toggle(
|
|
962
962
|
"current",
|
|
963
|
-
t(this,
|
|
963
|
+
t(this, mt).counter.current === t(this, ie)
|
|
964
964
|
);
|
|
965
965
|
});
|
|
966
|
-
T && (h(this,
|
|
966
|
+
T && (h(this, $, document.createElement("button")), t(this, $).setAttribute("aria-label", `Go to section ${e + 1}`), h(this, mt, n), h(this, we, i), h(this, ie, e), t(this, $).addEventListener("click", t(this, Ee)), t(this, mt).counter.subscribe(t(this, re)), t(this, re).call(this));
|
|
967
967
|
}
|
|
968
968
|
get element() {
|
|
969
|
-
return t(this,
|
|
969
|
+
return t(this, $);
|
|
970
970
|
}
|
|
971
971
|
destroy() {
|
|
972
|
-
t(this,
|
|
972
|
+
t(this, $).removeEventListener("click", t(this, Ee)), t(this, mt).counter.unsubscribe(t(this, re)), t(this, $).remove();
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
$ = new WeakMap(), mt = new WeakMap(), ie = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), re = new WeakMap();
|
|
976
976
|
var Ot, St, tt;
|
|
977
|
-
class
|
|
977
|
+
class xs extends ze {
|
|
978
978
|
constructor() {
|
|
979
979
|
super(...arguments);
|
|
980
980
|
s(this, Ot, null);
|
|
@@ -984,7 +984,7 @@ class Es extends ze {
|
|
|
984
984
|
let e = 0;
|
|
985
985
|
this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
986
986
|
for (let i = 0; i < e; i++) {
|
|
987
|
-
const r = new
|
|
987
|
+
const r = new Es(
|
|
988
988
|
this.scrollElement,
|
|
989
989
|
i,
|
|
990
990
|
this.getAttribute("behaviour") || "smooth"
|
|
@@ -1011,7 +1011,7 @@ class Es extends ze {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
Ot = new WeakMap(), St = new WeakMap(), tt = new WeakMap();
|
|
1014
|
-
T && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons",
|
|
1014
|
+
T && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", xs);
|
|
1015
1015
|
class Ps extends Ss {
|
|
1016
1016
|
connectedCallback() {
|
|
1017
1017
|
const n = je(this, Wt);
|
|
@@ -1028,28 +1028,28 @@ class Ps extends Ss {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
T && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ps);
|
|
1031
|
-
var
|
|
1031
|
+
var xe;
|
|
1032
1032
|
const Be = class Be extends ze {
|
|
1033
1033
|
constructor() {
|
|
1034
1034
|
super(...arguments);
|
|
1035
|
-
s(this,
|
|
1035
|
+
s(this, xe, () => {
|
|
1036
1036
|
this.textContent = `${this.scrollElement.counter.current + 1}`;
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
1039
|
connectedCallback() {
|
|
1040
|
-
return
|
|
1041
|
-
|
|
1040
|
+
return Ue(this, null, function* () {
|
|
1041
|
+
Ge(Be.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(t(this, xe));
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
disconnectedCallback() {
|
|
1045
|
-
this.scrollElement.counter.unsubscribe(t(this,
|
|
1045
|
+
this.scrollElement.counter.unsubscribe(t(this, xe));
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
|
-
|
|
1048
|
+
xe = new WeakMap();
|
|
1049
1049
|
let $e = Be;
|
|
1050
1050
|
T && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", $e);
|
|
1051
1051
|
export {
|
|
1052
|
-
|
|
1052
|
+
xs as ScrollBulletButtonsElement,
|
|
1053
1053
|
$e as ScrollCounterElement,
|
|
1054
1054
|
Wt as ScrollElement,
|
|
1055
1055
|
Ps as ScrollSegmentElement,
|