aptechka 0.51.13 → 0.51.15
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/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +27 -27
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +39 -39
- package/lib/scroll-segment/ScrollSegmentElement.d.ts +2 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +179 -169
- package/package.json +1 -1
|
@@ -1,172 +1,177 @@
|
|
|
1
|
-
var
|
|
1
|
+
var St = (l) => {
|
|
2
2
|
throw TypeError(l);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var t = (l,
|
|
6
|
-
import { f as
|
|
7
|
-
import { i as
|
|
8
|
-
import { elementResizer as
|
|
9
|
-
import { windowResizer as
|
|
10
|
-
import { CSSProperty as
|
|
11
|
-
import { TICK_ORDER as
|
|
12
|
-
import { d as
|
|
13
|
-
import { d as
|
|
14
|
-
import { a as
|
|
15
|
-
import { s as
|
|
16
|
-
import { S as
|
|
17
|
-
import { scrollEntries as
|
|
4
|
+
var lt = (l, u, r) => u.has(l) || St("Cannot " + r);
|
|
5
|
+
var t = (l, u, r) => (lt(l, u, "read from private field"), r ? r.call(l) : u.get(l)), i = (l, u, r) => u.has(l) ? St("Cannot add the same private member more than once") : u instanceof WeakSet ? u.add(l) : u.set(l, r), e = (l, u, r, s) => (lt(l, u, "write to private field"), s ? s.call(l, r) : u.set(l, r), r), c = (l, u, r) => (lt(l, u, "access private method"), r);
|
|
6
|
+
import { f as Rt } from "../dom-CVWzyXPH.js";
|
|
7
|
+
import { i as Ot } from "../index-euf5anj6.js";
|
|
8
|
+
import { elementResizer as dt } from "../element-resizer/index.js";
|
|
9
|
+
import { windowResizer as ut } from "../window-resizer/index.js";
|
|
10
|
+
import { CSSProperty as o } from "../css-property/index.js";
|
|
11
|
+
import { TICK_ORDER as zt, RESIZE_ORDER as kt } from "../order/index.js";
|
|
12
|
+
import { d as et } from "../events-CsVF98U6.js";
|
|
13
|
+
import { d as At } from "../function-C10DGppn.js";
|
|
14
|
+
import { a as Mt, g as Dt, c as Tt } from "../layout-DpZo-I0y.js";
|
|
15
|
+
import { s as xt } from "../math-BOBiC4TN.js";
|
|
16
|
+
import { S as rt } from "../Store-swP_0ymB.js";
|
|
17
|
+
import { scrollEntries as It } from "../scroll-entries/index.js";
|
|
18
18
|
import "../ticker/index.js";
|
|
19
|
-
import { D as
|
|
20
|
-
var F,
|
|
21
|
-
class
|
|
22
|
-
constructor(
|
|
19
|
+
import { D as $t } from "../Damped-GyAS-U-z.js";
|
|
20
|
+
var F, ot, it, G;
|
|
21
|
+
class bt {
|
|
22
|
+
constructor(u) {
|
|
23
23
|
i(this, F, null);
|
|
24
|
-
i(this,
|
|
25
|
-
i(this,
|
|
26
|
-
i(this,
|
|
27
|
-
e(this,
|
|
24
|
+
i(this, ot);
|
|
25
|
+
i(this, it, !1);
|
|
26
|
+
i(this, G, () => {
|
|
27
|
+
e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
|
|
28
28
|
});
|
|
29
|
-
e(this,
|
|
29
|
+
e(this, ot, u), e(this, F, Rt(t(this, ot))), dt.subscribe(t(this, F), t(this, G)), ut.subscribe(t(this, G)), t(this, G).call(this);
|
|
30
30
|
}
|
|
31
31
|
get element() {
|
|
32
32
|
return t(this, F);
|
|
33
33
|
}
|
|
34
34
|
get currentScrollValue() {
|
|
35
|
-
return t(this,
|
|
35
|
+
return t(this, it) ? t(this, F).scrollTop : t(this, F).scrollLeft;
|
|
36
36
|
}
|
|
37
37
|
get vertical() {
|
|
38
|
-
return t(this,
|
|
38
|
+
return t(this, it);
|
|
39
39
|
}
|
|
40
40
|
destroy() {
|
|
41
|
-
|
|
41
|
+
dt.unsubscribe(t(this, G)), ut.unsubscribe(t(this, G));
|
|
42
42
|
}
|
|
43
|
-
onScroll(
|
|
44
|
-
t(this, F).addEventListener("scroll",
|
|
43
|
+
onScroll(u) {
|
|
44
|
+
t(this, F).addEventListener("scroll", u);
|
|
45
45
|
}
|
|
46
|
-
offScroll(
|
|
47
|
-
t(this, F).removeEventListener("scroll",
|
|
46
|
+
offScroll(u) {
|
|
47
|
+
t(this, F).removeEventListener("scroll", u);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
F = new WeakMap(),
|
|
51
|
-
var f,
|
|
52
|
-
let
|
|
50
|
+
F = new WeakMap(), ot = new WeakMap(), it = new WeakMap(), G = new WeakMap();
|
|
51
|
+
var f, K, Z, j, J, x, I, $, H, d, v, C, y, W, S, z, k, E, N, Y, A, M, D, p, P, V, R, O, L, ht, n, _, Q, nt, m, T, g, b, w, tt, q, a, U, h, vt, ft, Ct, yt, Pt, Vt, Ft, Lt, ct, st, pt, X, wt, Et, mt, gt;
|
|
52
|
+
let Ht = (gt = class extends HTMLElement {
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments);
|
|
55
55
|
i(this, h);
|
|
56
56
|
i(this, f);
|
|
57
|
-
i(this, G);
|
|
58
57
|
i(this, K);
|
|
59
58
|
i(this, Z);
|
|
60
59
|
i(this, j);
|
|
60
|
+
i(this, J);
|
|
61
|
+
i(this, x);
|
|
61
62
|
i(this, I);
|
|
62
63
|
i(this, $);
|
|
63
64
|
i(this, H);
|
|
64
|
-
i(this, W);
|
|
65
65
|
i(this, d);
|
|
66
66
|
i(this, v);
|
|
67
67
|
i(this, C);
|
|
68
68
|
i(this, y);
|
|
69
|
-
i(this,
|
|
70
|
-
i(this,
|
|
69
|
+
i(this, W);
|
|
70
|
+
i(this, S);
|
|
71
71
|
i(this, z);
|
|
72
72
|
i(this, k);
|
|
73
73
|
i(this, E);
|
|
74
|
-
i(this,
|
|
75
|
-
i(this,
|
|
76
|
-
i(this,
|
|
74
|
+
i(this, N);
|
|
75
|
+
i(this, Y);
|
|
76
|
+
i(this, A);
|
|
77
77
|
i(this, M);
|
|
78
|
+
i(this, D);
|
|
78
79
|
i(this, p);
|
|
79
80
|
i(this, P);
|
|
80
81
|
i(this, V);
|
|
81
82
|
i(this, R);
|
|
82
83
|
i(this, O);
|
|
83
84
|
i(this, L);
|
|
84
|
-
i(this,
|
|
85
|
+
i(this, ht);
|
|
85
86
|
i(this, n);
|
|
86
87
|
i(this, _);
|
|
87
|
-
i(this,
|
|
88
|
-
i(this,
|
|
89
|
-
i(this,
|
|
88
|
+
i(this, Q);
|
|
89
|
+
i(this, nt);
|
|
90
|
+
i(this, m);
|
|
90
91
|
i(this, T);
|
|
91
92
|
i(this, g);
|
|
92
93
|
i(this, b);
|
|
93
94
|
i(this, w);
|
|
94
|
-
i(this,
|
|
95
|
+
i(this, tt);
|
|
95
96
|
i(this, q);
|
|
96
97
|
i(this, a);
|
|
97
|
-
i(this,
|
|
98
|
-
i(this,
|
|
99
|
-
i(this,
|
|
100
|
-
e(this, f, null), e(this,
|
|
98
|
+
i(this, U);
|
|
99
|
+
i(this, ct);
|
|
100
|
+
i(this, st);
|
|
101
|
+
e(this, f, null), e(this, K, new o(this, "--damping", 20)), e(this, Z, new o(this, "--mass", 0)), e(this, j, new o(this, "--stiffness", 0)), e(this, J, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, I, new o(
|
|
101
102
|
this,
|
|
102
103
|
"--distance-offset",
|
|
103
104
|
0,
|
|
104
105
|
{ rawValueCheck: !1 }
|
|
105
|
-
)), e(this,
|
|
106
|
+
)), e(this, $, new o(this, "--start-offset", 0, {
|
|
106
107
|
rawValueCheck: !1
|
|
107
|
-
})), e(this,
|
|
108
|
+
})), e(this, H, new o(
|
|
108
109
|
this,
|
|
109
110
|
"--capture-once",
|
|
110
111
|
!1
|
|
111
|
-
)), e(this, d, new
|
|
112
|
+
)), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
|
|
112
113
|
this,
|
|
113
114
|
"--captured-from-start",
|
|
114
115
|
""
|
|
115
|
-
)), e(this, y, new
|
|
116
|
+
)), e(this, y, new o(
|
|
116
117
|
this,
|
|
117
118
|
"--captured-from-finish",
|
|
118
119
|
""
|
|
119
|
-
)), e(this,
|
|
120
|
+
)), e(this, W, new o(
|
|
120
121
|
this,
|
|
121
122
|
"--released-from-start",
|
|
122
123
|
""
|
|
123
|
-
)), e(this,
|
|
124
|
+
)), e(this, S, new o(
|
|
124
125
|
this,
|
|
125
126
|
"--released-from-finish",
|
|
126
127
|
""
|
|
127
|
-
)), e(this, z, new
|
|
128
|
+
)), e(this, z, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, E, new o(
|
|
128
129
|
this,
|
|
129
130
|
"--progress-arc-var",
|
|
130
131
|
""
|
|
131
|
-
)), e(this,
|
|
132
|
+
)), e(this, N, new o(
|
|
133
|
+
this,
|
|
134
|
+
"--progress-arc-mult",
|
|
135
|
+
1
|
|
136
|
+
)), e(this, Y, new o(
|
|
132
137
|
this,
|
|
133
138
|
"--animation-var-type",
|
|
134
139
|
"target"
|
|
135
|
-
)), e(this,
|
|
136
|
-
e(this,
|
|
140
|
+
)), e(this, A, new o(this, "--distance-var", "")), e(this, M, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, Q, 0), e(this, nt, 0), e(this, m, new $t(0, { order: zt.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, U, !1), this.resize = () => {
|
|
141
|
+
e(this, Q, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
|
|
137
142
|
const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
|
|
138
|
-
e(this, _, t(this, f).vertical ?
|
|
139
|
-
const s =
|
|
143
|
+
e(this, _, t(this, f).vertical ? Mt(this, r) : Dt(this, r));
|
|
144
|
+
const s = Tt(
|
|
140
145
|
this,
|
|
141
146
|
t(this, f).vertical ? "top" : "left"
|
|
142
147
|
);
|
|
143
|
-
e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this,
|
|
144
|
-
}, this.findAnotherScrollEntries =
|
|
145
|
-
const r =
|
|
148
|
+
e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, $).current), e(this, b, t(this, b) + t(this, I).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, M).current, t(this, g)), this.setVar(t(this, D).current, t(this, w)), this.setVar(t(this, A).current, t(this, b)), t(this, m).max = t(this, b), e(this, tt, !0), t(this, st).call(this);
|
|
149
|
+
}, this.findAnotherScrollEntries = At(() => {
|
|
150
|
+
const r = It.getAll(this).reverse();
|
|
146
151
|
let s = 0;
|
|
147
|
-
r.forEach((
|
|
148
|
-
|
|
149
|
-
}), e(this,
|
|
150
|
-
}, 0), e(this,
|
|
152
|
+
r.forEach((B, at) => {
|
|
153
|
+
B.element === t(this, f) && (s = at);
|
|
154
|
+
}), e(this, ht, r.slice(s + 1)), this.tick();
|
|
155
|
+
}, 0), e(this, ct, () => {
|
|
151
156
|
t(this, a) || this.resize();
|
|
152
|
-
}), e(this,
|
|
153
|
-
!t(this, a) && t(this,
|
|
157
|
+
}), e(this, st, () => {
|
|
158
|
+
!t(this, a) && t(this, tt) && this.tick();
|
|
154
159
|
});
|
|
155
160
|
}
|
|
156
161
|
get scrollContainer() {
|
|
157
162
|
return t(this, f);
|
|
158
163
|
}
|
|
159
164
|
set scrollContainer(r) {
|
|
160
|
-
c(this, h,
|
|
165
|
+
c(this, h, ft).call(this), e(this, f, r), c(this, h, vt).call(this);
|
|
161
166
|
}
|
|
162
167
|
get distanceOffsetCSSProperty() {
|
|
163
|
-
return t(this,
|
|
168
|
+
return t(this, I);
|
|
164
169
|
}
|
|
165
170
|
get startOffsetCSSProperty() {
|
|
166
|
-
return t(this,
|
|
171
|
+
return t(this, $);
|
|
167
172
|
}
|
|
168
173
|
get captureOnceCSSProperty() {
|
|
169
|
-
return t(this,
|
|
174
|
+
return t(this, H);
|
|
170
175
|
}
|
|
171
176
|
get capturedCSSProperty() {
|
|
172
177
|
return t(this, d);
|
|
@@ -181,10 +186,10 @@ let $t = (bt = class extends HTMLElement {
|
|
|
181
186
|
return t(this, y);
|
|
182
187
|
}
|
|
183
188
|
get releasedFromStartCSSProperty() {
|
|
184
|
-
return t(this,
|
|
189
|
+
return t(this, W);
|
|
185
190
|
}
|
|
186
191
|
get releasedFromFinishCSSProperty() {
|
|
187
|
-
return t(this,
|
|
192
|
+
return t(this, S);
|
|
188
193
|
}
|
|
189
194
|
get passedVarCSSProperty() {
|
|
190
195
|
return t(this, z);
|
|
@@ -195,32 +200,35 @@ let $t = (bt = class extends HTMLElement {
|
|
|
195
200
|
get progressArcVarCSSProperty() {
|
|
196
201
|
return t(this, E);
|
|
197
202
|
}
|
|
203
|
+
get progressArcMultCSSProperty() {
|
|
204
|
+
return t(this, N);
|
|
205
|
+
}
|
|
198
206
|
get animationVarTypeCSSProperty() {
|
|
199
|
-
return t(this,
|
|
207
|
+
return t(this, Y);
|
|
200
208
|
}
|
|
201
209
|
get distanceVarCSSProperty() {
|
|
202
|
-
return t(this,
|
|
210
|
+
return t(this, A);
|
|
203
211
|
}
|
|
204
212
|
get startVarCSSProperty() {
|
|
205
|
-
return t(this,
|
|
213
|
+
return t(this, M);
|
|
206
214
|
}
|
|
207
215
|
get finishVarCSSProperty() {
|
|
208
|
-
return t(this,
|
|
216
|
+
return t(this, D);
|
|
209
217
|
}
|
|
210
218
|
get disabledCSSProperty() {
|
|
211
|
-
return t(this,
|
|
219
|
+
return t(this, x);
|
|
212
220
|
}
|
|
213
221
|
get dampingCSSProperty() {
|
|
214
|
-
return t(this,
|
|
222
|
+
return t(this, K);
|
|
215
223
|
}
|
|
216
224
|
get massCSSProperty() {
|
|
217
|
-
return t(this,
|
|
225
|
+
return t(this, Z);
|
|
218
226
|
}
|
|
219
227
|
get stiffnessCSSProperty() {
|
|
220
|
-
return t(this,
|
|
228
|
+
return t(this, j);
|
|
221
229
|
}
|
|
222
230
|
get targetCSSProperty() {
|
|
223
|
-
return t(this,
|
|
231
|
+
return t(this, J);
|
|
224
232
|
}
|
|
225
233
|
get isCaptured() {
|
|
226
234
|
return t(this, p);
|
|
@@ -244,14 +252,17 @@ let $t = (bt = class extends HTMLElement {
|
|
|
244
252
|
return t(this, _);
|
|
245
253
|
}
|
|
246
254
|
get directionSize() {
|
|
247
|
-
return t(this,
|
|
255
|
+
return t(this, Q);
|
|
248
256
|
}
|
|
249
257
|
get passed() {
|
|
250
|
-
return t(this,
|
|
258
|
+
return t(this, m);
|
|
251
259
|
}
|
|
252
260
|
get progress() {
|
|
253
261
|
return t(this, T);
|
|
254
262
|
}
|
|
263
|
+
get progressArc() {
|
|
264
|
+
return Math.abs(Math.cos(t(this, T) * Math.PI)) * t(this, N).current;
|
|
265
|
+
}
|
|
255
266
|
get start() {
|
|
256
267
|
return t(this, g);
|
|
257
268
|
}
|
|
@@ -269,180 +280,179 @@ let $t = (bt = class extends HTMLElement {
|
|
|
269
280
|
}
|
|
270
281
|
tick() {
|
|
271
282
|
let r = t(this, f).currentScrollValue;
|
|
272
|
-
t(this,
|
|
273
|
-
r +=
|
|
283
|
+
t(this, ht).forEach((at) => {
|
|
284
|
+
r += at.value;
|
|
274
285
|
});
|
|
275
286
|
const s = r - t(this, g);
|
|
276
|
-
t(this,
|
|
277
|
-
const
|
|
278
|
-
t(this, p).current && (
|
|
279
|
-
|
|
280
|
-
), c(this, h,
|
|
287
|
+
t(this, U) || e(this, U, t(this, m).previous ? Math.abs(t(this, m).previous - s) > 1e3 : !1), t(this, m).set(s);
|
|
288
|
+
const B = Math.round(r);
|
|
289
|
+
t(this, p).current && (B >= t(this, g) ? t(this, V).current || c(this, h, Pt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Ft).call(this), B < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Vt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Lt).call(this)), B >= t(this, g) && B < t(this, w) ? t(this, p).current || c(this, h, Ct).call(this) : t(this, p).current && (t(this, m).set(
|
|
290
|
+
xt(t(this, b) / 2, t(this, m).target, 0, t(this, b))
|
|
291
|
+
), c(this, h, yt).call(this)), t(this, q) && t(this, H).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
|
|
281
292
|
}
|
|
282
293
|
disable() {
|
|
283
|
-
this.style.cssText = "", e(this, _, 0), e(this,
|
|
294
|
+
this.style.cssText = "", e(this, _, 0), e(this, Q, 0), t(this, m).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, mt).call(this);
|
|
284
295
|
}
|
|
285
296
|
enable() {
|
|
286
297
|
e(this, a, !1);
|
|
287
298
|
}
|
|
288
299
|
connectedCallback() {
|
|
289
|
-
this.scrollContainer = new
|
|
300
|
+
this.scrollContainer = new bt(this);
|
|
290
301
|
}
|
|
291
302
|
disconnectedCallback() {
|
|
292
|
-
t(this, f) instanceof
|
|
303
|
+
t(this, f) instanceof bt && t(this, f).destroy(), c(this, h, ft).call(this);
|
|
293
304
|
}
|
|
294
305
|
removeVar(r) {
|
|
295
306
|
r && t(this, n).style.removeProperty(`--${r}`);
|
|
296
307
|
}
|
|
297
308
|
setVar(r, s) {
|
|
298
|
-
|
|
309
|
+
if (r) {
|
|
310
|
+
const B = typeof s == "number" ? s.toFixed(6) : s;
|
|
311
|
+
t(this, n).style.setProperty(`--${r}`, B);
|
|
312
|
+
}
|
|
299
313
|
}
|
|
300
314
|
getDistance() {
|
|
301
|
-
return t(this,
|
|
315
|
+
return t(this, Q) + t(this, nt);
|
|
302
316
|
}
|
|
303
317
|
getStart() {
|
|
304
|
-
return t(this, _) - t(this,
|
|
318
|
+
return t(this, _) - t(this, nt);
|
|
305
319
|
}
|
|
306
|
-
}, f = new WeakMap(),
|
|
320
|
+
}, f = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), x = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), W = new WeakMap(), S = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), A = new WeakMap(), M = new WeakMap(), D = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), nt = new WeakMap(), m = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), U = new WeakMap(), h = new WeakSet(), vt = function() {
|
|
307
321
|
if (!t(this, f))
|
|
308
322
|
return;
|
|
309
323
|
t(this, p).subscribe((s) => {
|
|
310
|
-
s.current &&
|
|
324
|
+
s.current && et(this, "scrollSegmentCapture", {
|
|
311
325
|
composed: !0,
|
|
312
326
|
custom: !0
|
|
313
327
|
});
|
|
314
328
|
}), t(this, V).subscribe((s) => {
|
|
315
|
-
s.current &&
|
|
329
|
+
s.current && et(this, "scrollSegmentCaptureFromStart", {
|
|
316
330
|
composed: !0,
|
|
317
331
|
custom: !0
|
|
318
332
|
});
|
|
319
333
|
}), t(this, O).subscribe((s) => {
|
|
320
|
-
s.current &&
|
|
334
|
+
s.current && et(this, "scrollSegmentCaptureFromFinish", {
|
|
321
335
|
composed: !0,
|
|
322
336
|
custom: !0
|
|
323
337
|
});
|
|
324
338
|
}), t(this, P).subscribe((s) => {
|
|
325
|
-
s.current &&
|
|
339
|
+
s.current && et(this, "scrollSegmentRelease", {
|
|
326
340
|
composed: !0,
|
|
327
341
|
custom: !0
|
|
328
342
|
});
|
|
329
343
|
}), t(this, R).subscribe((s) => {
|
|
330
|
-
s.current &&
|
|
344
|
+
s.current && et(this, "scrollSegmentReleaseFromStart", {
|
|
331
345
|
composed: !0,
|
|
332
346
|
custom: !0
|
|
333
347
|
});
|
|
334
348
|
}), t(this, L).subscribe((s) => {
|
|
335
|
-
s.current &&
|
|
349
|
+
s.current && et(this, "scrollSegmentReleaseFromFinish", {
|
|
336
350
|
composed: !0,
|
|
337
351
|
custom: !0
|
|
338
352
|
});
|
|
339
|
-
}), t(this,
|
|
353
|
+
}), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, J).observe(), t(this, x).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, W).observe(), t(this, S).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, N).observe(), t(this, Y).observe(), t(this, A).observe(), t(this, M).observe(), t(this, D).observe();
|
|
340
354
|
let r = !1;
|
|
341
|
-
this.findAnotherScrollEntries(), t(this,
|
|
342
|
-
t(this,
|
|
343
|
-
}), t(this, K).subscribe((s) => {
|
|
344
|
-
t(this, S).mass = s.current;
|
|
355
|
+
this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, K).subscribe((s) => {
|
|
356
|
+
t(this, m).damping = s.current;
|
|
345
357
|
}), t(this, Z).subscribe((s) => {
|
|
346
|
-
t(this,
|
|
358
|
+
t(this, m).mass = s.current;
|
|
347
359
|
}), t(this, j).subscribe((s) => {
|
|
348
|
-
|
|
349
|
-
}), t(this,
|
|
360
|
+
t(this, m).stiffness = s.current;
|
|
361
|
+
}), t(this, J).subscribe((s) => {
|
|
362
|
+
s.previous && c(this, h, mt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
|
|
363
|
+
}), t(this, x).subscribe((s) => {
|
|
350
364
|
s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
|
|
351
|
-
}), t(this, H).subscribe(() => {
|
|
352
|
-
r && !t(this, a) && this.resize();
|
|
353
365
|
}), t(this, $).subscribe(() => {
|
|
354
366
|
r && !t(this, a) && this.resize();
|
|
367
|
+
}), t(this, I).subscribe(() => {
|
|
368
|
+
r && !t(this, a) && this.resize();
|
|
355
369
|
}), t(this, d).subscribe((s) => {
|
|
356
|
-
c(this, h,
|
|
370
|
+
c(this, h, X).call(this, s);
|
|
357
371
|
}), t(this, C).subscribe((s) => {
|
|
358
|
-
c(this, h,
|
|
372
|
+
c(this, h, X).call(this, s);
|
|
359
373
|
}), t(this, y).subscribe((s) => {
|
|
360
|
-
c(this, h,
|
|
374
|
+
c(this, h, X).call(this, s);
|
|
361
375
|
}), t(this, v).subscribe((s) => {
|
|
362
|
-
c(this, h,
|
|
363
|
-
}), t(this, N).subscribe((s) => {
|
|
364
|
-
c(this, h, U).call(this, s);
|
|
365
|
-
}), t(this, m).subscribe((s) => {
|
|
366
|
-
c(this, h, U).call(this, s);
|
|
376
|
+
c(this, h, X).call(this, s);
|
|
367
377
|
}), t(this, W).subscribe((s) => {
|
|
378
|
+
c(this, h, X).call(this, s);
|
|
379
|
+
}), t(this, S).subscribe((s) => {
|
|
380
|
+
c(this, h, X).call(this, s);
|
|
381
|
+
}), t(this, H).subscribe((s) => {
|
|
368
382
|
t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
|
|
369
383
|
}), t(this, z).subscribe((s) => {
|
|
370
384
|
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
371
385
|
}), t(this, k).subscribe((s) => {
|
|
372
386
|
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
|
|
373
387
|
}), t(this, E).subscribe((s) => {
|
|
374
|
-
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current,
|
|
375
|
-
}), t(this,
|
|
376
|
-
t(this, a) || (this
|
|
388
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
|
|
389
|
+
}), t(this, N).subscribe((s) => {
|
|
390
|
+
t(this, a) || c(this, h, pt).call(this);
|
|
377
391
|
}), t(this, M).subscribe((s) => {
|
|
378
|
-
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
392
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
|
|
379
393
|
}), t(this, D).subscribe((s) => {
|
|
394
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
|
|
395
|
+
}), t(this, A).subscribe((s) => {
|
|
380
396
|
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
|
|
381
|
-
}), t(this,
|
|
382
|
-
if (t(this,
|
|
383
|
-
e(this,
|
|
397
|
+
}), t(this, m).subscribe((s) => {
|
|
398
|
+
if (t(this, U)) {
|
|
399
|
+
e(this, U, !1);
|
|
384
400
|
return;
|
|
385
401
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
), t(this, E).current && this.setVar(
|
|
391
|
-
t(this, E).current,
|
|
392
|
-
c(this, h, ft).call(this).toFixed(6)
|
|
393
|
-
);
|
|
394
|
-
}), ot.subscribe(t(this, nt), zt.SCROLL + 1), this.scrollContainer.onScroll(t(this, tt)), r = !0;
|
|
395
|
-
}, lt = function() {
|
|
396
|
-
t(this, f) && (ot.unsubscribe(t(this, nt)), this.scrollContainer.offScroll(t(this, tt)), t(this, G).close(), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, W).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, N).close(), t(this, m).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, D).close(), t(this, x).close(), t(this, M).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable());
|
|
397
|
-
}, vt = function() {
|
|
398
|
-
t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, m).current && t(this, n).classList.remove(
|
|
399
|
-
t(this, m).current
|
|
400
|
-
), t(this, m).current && t(this, n).classList.remove(
|
|
401
|
-
t(this, m).current
|
|
402
|
-
), t(this, d).current && t(this, n).classList.add(t(this, d).current);
|
|
402
|
+
c(this, h, pt).call(this);
|
|
403
|
+
}), ut.subscribe(t(this, ct), kt.SCROLL + 1), this.scrollContainer.onScroll(t(this, st)), r = !0;
|
|
404
|
+
}, ft = function() {
|
|
405
|
+
t(this, f) && (ut.unsubscribe(t(this, ct)), this.scrollContainer.offScroll(t(this, st)), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, J).close(), t(this, x).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, W).close(), t(this, S).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, N).close(), t(this, A).close(), t(this, M).close(), t(this, D).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable(), t(this, m).close());
|
|
403
406
|
}, Ct = function() {
|
|
407
|
+
t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, S).current && t(this, n).classList.remove(
|
|
408
|
+
t(this, S).current
|
|
409
|
+
), t(this, S).current && t(this, n).classList.remove(
|
|
410
|
+
t(this, S).current
|
|
411
|
+
), t(this, d).current && t(this, n).classList.add(t(this, d).current);
|
|
412
|
+
}, yt = function() {
|
|
404
413
|
t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
|
|
405
414
|
t(this, C).current
|
|
406
415
|
), t(this, y).current && t(this, n).classList.remove(
|
|
407
416
|
t(this, y).current
|
|
408
417
|
), t(this, v).current && t(this, n).classList.add(t(this, v).current);
|
|
409
|
-
},
|
|
418
|
+
}, Pt = function() {
|
|
410
419
|
t(this, p).current = !0, t(this, V).current = !0, t(this, R).current = !1, t(this, C).current && t(this, n).classList.add(
|
|
411
420
|
t(this, C).current
|
|
412
421
|
);
|
|
413
|
-
},
|
|
422
|
+
}, Vt = function() {
|
|
414
423
|
t(this, p).current = !0, t(this, O).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
|
|
415
424
|
t(this, y).current
|
|
416
425
|
);
|
|
417
|
-
}, Vt = function() {
|
|
418
|
-
t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, m).current && t(this, n).classList.add(
|
|
419
|
-
t(this, m).current
|
|
420
|
-
);
|
|
421
426
|
}, Ft = function() {
|
|
422
|
-
t(this, P).current = !0, t(this,
|
|
423
|
-
t(this,
|
|
427
|
+
t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, S).current && t(this, n).classList.add(
|
|
428
|
+
t(this, S).current
|
|
429
|
+
);
|
|
430
|
+
}, Lt = function() {
|
|
431
|
+
t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, S).current && t(this, n).classList.add(
|
|
432
|
+
t(this, S).current
|
|
424
433
|
);
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
|
|
434
|
+
}, ct = new WeakMap(), st = new WeakMap(), pt = function() {
|
|
435
|
+
const r = t(this, m)[t(this, Y).current];
|
|
436
|
+
this.setVar(t(this, z).current, r), e(this, T, r / t(this, b) || 0), this.setVar(t(this, k).current, t(this, T)), t(this, E).current && this.setVar(t(this, E).current, this.progressArc);
|
|
437
|
+
}, X = function(r) {
|
|
428
438
|
if (t(this, a)) {
|
|
429
439
|
r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
|
|
430
440
|
return;
|
|
431
441
|
}
|
|
432
442
|
r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
|
|
433
|
-
},
|
|
443
|
+
}, wt = function(...r) {
|
|
434
444
|
r.forEach((s) => {
|
|
435
445
|
s && t(this, n).classList.remove(s);
|
|
436
446
|
});
|
|
437
|
-
},
|
|
447
|
+
}, Et = function(...r) {
|
|
438
448
|
r.forEach((s) => {
|
|
439
449
|
s && t(this, n).style.removeProperty(`--${s}`);
|
|
440
450
|
});
|
|
441
|
-
},
|
|
442
|
-
c(this, h,
|
|
443
|
-
},
|
|
444
|
-
|
|
451
|
+
}, mt = function() {
|
|
452
|
+
c(this, h, wt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, W).current, t(this, S).current), c(this, h, Et).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, A).current, t(this, M).current, t(this, D).current);
|
|
453
|
+
}, gt);
|
|
454
|
+
Ot && !customElements.get("scroll-segment") && customElements.define("scroll-segment", Ht);
|
|
445
455
|
export {
|
|
446
|
-
|
|
447
|
-
|
|
456
|
+
bt as ScrollSegmentDefaultContainer,
|
|
457
|
+
Ht as ScrollSegmentElement
|
|
448
458
|
};
|