aptechka 0.26.5 → 0.27.0

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.
@@ -1,92 +1,93 @@
1
- var pe = Object.defineProperty;
2
- var _s = Object.getOwnPropertySymbols;
3
- var me = Object.prototype.hasOwnProperty, Se = Object.prototype.propertyIsEnumerable;
4
- var js = (d) => {
5
- throw TypeError(d);
1
+ var de = Object.defineProperty;
2
+ var te = Object.getOwnPropertySymbols;
3
+ var pe = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
4
+ var se = (u) => {
5
+ throw TypeError(u);
6
6
  };
7
- var Zs = (d, n, s) => n in d ? pe(d, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[n] = s, Js = (d, n) => {
8
- for (var s in n || (n = {}))
9
- me.call(n, s) && Zs(d, s, n[s]);
10
- if (_s)
11
- for (var s of _s(n))
12
- Se.call(n, s) && Zs(d, s, n[s]);
13
- return d;
7
+ var ee = (u, n, e) => n in u ? de(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, ie = (u, n) => {
8
+ for (var e in n || (n = {}))
9
+ pe.call(n, e) && ee(u, e, n[e]);
10
+ if (te)
11
+ for (var e of te(n))
12
+ fe.call(n, e) && ee(u, e, n[e]);
13
+ return u;
14
14
  };
15
- var Os = (d, n, s) => n.has(d) || js("Cannot " + s);
16
- var t = (d, n, s) => (Os(d, n, "read from private field"), s ? s.call(d) : n.get(d)), i = (d, n, s) => n.has(d) ? js("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, s), r = (d, n, s, e) => (Os(d, n, "write to private field"), e ? e.call(d, s) : n.set(d, s), s), o = (d, n, s) => (Os(d, n, "access private method"), s);
17
- import { S as Dt } from "../../Store-OTdcl6SX.js";
18
- import { i as Ms } from "../../browser-0zX67oeU.js";
15
+ var Nt = (u, n, e) => n.has(u) || se("Cannot " + e);
16
+ var t = (u, n, e) => (Nt(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? se("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Nt(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), d = (u, n, e) => (Nt(u, n, "access private method"), e);
17
+ import { S as me } from "../../Store-OTdcl6SX.js";
18
+ import { i as qt } from "../../browser-0zX67oeU.js";
19
19
  import { p as be } from "../../easings-BKi40vHz.js";
20
- import { d as Q } from "../../events-CsVF98U6.js";
21
- import { c as Xs } from "../../jss-CjccJC-K.js";
22
- import { a as Rs, g as As } from "../../layout-HoBT_Da2.js";
23
- import { c as Ys, s as ge } from "../../math-BOBiC4TN.js";
20
+ import { d as Ut } from "../../events-CsVF98U6.js";
21
+ import { c as ne } from "../../jss-CjccJC-K.js";
22
+ import { a as Gt, g as Kt } from "../../layout-HoBT_Da2.js";
23
+ import { c as he } from "../../math-BOBiC4TN.js";
24
24
  import "../../ticker/vanilla/index.js";
25
- import { TICK_ORDER as te, RESIZE_ORDER as Ks } from "../../order/index.js";
26
- import { D as se } from "../../Damped-Chu29wn-.js";
25
+ import { TICK_ORDER as Se, RESIZE_ORDER as oe } from "../../order/index.js";
26
+ import { D as ge } from "../../Damped-Chu29wn-.js";
27
27
  import { T as ve } from "../../Tweened-BUuSLSF7.js";
28
- import { WheelControls as ye, KeyboardControls as Ce, DragControls as Pe, AutoplayControls as we } from "../../controls/index.js";
29
- import { windowResizer as ms } from "../../window-resizer/vanilla/index.js";
30
- import { scrollEntries as Yt } from "../../scroll-entries/index.js";
31
- import { cssUnitParser as Qs } from "../../css-unit-parser/index.js";
32
- import { CSSProperty as c } from "../../css-property/index.js";
33
- import { device as Ee } from "../../device/index.js";
34
- import { elementResizer as Is } from "../../element-resizer/vanilla/index.js";
35
- import { s as xe } from "../../gestures-D2Fdra_G.js";
36
- import { f as Le } from "../../dom-0S_WDL4g.js";
37
- import { d as ee } from "../../function-C10DGppn.js";
38
- var b, bs, C, It, X, ft;
39
- class Ve {
40
- constructor(n, s, e) {
41
- i(this, b);
42
- i(this, bs);
43
- i(this, C);
44
- i(this, It, 0);
45
- i(this, X, 0);
46
- i(this, ft, null);
47
- r(this, b, n), r(this, bs, s), r(this, C, e), Yt.register(t(this, b));
28
+ import { WheelControls as ye, KeyboardControls as Ce, DragControls as Ee, AutoplayControls as xe } from "../../controls/index.js";
29
+ import { windowResizer as Wt } from "../../window-resizer/vanilla/index.js";
30
+ import { scrollEntries as bt } from "../../scroll-entries/index.js";
31
+ import { cssUnitParser as re } from "../../css-unit-parser/index.js";
32
+ import { CSSProperty as f } from "../../css-property/index.js";
33
+ import { device as we } from "../../device/index.js";
34
+ import { elementResizer as $t } from "../../element-resizer/vanilla/index.js";
35
+ import { s as Pe } from "../../gestures-D2Fdra_G.js";
36
+ import { f as le } from "../../dom-0S_WDL4g.js";
37
+ import { d as Le } from "../../function-C10DGppn.js";
38
+ import { ScrollSegmentElement as ze } from "../../scroll-segment/index.js";
39
+ var m, Dt, v, et, T, N;
40
+ class ke {
41
+ constructor(n, e, i) {
42
+ s(this, m);
43
+ s(this, Dt);
44
+ s(this, v);
45
+ s(this, et, 0);
46
+ s(this, T, 0);
47
+ s(this, N, null);
48
+ h(this, m, n), h(this, Dt, e), h(this, v, i), bt.register(t(this, m));
48
49
  }
49
50
  get index() {
50
- return t(this, bs);
51
+ return t(this, Dt);
51
52
  }
52
53
  get size() {
53
- return t(this, It);
54
+ return t(this, et);
54
55
  }
55
56
  get position() {
56
- return t(this, X);
57
+ return t(this, T);
57
58
  }
58
59
  destroy() {
59
- Yt.unregister(t(this, b)), t(this, b).style.transform = "", this.mark(null);
60
+ bt.unregister(t(this, m)), t(this, m).style.transform = "", this.mark(null);
60
61
  }
61
62
  setSize(n) {
62
- n ? (t(this, b).style.setProperty("--size", n + "px"), t(this, C).axisCSSProperty.current === "x" ? (t(this, b).style.width = n + "px", t(this, b).style.height = "") : (t(this, b).style.height = n + "px", t(this, b).style.width = "")) : (t(this, b).style.width = "", t(this, b).style.height = "", t(this, b).style.removeProperty("--size"));
63
+ n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, v).axisCSSProperty.current === "x" ? (t(this, m).style.width = n + "px", t(this, m).style.height = "") : (t(this, m).style.height = n + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
63
64
  }
64
65
  resize() {
65
- r(this, It, t(this, C).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), r(this, X, t(this, C).vertical ? Rs(t(this, b)) : As(t(this, b))), r(this, X, t(this, X) - t(this, C).contentPosition);
66
+ h(this, et, t(this, v).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, T, t(this, v).vertical ? Gt(t(this, m)) : Kt(t(this, m))), h(this, T, t(this, T) - t(this, v).contentPosition);
66
67
  }
67
68
  transform() {
68
69
  let n = 0;
69
- const s = t(this, C).viewportSize * t(this, C).sectionDistanceScaleCSSProperty.current;
70
- t(this, C).loopCSSProperty.current && t(this, C).overscroll && t(this, X) + t(this, It) < t(this, C).currentScrollValue && (n = t(this, C).distance * -1 - t(this, C).gap), Yt.update(
71
- t(this, b),
72
- t(this, C).axisCSSProperty.current,
70
+ const e = t(this, v).viewportSize * t(this, v).sectionDistanceScaleCSSProperty.current;
71
+ t(this, v).loopCSSProperty.current && t(this, v).overscroll && t(this, T) + t(this, et) < t(this, v).currentScrollValue && (n = t(this, v).distance * -1 - t(this, v).gap), bt.update(
72
+ t(this, m),
73
+ t(this, v).axisCSSProperty.current,
73
74
  n
74
75
  );
75
- const e = t(this, C).currentScrollValue + n, h = t(this, X) - t(this, C).viewportSize - s, a = t(this, X) + t(this, It) + s, g = Ys(e, h, a);
76
- t(this, C).vertical ? t(this, b).style.transform = `translate3d(0px, ${g * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${g * -1}px, 0px, 0px)`;
76
+ const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, et) + e, b = he(i, r, c);
77
+ t(this, v).vertical ? t(this, m).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
77
78
  }
78
79
  mark(n) {
79
- t(this, ft) !== n && (t(this, ft) && t(this, b).classList.remove(t(this, ft)), n && t(this, b).classList.add(n), r(this, ft, n), Q(t(this, b), "scrollSectionMarkChange", {
80
+ t(this, N) !== n && (t(this, N) && t(this, m).classList.remove(t(this, N)), n && t(this, m).classList.add(n), h(this, N, n), Ut(t(this, m), "scrollSectionMarkChange", {
80
81
  composed: !0,
81
82
  detail: {
82
- mark: t(this, ft)
83
+ mark: t(this, N)
83
84
  },
84
85
  custom: !0
85
86
  }));
86
87
  }
87
88
  }
88
- b = new WeakMap(), bs = new WeakMap(), C = new WeakMap(), It = new WeakMap(), X = new WeakMap(), ft = new WeakMap();
89
- const ze = Xs({
89
+ m = new WeakMap(), Dt = new WeakMap(), v = new WeakMap(), et = new WeakMap(), T = new WeakMap(), N = new WeakMap();
90
+ const De = ne({
90
91
  ":host": {
91
92
  position: "relative",
92
93
  width: "100%",
@@ -119,306 +120,306 @@ const ze = Xs({
119
120
  flexShrink: "0"
120
121
  }
121
122
  });
122
- var f, Mt, I, Y, tt, U, st, pt, mt, G, k, Tt, Ot, Ht, Bt, es, K, $t, St, _, bt, et, gt, Wt, qt, Nt, p, is, l, gs, vs, E, v, M, Z, vt, it, L, y, rs, yt, Ut, Gt, hs, rt, u, Ss, ss, Bs, $s, Ws, qs, T, ys, ie, ns, Cs, Ns, Rt, Us;
123
- class Hs extends HTMLElement {
123
+ var a, st, P, V, R, k, H, U, G, D, E, it, rt, nt, ht, St, A, ot, K, I, _, O, Z, lt, ct, ut, p, gt, o, At, It, y, S, L, M, j, B, C, g, vt, J, at, dt, yt, F, l, zt, mt, _t, Zt, jt, Jt, z, Mt, ce, Ct, Tt, Qt, tt, Xt;
124
+ class kt extends HTMLElement {
124
125
  constructor() {
125
126
  super();
126
- i(this, u);
127
- i(this, f, null);
128
- i(this, Mt, new c(this, "--controls", !0));
129
- i(this, I, new c(this, "--axis", "y"));
130
- i(this, Y, new c(this, "--direction", 0));
131
- i(this, tt, new c(this, "--pages", 0, {
132
- validate: (s) => Math.max(0, s - 1)
127
+ s(this, l);
128
+ s(this, a, null);
129
+ s(this, st, new f(this, "--controls", !0));
130
+ s(this, P, new f(this, "--axis", "y"));
131
+ s(this, V, new f(this, "--direction", 0));
132
+ s(this, R, new f(this, "--pages", 0, {
133
+ validate: (e) => Math.max(0, e - 1)
133
134
  }));
134
- i(this, U, new c(this, "--split", !1));
135
- i(this, st, new c(this, "--sectional", !1));
136
- i(this, pt, new c(this, "--auto-size", !1));
137
- i(this, mt, new c(
135
+ s(this, k, new f(this, "--split", !1));
136
+ s(this, H, new f(this, "--sectional", !1));
137
+ s(this, U, new f(this, "--auto-size", !1));
138
+ s(this, G, new f(
138
139
  this,
139
140
  "--wheel-max-delta",
140
141
  !1
141
142
  ));
142
- i(this, G, new c(
143
+ s(this, D, new f(
143
144
  this,
144
145
  "--sections-in-view",
145
146
  1
146
147
  ));
147
- i(this, k, new c(this, "--loop", !1));
148
- i(this, Tt, new c(this, "--damping", 20));
149
- i(this, Ot, new c(this, "--mass", 0));
150
- i(this, Ht, new c(this, "--stiffness", 0));
151
- i(this, Bt, new c(this, "--mouse-drag", !1));
152
- i(this, es, new c(
148
+ s(this, E, new f(this, "--loop", !1));
149
+ s(this, it, new f(this, "--damping", 20));
150
+ s(this, rt, new f(this, "--mass", 0));
151
+ s(this, nt, new f(this, "--stiffness", 0));
152
+ s(this, ht, new f(this, "--mouse-drag", !1));
153
+ s(this, St, new f(
153
154
  this,
154
155
  "--section-distance-scale",
155
156
  0.5
156
157
  ));
157
- i(this, K, new c(this, "--autoplay", 0));
158
- i(this, $t, new c(
158
+ s(this, A, new f(this, "--autoplay", 0));
159
+ s(this, ot, new f(
159
160
  this,
160
161
  "--autoplay-pause-duration",
161
162
  0
162
163
  ));
163
- i(this, St, new c(
164
+ s(this, K, new f(
164
165
  this,
165
166
  "--autoplay-user-direction",
166
167
  !1
167
168
  ));
168
- i(this, _, new c(this, "--classes", !1));
169
- i(this, bt, new c(
169
+ s(this, I, new f(this, "--classes", !1));
170
+ s(this, _, new f(
170
171
  this,
171
172
  "--current-index-start-offset",
172
173
  0
173
174
  ));
174
- i(this, et, new c(
175
+ s(this, O, new f(
175
176
  this,
176
177
  "--current-index-end-offset",
177
178
  0
178
179
  ));
179
- i(this, gt, new c(this, "--focus-delay", 0));
180
- i(this, Wt, new c(
180
+ s(this, Z, new f(this, "--focus-delay", 0));
181
+ s(this, lt, new f(
181
182
  this,
182
183
  "--focus-duration",
183
184
  3e3
184
185
  ));
185
- i(this, qt, new c(this, "--disabled", !1));
186
- i(this, Nt, new c(this, "--hibernated", !1));
187
- i(this, p, null);
188
- i(this, is, null);
189
- i(this, l, []);
190
- i(this, gs, 0);
191
- i(this, vs, 0);
192
- i(this, E, 0);
193
- i(this, v, 0);
194
- i(this, M, 0);
195
- i(this, Z, null);
196
- i(this, vt, null);
197
- i(this, it, null);
198
- i(this, L, null);
199
- i(this, y, new Dt(0));
200
- i(this, rs, 0);
201
- i(this, yt, 0);
202
- i(this, Ut, !0);
203
- i(this, Gt, !0);
204
- i(this, hs);
205
- i(this, rt, new ve());
206
- i(this, T, () => {
207
- t(this, f).unlistenAnimationFrame();
208
- const s = this.currentScrollValue / t(this, v) || 0, e = t(this, y).current;
209
- if (r(this, gs, this.vertical ? Rs(this) : As(this)), r(this, vs, this.vertical ? Rs(t(this, p)) : As(t(this, p))), r(this, E, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? r(this, M, Qs.parse(
186
+ s(this, ct, new f(this, "--disabled", !1));
187
+ s(this, ut, new f(this, "--hibernated", !1));
188
+ s(this, p, null);
189
+ s(this, gt, null);
190
+ s(this, o, []);
191
+ s(this, At, 0);
192
+ s(this, It, 0);
193
+ s(this, y, 0);
194
+ s(this, S, 0);
195
+ s(this, L, 0);
196
+ s(this, M, null);
197
+ s(this, j, null);
198
+ s(this, B, null);
199
+ s(this, C, null);
200
+ s(this, g, new me(0));
201
+ s(this, vt, 0);
202
+ s(this, J, 0);
203
+ s(this, at, !0);
204
+ s(this, dt, !0);
205
+ s(this, yt);
206
+ s(this, F, new ve());
207
+ s(this, z, () => {
208
+ t(this, a).unlistenAnimationFrame();
209
+ const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
210
+ if (h(this, At, this.vertical ? Gt(this) : Kt(this)), h(this, It, this.vertical ? Gt(t(this, p)) : Kt(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, re.parse(
210
211
  getComputedStyle(t(this, p)).rowGap
211
- )) : r(this, M, Qs.parse(
212
+ )) : h(this, L, re.parse(
212
213
  getComputedStyle(t(this, p)).columnGap
213
- )), t(this, pt).current && t(this, l).length) {
214
- const h = t(this, G).current, a = (t(this, E) - t(this, M) * (h - 1)) / h;
215
- t(this, l).forEach((g) => {
216
- g.setSize(a);
214
+ )), t(this, U).current && t(this, o).length) {
215
+ const r = t(this, D).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
216
+ t(this, o).forEach((b) => {
217
+ b.setSize(c);
217
218
  });
218
219
  } else
219
- t(this, l).forEach((h) => {
220
- h.setSize();
220
+ t(this, o).forEach((r) => {
221
+ r.setSize();
221
222
  });
222
- if (t(this, l).forEach((h) => {
223
- h.resize();
224
- }), t(this, tt).current) {
225
- r(this, v, t(this, E) * t(this, tt).current);
226
- const h = t(this, v) + t(this, E);
227
- this.vertical ? (t(this, p).style.width = h + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = h + "px", t(this, p).style.width = "100%");
223
+ if (t(this, o).forEach((r) => {
224
+ r.resize();
225
+ }), t(this, R).current) {
226
+ h(this, S, t(this, y) * t(this, R).current);
227
+ const r = t(this, S) + t(this, y);
228
+ 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%");
228
229
  } else
229
- this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", r(this, v, t(this, p).offsetHeight - t(this, E))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", r(this, v, t(this, p).offsetWidth - t(this, E)));
230
- if (!t(this, k).current) {
231
- const h = getComputedStyle(this), a = this.vertical ? parseFloat(h.paddingBlockStart) + parseFloat(h.paddingBlockEnd) : parseFloat(h.paddingInlineStart) + parseFloat(h.paddingInlineEnd);
232
- r(this, v, t(this, v) + a), t(this, f).max = t(this, v);
230
+ this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, S, t(this, p).offsetHeight - t(this, y))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, S, t(this, p).offsetWidth - t(this, y)));
231
+ if (!t(this, E).current) {
232
+ const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
233
+ h(this, S, t(this, S) + c), t(this, a).max = t(this, S);
233
234
  }
234
- if (t(this, k).current && t(this, l).length) {
235
- const h = t(this, l)[t(this, l).length - 1], a = h.position + h.size - t(this, E), g = t(this, v) - a;
236
- r(this, yt, h.position + h.size + g);
235
+ if (t(this, E).current && t(this, o).length) {
236
+ const r = t(this, o)[t(this, o).length - 1], c = r.position + r.size - t(this, y), b = t(this, S) - c;
237
+ h(this, J, r.position + r.size + b);
237
238
  } else
238
- r(this, yt, t(this, v));
239
- if (t(this, st).current && t(this, l).length) {
240
- const h = t(this, l)[e];
241
- t(this, f).set(h.position, {
239
+ h(this, J, t(this, S));
240
+ if (t(this, H).current && t(this, o).length) {
241
+ const r = t(this, o)[i];
242
+ t(this, a).set(r.position, {
242
243
  equalize: !0
243
244
  });
244
245
  } else
245
- t(this, f).set(s * t(this, v), {
246
+ t(this, a).set(e * t(this, S), {
246
247
  equalize: !0
247
248
  });
248
249
  });
249
- i(this, ys, () => {
250
- const s = this.currentScrollValue;
251
- if (r(this, rs, Math.max(0, s - t(this, v))), t(this, l).length) {
252
- let e = 0;
253
- for (let h = 0; h < t(this, l).length; h++) {
254
- const a = t(this, l)[h];
255
- a.transform(), this.targetScrollValue + a.size / 2 >= a.position && (e = h);
250
+ s(this, Mt, () => {
251
+ const e = this.currentScrollValue;
252
+ if (h(this, vt, Math.max(0, e - t(this, S))), t(this, o).length) {
253
+ let i = 0;
254
+ for (let r = 0; r < t(this, o).length; r++) {
255
+ const c = t(this, o)[r];
256
+ c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i = r);
256
257
  }
257
- t(this, y).current = e;
258
+ t(this, g).current = i;
258
259
  } else
259
- this.vertical ? t(this, p).style.transform = `translate3d(0px, ${s * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${s * -1}px, 0px, 0px)`;
260
- Yt.update(
260
+ this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
261
+ bt.update(
261
262
  this,
262
- t(this, I).current,
263
- s
263
+ t(this, P).current,
264
+ e
264
265
  );
265
266
  });
266
- i(this, ns, (s, e) => {
267
- t(this, Mt).current && (t(this, St).current && (t(this, L).pauseAndContinue(
268
- t(this, $t).current
269
- ), t(this, L).direction = Math.sign(e) || 1), t(this, Cs).call(this, s, e));
267
+ s(this, Ct, (e, i) => {
268
+ t(this, st).current && (t(this, K).current && (t(this, C).pauseAndContinue(
269
+ t(this, ot).current
270
+ ), t(this, C).direction = Math.sign(i) || 1), t(this, Tt).call(this, e, i));
270
271
  });
271
- i(this, Cs, (s, e) => {
272
- if (t(this, Y).current) {
273
- if (t(this, Y).current < 0 && e > 0)
272
+ s(this, Tt, (e, i) => {
273
+ if (t(this, V).current) {
274
+ if (t(this, V).current < 0 && i > 0)
274
275
  return;
275
- if (t(this, Y).current > 0 && e < 0)
276
+ if (t(this, V).current > 0 && i < 0)
276
277
  return;
277
278
  }
278
- if (t(this, rt).unlistenAnimationFrame(), !t(this, K).current && t(this, gt).current && (clearInterval(t(this, hs)), r(this, hs, setTimeout(() => {
279
- const h = o(this, u, Us).call(this);
280
- h && this.scrollToSection(h.index, {
279
+ if (t(this, F).unlistenAnimationFrame(), !t(this, A).current && t(this, Z).current && (clearInterval(t(this, yt)), h(this, yt, setTimeout(() => {
280
+ const r = d(this, l, Xt).call(this);
281
+ r && this.scrollToSection(r.index, {
281
282
  tween: {
282
- duration: t(this, Wt).current,
283
+ duration: t(this, lt).current,
283
284
  easing: be
284
285
  }
285
286
  });
286
- }, t(this, gt).current))), !(s === "drag" && !Ee.isMobile && !t(this, Bt).current))
287
- if (t(this, st).current) {
288
- const h = Math.sign(e);
289
- t(this, l).length ? this.shiftSections(h) : t(this, f).shift(h * t(this, E));
287
+ }, t(this, Z).current))), !(e === "drag" && !we.isMobile && !t(this, ht).current))
288
+ if (t(this, H).current) {
289
+ const r = Math.sign(i);
290
+ t(this, o).length ? this.shiftSections(r) : t(this, a).shift(r * t(this, y));
290
291
  } else
291
- t(this, f).shift(e);
292
+ t(this, a).shift(i);
292
293
  });
293
- if (Ms) {
294
- const s = this.attachShadow({ mode: "open" });
295
- s.adoptedStyleSheets.push(ze);
296
- const e = document.createElement("div");
297
- e.className = "static", e.innerHTML = '<slot name="static"></slot>', s.appendChild(e), r(this, p, document.createElement("div")), t(this, p).className = "content", r(this, is, document.createElement("slot")), t(this, p).appendChild(t(this, is)), s.appendChild(t(this, p));
294
+ if (qt) {
295
+ const e = this.attachShadow({ mode: "open" });
296
+ e.adoptedStyleSheets.push(De);
297
+ const i = document.createElement("div");
298
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, gt, document.createElement("slot")), t(this, p).appendChild(t(this, gt)), e.appendChild(t(this, p));
298
299
  }
299
300
  }
300
301
  get damped() {
301
- return t(this, f);
302
+ return t(this, a);
302
303
  }
303
304
  get controlsCSSProperty() {
304
- return t(this, Mt);
305
+ return t(this, st);
305
306
  }
306
307
  get axisCSSProperty() {
307
- return t(this, I);
308
+ return t(this, P);
308
309
  }
309
310
  get directionCSSProperty() {
310
- return t(this, Y);
311
+ return t(this, V);
311
312
  }
312
313
  get pagesCSSProperty() {
313
- return t(this, tt);
314
+ return t(this, R);
314
315
  }
315
316
  get splitCSSProperty() {
316
- return t(this, U);
317
+ return t(this, k);
317
318
  }
318
319
  get sectionalCSSProperty() {
319
- return t(this, st);
320
+ return t(this, H);
320
321
  }
321
322
  get autoSizeCSSProperty() {
322
- return t(this, pt);
323
+ return t(this, U);
323
324
  }
324
325
  get wheelMaxDeltaCSSProperty() {
325
- return t(this, mt);
326
+ return t(this, G);
326
327
  }
327
328
  get sectionsInViewCSSProperty() {
328
- return t(this, G);
329
+ return t(this, D);
329
330
  }
330
331
  get loopCSSProperty() {
331
- return t(this, k);
332
+ return t(this, E);
332
333
  }
333
334
  get dampingCSSProperty() {
334
- return t(this, Tt);
335
+ return t(this, it);
335
336
  }
336
337
  get massCSSProperty() {
337
- return t(this, Ot);
338
+ return t(this, rt);
338
339
  }
339
340
  get stiffnessCSSProperty() {
340
- return t(this, Ht);
341
+ return t(this, nt);
341
342
  }
342
343
  get mouseDragCSSProperty() {
343
- return t(this, Bt);
344
+ return t(this, ht);
344
345
  }
345
346
  get sectionDistanceScaleCSSProperty() {
346
- return t(this, es);
347
+ return t(this, St);
347
348
  }
348
349
  get autoplayCSSProperty() {
349
- return t(this, K);
350
+ return t(this, A);
350
351
  }
351
352
  get autoplayPauseDurationCSSProperty() {
352
- return t(this, $t);
353
+ return t(this, ot);
353
354
  }
354
355
  get autoplayUserDirectionCSSProperty() {
355
- return t(this, St);
356
+ return t(this, K);
356
357
  }
357
358
  get classesCSSProperty() {
358
- return t(this, _);
359
+ return t(this, I);
359
360
  }
360
361
  get currentIndexStartOffsetCSSProperty() {
361
- return t(this, bt);
362
+ return t(this, _);
362
363
  }
363
364
  get currentIndexEndOffsetCSSProperty() {
364
- return t(this, et);
365
+ return t(this, O);
365
366
  }
366
367
  get focusDelayCSSProperty() {
367
- return t(this, gt);
368
+ return t(this, Z);
368
369
  }
369
370
  get focusDurationCSSProperty() {
370
- return t(this, Wt);
371
+ return t(this, lt);
371
372
  }
372
373
  get disabledCSSProperty() {
373
- return t(this, qt);
374
+ return t(this, ct);
374
375
  }
375
376
  get hibernatedCSSProperty() {
376
- return t(this, Nt);
377
+ return t(this, ut);
377
378
  }
378
379
  get currentScrollValue() {
379
- return o(this, u, Ns).call(this, "current");
380
+ return d(this, l, Qt).call(this, "current");
380
381
  }
381
382
  get targetScrollValue() {
382
- return o(this, u, Ns).call(this, "target");
383
+ return d(this, l, Qt).call(this, "target");
383
384
  }
384
385
  get contentElement() {
385
386
  return t(this, p);
386
387
  }
387
388
  get sections() {
388
- return t(this, l);
389
+ return t(this, o);
389
390
  }
390
391
  get position() {
391
- return t(this, gs);
392
+ return t(this, At);
392
393
  }
393
394
  get contentPosition() {
394
- return t(this, vs);
395
+ return t(this, It);
395
396
  }
396
397
  get viewportSize() {
397
- return t(this, E);
398
+ return t(this, y);
398
399
  }
399
400
  get scrollSize() {
400
- return t(this, v);
401
+ return t(this, S);
401
402
  }
402
403
  get gap() {
403
- return t(this, M);
404
+ return t(this, L);
404
405
  }
405
406
  get counter() {
406
- return t(this, y);
407
+ return t(this, g);
407
408
  }
408
409
  get limit() {
409
- return t(this, l).length - t(this, G).current;
410
+ return t(this, o).length - t(this, D).current;
410
411
  }
411
412
  get distance() {
412
- return t(this, yt);
413
+ return t(this, J);
413
414
  }
414
415
  get loopDistance() {
415
- return t(this, k).current ? t(this, yt) + t(this, M) : t(this, yt);
416
+ return t(this, E).current ? t(this, J) + t(this, L) : t(this, J);
416
417
  }
417
418
  get overscroll() {
418
- return t(this, rs);
419
+ return t(this, vt);
419
420
  }
420
421
  get vertical() {
421
- return t(this, I).current === "y";
422
+ return t(this, P).current === "y";
422
423
  }
423
424
  get currentProgress() {
424
425
  return this.currentScrollValue / this.loopDistance || 0;
@@ -427,212 +428,212 @@ class Hs extends HTMLElement {
427
428
  return this.targetScrollValue / this.loopDistance || 0;
428
429
  }
429
430
  get scrollWidth() {
430
- return t(this, I).current === "y" ? 0 : t(this, f).distance;
431
+ return t(this, P).current === "y" ? 0 : t(this, a).distance;
431
432
  }
432
433
  get scrollHeight() {
433
- return t(this, I).current === "x" ? 0 : t(this, f).distance;
434
+ return t(this, P).current === "x" ? 0 : t(this, a).distance;
434
435
  }
435
- onScroll(...s) {
436
- return t(this, f).subscribe(...s);
436
+ onScroll(...e) {
437
+ return t(this, a).subscribe(...e);
437
438
  }
438
- offScroll(...s) {
439
- t(this, f).unsubscribe(...s);
439
+ offScroll(...e) {
440
+ t(this, a).unsubscribe(...e);
440
441
  }
441
442
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
442
- range(s, e, h = 0) {
443
- const a = s - h, g = a + e + h * 2;
444
- return this.currentProgress < a ? 0 : this.currentProgress > g ? 1 : (this.currentProgress - a) / (g - a);
443
+ range(e, i, r = 0) {
444
+ const c = e - r, b = c + i + r * 2;
445
+ return this.currentProgress < c ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - c) / (b - c);
445
446
  }
446
- curve(s, e, h = 0) {
447
- return Math.sin(this.range(s, e, h) * Math.PI);
447
+ curve(e, i, r = 0) {
448
+ return Math.sin(this.range(e, i, r) * Math.PI);
448
449
  }
449
- visible(s, e, h = 0) {
450
- const a = s - h, g = a + e + h * 2;
451
- return this.currentProgress >= a && this.currentProgress <= g;
450
+ visible(e, i, r = 0) {
451
+ const c = e - r, b = c + i + r * 2;
452
+ return this.currentProgress >= c && this.currentProgress <= b;
452
453
  }
453
- scrollToSection(s, e) {
454
- if (!t(this, l).length)
454
+ scrollToSection(e, i) {
455
+ if (!t(this, o).length)
455
456
  return;
456
- const h = t(this, y).current;
457
- o(this, u, ie).call(this, s);
458
- const a = t(this, l)[h], g = t(this, l)[t(this, y).current];
459
- if (a && g) {
460
- let A = 0;
461
- const ts = o(this, u, Us).call(this), fe = ts ? this.targetScrollValue - ts.position : 0;
462
- t(this, k).current ? t(this, y).current === 0 && h === t(this, l).length - 1 ? A = t(this, v) + t(this, E) - a.position + t(this, M) : t(this, y).current === t(this, l).length - 1 && h === 0 ? A = g.position - (t(this, v) + t(this, E) + t(this, M)) : A = g.position - a.position : A = g.position - a.position, this.shiftPosition(A - fe, e);
457
+ const r = t(this, g).current;
458
+ d(this, l, ce).call(this, e);
459
+ const c = t(this, o)[r], b = t(this, o)[t(this, g).current];
460
+ if (c && b) {
461
+ let w = 0;
462
+ const ft = d(this, l, Xt).call(this), ae = ft ? this.targetScrollValue - ft.position : 0;
463
+ t(this, E).current ? t(this, g).current === 0 && r === t(this, o).length - 1 ? w = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, o).length - 1 && r === 0 ? w = b.position - (t(this, S) + t(this, y) + t(this, L)) : w = b.position - c.position : w = b.position - c.position, this.shiftPosition(w - ae, i);
463
464
  }
464
465
  }
465
- shiftSections(s, e) {
466
- t(this, l).length && this.scrollToSection(t(this, y).current + s, e);
466
+ shiftSections(e, i) {
467
+ t(this, o).length && this.scrollToSection(t(this, g).current + e, i);
467
468
  }
468
- setPosition(s, e) {
469
- e != null && e.tween ? (t(this, rt).set(t(this, f).current, { equalize: !0 }), t(this, rt).set(s, Js({}, e.tween))) : t(this, f).set(s, {
470
- equalize: (e == null ? void 0 : e.behaviour) === "instant"
469
+ setPosition(e, i) {
470
+ i != null && i.tween ? (t(this, F).set(t(this, a).current, { equalize: !0 }), t(this, F).set(e, ie({}, i.tween))) : t(this, a).set(e, {
471
+ equalize: (i == null ? void 0 : i.behaviour) === "instant"
471
472
  });
472
473
  }
473
- shiftPosition(s, e) {
474
- this.setPosition(t(this, f).target + s, e);
474
+ shiftPosition(e, i) {
475
+ this.setPosition(t(this, a).target + e, i);
475
476
  }
476
477
  connectedCallback() {
477
- r(this, f, new se(0, {
478
+ h(this, a, new ge(0, {
478
479
  damping: 0.01,
479
480
  min: 0,
480
- order: te.SCROLL
481
- })), this.setAttribute("tabindex", "0"), r(this, Z, new ye({ element: t(this, p) })), t(this, Z).changeEvent.subscribe(t(this, ns)), r(this, vt, new Ce({
481
+ order: Se.SCROLL
482
+ })), this.setAttribute("tabindex", "0"), h(this, M, new ye({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Ct)), h(this, j, new Ce({
482
483
  element: this
483
- })), t(this, vt).changeEvent.subscribe(
484
- t(this, ns)
485
- ), r(this, it, new Pe({ element: t(this, p) })), t(this, it).changeEvent.subscribe(t(this, ns)), r(this, L, new we({
484
+ })), t(this, j).changeEvent.subscribe(
485
+ t(this, Ct)
486
+ ), h(this, B, new Ee({ element: t(this, p) })), t(this, B).changeEvent.subscribe(t(this, Ct)), h(this, C, new xe({
486
487
  culling: this
487
- })), t(this, L).changeEvent.subscribe(t(this, Cs)), t(this, I).subscribe(({ current: s }) => {
488
- t(this, p).style.flexDirection = s === "x" ? "row" : "column", t(this, Z).axis = t(this, mt).current ? "max" : s, t(this, vt).dimension = s === "x" ? "width" : "height", t(this, it).axis = s, s === "x" ? this.style.touchAction = "pan-y" : s === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, T).call(this);
489
- }), t(this, mt).subscribe((s) => {
490
- t(this, Z).axis = s.current ? "max" : t(this, I).current;
491
- }), t(this, tt).subscribe(() => {
492
- this.isConnected && t(this, T).call(this);
493
- }), t(this, U).subscribe(({ current: s }) => {
494
- this.isConnected && (s ? o(this, u, Ss).call(this) : o(this, u, ss).call(this));
495
- }), t(this, st).subscribe((s) => {
496
- t(this, Z).debounce = s.current, t(this, it).swipe = s.current, t(this, L).interval = s.current, this.isConnected && (s.current && !s.previous && !t(this, l).length ? o(this, u, Ss).call(this) : !s.current && s.previous && t(this, l).length && o(this, u, ss).call(this));
497
- }), t(this, pt).subscribe((s) => {
498
- this.isConnected && (t(this, T).call(this), s.current && !s.previous && !t(this, l).length ? o(this, u, Ss).call(this) : !s.current && s.previous && t(this, l).length && o(this, u, ss).call(this));
499
- }), t(this, G).subscribe((s) => {
500
- this.isConnected && (t(this, T).call(this), o(this, u, Rt).call(this));
501
- }), t(this, k).subscribe((s) => {
502
- s.current ? (this.isConnected && (t(this, l).length || (t(this, U).current = !0)), t(this, l).length && (t(this, f).max = 1 / 0, t(this, f).min = -1 / 0)) : (r(this, rs, 0), t(this, f).max = t(this, v), t(this, f).min = 0);
503
- }), t(this, Tt).subscribe((s) => {
504
- t(this, f).damping = s.current;
505
- }), t(this, Ot).subscribe((s) => {
506
- t(this, f).mass = s.current;
507
- }), t(this, Ht).subscribe((s) => {
508
- t(this, f).stiffness = s.current;
509
- }), t(this, qt).subscribe((s) => {
510
- s.current && !s.previous ? o(this, u, Bs).call(this) : !s.current && s.previous && o(this, u, $s).call(this);
511
- }), t(this, Nt).subscribe((s) => {
512
- s.current && !s.previous ? o(this, u, Ws).call(this) : !s.current && s.previous && o(this, u, qs).call(this);
513
- }), t(this, K).subscribe((s) => {
514
- t(this, L).speed = s.current, s.current && !s.previous ? t(this, L).connect() : !s.current && s.previous && t(this, L).disconnect();
515
- }), t(this, St).subscribe((s) => {
516
- s.current || (t(this, L).direction = 1);
517
- }), t(this, _).subscribe((s) => {
518
- this.isConnected && o(this, u, Rt).call(this);
519
- }), t(this, bt).subscribe((s) => {
520
- this.isConnected && t(this, _).current && o(this, u, Rt).call(this);
521
- }), t(this, et).subscribe((s) => {
522
- this.isConnected && t(this, _).current && o(this, u, Rt).call(this);
523
- }), t(this, f).isRunning.subscribe((s) => {
524
- this.classList.toggle("active", s.current);
525
- }), t(this, y).subscribe((s) => {
526
- t(this, l).length && o(this, u, Rt).call(this);
527
- }), t(this, rt).subscribe((s) => {
528
- t(this, rt).isRunning.current && t(this, f).set(s.current);
529
- }), t(this, Mt).observe(), t(this, I).observe(), t(this, Y).observe(), t(this, tt).observe(), t(this, U).observe(), t(this, st).observe(), t(this, pt).observe(), t(this, mt).observe(), t(this, G).observe(), t(this, k).observe(), t(this, Tt).observe(), t(this, Ot).observe(), t(this, Ht).observe(), t(this, Bt).observe(), t(this, es).observe(), t(this, K).observe(), t(this, K).observe(), t(this, $t).observe(), t(this, St).observe(), t(this, _).observe(), t(this, bt).observe(), t(this, et).observe(), t(this, gt).observe(), t(this, Wt).observe(), t(this, qt).observe(), t(this, Nt).observe(), o(this, u, qs).call(this);
488
+ })), t(this, C).changeEvent.subscribe(t(this, Tt)), t(this, P).subscribe(({ current: e }) => {
489
+ t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, G).current ? "max" : e, t(this, j).dimension = e === "x" ? "width" : "height", t(this, B).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
490
+ }), t(this, G).subscribe((e) => {
491
+ t(this, M).axis = e.current ? "max" : t(this, P).current;
492
+ }), t(this, R).subscribe(() => {
493
+ this.isConnected && t(this, z).call(this);
494
+ }), t(this, k).subscribe(({ current: e }) => {
495
+ this.isConnected && (e ? d(this, l, zt).call(this) : d(this, l, mt).call(this));
496
+ }), t(this, H).subscribe((e) => {
497
+ t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, o).length ? d(this, l, zt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, mt).call(this));
498
+ }), t(this, U).subscribe((e) => {
499
+ this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, o).length ? d(this, l, zt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, mt).call(this));
500
+ }), t(this, D).subscribe((e) => {
501
+ this.isConnected && (t(this, z).call(this), d(this, l, tt).call(this));
502
+ }), t(this, E).subscribe((e) => {
503
+ e.current ? (this.isConnected && (t(this, o).length || (t(this, k).current = !0)), t(this, o).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (h(this, vt, 0), t(this, a).max = t(this, S), t(this, a).min = 0);
504
+ }), t(this, it).subscribe((e) => {
505
+ t(this, a).damping = e.current;
506
+ }), t(this, rt).subscribe((e) => {
507
+ t(this, a).mass = e.current;
508
+ }), t(this, nt).subscribe((e) => {
509
+ t(this, a).stiffness = e.current;
510
+ }), t(this, ct).subscribe((e) => {
511
+ e.current && !e.previous ? d(this, l, _t).call(this) : !e.current && e.previous && d(this, l, Zt).call(this);
512
+ }), t(this, ut).subscribe((e) => {
513
+ e.current && !e.previous ? d(this, l, jt).call(this) : !e.current && e.previous && d(this, l, Jt).call(this);
514
+ }), t(this, A).subscribe((e) => {
515
+ t(this, C).speed = e.current, e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
516
+ }), t(this, K).subscribe((e) => {
517
+ e.current || (t(this, C).direction = 1);
518
+ }), t(this, I).subscribe((e) => {
519
+ this.isConnected && d(this, l, tt).call(this);
520
+ }), t(this, _).subscribe((e) => {
521
+ this.isConnected && t(this, I).current && d(this, l, tt).call(this);
522
+ }), t(this, O).subscribe((e) => {
523
+ this.isConnected && t(this, I).current && d(this, l, tt).call(this);
524
+ }), t(this, a).isRunning.subscribe((e) => {
525
+ this.classList.toggle("active", e.current);
526
+ }), t(this, g).subscribe((e) => {
527
+ t(this, o).length && d(this, l, tt).call(this);
528
+ }), t(this, F).subscribe((e) => {
529
+ t(this, F).isRunning.current && t(this, a).set(e.current);
530
+ }), t(this, st).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, k).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, D).observe(), t(this, E).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, St).observe(), t(this, A).observe(), t(this, A).observe(), t(this, ot).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, ut).observe(), d(this, l, Jt).call(this);
530
531
  }
531
532
  disconnectedCallback() {
532
- this.setAttribute("tabindex", ""), t(this, Mt).unobserve(), t(this, I).unobserve(), t(this, Y).unobserve(), t(this, tt).unobserve(), t(this, U).unobserve(), t(this, st).unobserve(), t(this, pt).unobserve(), t(this, mt).unobserve(), t(this, G).unobserve(), t(this, k).unobserve(), t(this, Tt).unobserve(), t(this, Ot).unobserve(), t(this, Ht).unobserve(), t(this, Bt).unobserve(), t(this, es).unobserve(), t(this, K).unobserve(), t(this, $t).unobserve(), t(this, St).unobserve(), t(this, _).unobserve(), t(this, bt).unobserve(), t(this, et).unobserve(), t(this, gt).unobserve(), t(this, Wt).unobserve(), t(this, qt).unobserve(), t(this, Nt).unobserve(), o(this, u, Ws).call(this);
533
+ this.setAttribute("tabindex", ""), t(this, st).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, k).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, D).unobserve(), t(this, E).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, St).unobserve(), t(this, A).unobserve(), t(this, ot).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), t(this, ut).unobserve(), d(this, l, jt).call(this);
533
534
  }
534
535
  }
535
- f = new WeakMap(), Mt = new WeakMap(), I = new WeakMap(), Y = new WeakMap(), tt = new WeakMap(), U = new WeakMap(), st = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), G = new WeakMap(), k = new WeakMap(), Tt = new WeakMap(), Ot = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), es = new WeakMap(), K = new WeakMap(), $t = new WeakMap(), St = new WeakMap(), _ = new WeakMap(), bt = new WeakMap(), et = new WeakMap(), gt = new WeakMap(), Wt = new WeakMap(), qt = new WeakMap(), Nt = new WeakMap(), p = new WeakMap(), is = new WeakMap(), l = new WeakMap(), gs = new WeakMap(), vs = new WeakMap(), E = new WeakMap(), v = new WeakMap(), M = new WeakMap(), Z = new WeakMap(), vt = new WeakMap(), it = new WeakMap(), L = new WeakMap(), y = new WeakMap(), rs = new WeakMap(), yt = new WeakMap(), Ut = new WeakMap(), Gt = new WeakMap(), hs = new WeakMap(), rt = new WeakMap(), u = new WeakSet(), Ss = function() {
536
- o(this, u, ss).call(this), t(this, is).assignedElements().forEach((s, e) => {
537
- s instanceof HTMLElement && t(this, l).push(new Ve(s, e, this));
538
- }), t(this, p).style.transform = "", Q(this, "scrollSectionsChange", {
536
+ a = new WeakMap(), st = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), k = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), D = new WeakMap(), E = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), St = new WeakMap(), A = new WeakMap(), ot = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), p = new WeakMap(), gt = new WeakMap(), o = new WeakMap(), At = new WeakMap(), It = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), j = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), J = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), yt = new WeakMap(), F = new WeakMap(), l = new WeakSet(), zt = function() {
537
+ d(this, l, mt).call(this), t(this, gt).assignedElements().forEach((e, i) => {
538
+ e instanceof HTMLElement && t(this, o).push(new ke(e, i, this));
539
+ }), t(this, p).style.transform = "", Ut(this, "scrollSectionsChange", {
539
540
  custom: !0,
540
541
  composed: !0
541
- }), t(this, T).call(this), o(this, u, Rt).call(this);
542
- }, ss = function() {
543
- t(this, l).forEach((s) => {
544
- s.destroy();
545
- }), r(this, l, []), t(this, y).current = 0, t(this, f).reset(), Q(this, "scrollSectionsChange", {
542
+ }), t(this, z).call(this), d(this, l, tt).call(this);
543
+ }, mt = function() {
544
+ t(this, o).forEach((e) => {
545
+ e.destroy();
546
+ }), h(this, o, []), t(this, g).current = 0, t(this, a).reset(), Ut(this, "scrollSectionsChange", {
546
547
  custom: !0,
547
548
  composed: !0
548
549
  });
549
- }, Bs = function() {
550
- t(this, Ut) || (r(this, Ut, !0), t(this, f).unsubscribe(t(this, ys)), t(this, f).unlistenAnimationFrame(), t(this, Z).disconnect(), t(this, vt).disconnect(), t(this, it).disconnect(), t(this, L).disconnect(), clearInterval(t(this, hs)), t(this, rt).unlistenAnimationFrame());
551
- }, $s = function() {
552
- t(this, Ut) && (r(this, Ut, !1), t(this, f).subscribe(t(this, ys)), t(this, Z).connect(), t(this, vt).connect(), t(this, it).connect(), t(this, K).current && t(this, L).connect());
553
- }, Ws = function() {
554
- t(this, Gt) || (r(this, Gt, !0), ms.unsubscribe(t(this, T)), Is.unsubscribe(t(this, T)), t(this, f).reset(), o(this, u, Bs).call(this), t(this, p).style.transform = "", t(this, U).current && o(this, u, ss).call(this), Yt.unregister(this));
555
- }, qs = function() {
556
- t(this, Gt) && (r(this, Gt, !1), t(this, U).current && o(this, u, Ss).call(this), Yt.register(this), ms.subscribe(t(this, T), Ks.SCROLL), Is.subscribe(this, t(this, T)), o(this, u, $s).call(this));
557
- }, T = new WeakMap(), ys = new WeakMap(), ie = function(s) {
558
- t(this, k).current ? (t(this, y).current = s % t(this, l).length, t(this, y).current = t(this, y).current < 0 ? t(this, l).length + t(this, y).current : t(this, y).current) : t(this, y).current = Ys(s, 0, this.limit);
559
- }, ns = new WeakMap(), Cs = new WeakMap(), Ns = function(s = "current") {
560
- if (t(this, k).current && t(this, l).length) {
561
- const e = t(this, f)[s] % (t(this, v) + t(this, E) + t(this, M));
562
- return e < 0 ? t(this, v) + e + t(this, E) + t(this, M) : e;
550
+ }, _t = function() {
551
+ t(this, at) || (h(this, at, !0), t(this, a).unsubscribe(t(this, Mt)), t(this, a).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, j).disconnect(), t(this, B).disconnect(), t(this, C).disconnect(), clearInterval(t(this, yt)), t(this, F).unlistenAnimationFrame());
552
+ }, Zt = function() {
553
+ t(this, at) && (h(this, at, !1), t(this, a).subscribe(t(this, Mt)), t(this, M).connect(), t(this, j).connect(), t(this, B).connect(), t(this, A).current && t(this, C).connect());
554
+ }, jt = function() {
555
+ t(this, dt) || (h(this, dt, !0), Wt.unsubscribe(t(this, z)), $t.unsubscribe(t(this, z)), t(this, a).reset(), d(this, l, _t).call(this), t(this, p).style.transform = "", t(this, k).current && d(this, l, mt).call(this), bt.unregister(this));
556
+ }, Jt = function() {
557
+ t(this, dt) && (h(this, dt, !1), t(this, k).current && d(this, l, zt).call(this), bt.register(this), Wt.subscribe(t(this, z), oe.SCROLL), $t.subscribe(this, t(this, z)), d(this, l, Zt).call(this));
558
+ }, z = new WeakMap(), Mt = new WeakMap(), ce = function(e) {
559
+ t(this, E).current ? (t(this, g).current = e % t(this, o).length, t(this, g).current = t(this, g).current < 0 ? t(this, o).length + t(this, g).current : t(this, g).current) : t(this, g).current = he(e, 0, this.limit);
560
+ }, Ct = new WeakMap(), Tt = new WeakMap(), Qt = function(e = "current") {
561
+ if (t(this, E).current && t(this, o).length) {
562
+ const i = t(this, a)[e] % (t(this, S) + t(this, y) + t(this, L));
563
+ return i < 0 ? t(this, S) + i + t(this, y) + t(this, L) : i;
563
564
  } else
564
- return t(this, f)[s];
565
- }, Rt = function() {
566
- if (t(this, _).current && t(this, l).length) {
567
- const s = t(this, y).current + t(this, bt).current;
568
- s === 0 ? this.classList.add("start") : this.classList.remove("start"), s === this.limit ? this.classList.add("end") : this.classList.remove("end");
569
- const e = t(this, G).current + t(this, et).current;
570
- t(this, l).forEach((h, a) => {
571
- const g = s - this.limit - 1 + t(this, et).current, A = s + e, ts = this.sections.length - A;
572
- a >= s && a < A || a <= g ? h.mark("current") : a >= A && a < A + ts / 2 || a <= g + e ? h.mark("next") : h.mark("previous");
565
+ return t(this, a)[e];
566
+ }, tt = function() {
567
+ if (t(this, I).current && t(this, o).length) {
568
+ const e = t(this, g).current + t(this, _).current;
569
+ e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
570
+ const i = t(this, D).current + t(this, O).current;
571
+ t(this, o).forEach((r, c) => {
572
+ const b = e - this.limit - 1 + t(this, O).current, w = e + i, ft = this.sections.length - w;
573
+ c >= e && c < w || c <= b ? r.mark("current") : c >= w && c < w + ft / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
573
574
  });
574
575
  }
575
- }, Us = function() {
576
- let s = null, e = 1 / 0;
577
- for (let h = 0; h < t(this, l).length; h++) {
578
- const a = Math.abs(t(this, l)[h].position - this.targetScrollValue);
579
- a < e && (e = a, s = h);
576
+ }, Xt = function() {
577
+ let e = null, i = 1 / 0;
578
+ for (let r = 0; r < t(this, o).length; r++) {
579
+ const c = Math.abs(t(this, o)[r].position - this.targetScrollValue);
580
+ c < i && (i = c, e = r);
580
581
  }
581
- return s !== null ? t(this, l)[s] : null;
582
+ return e !== null ? t(this, o)[e] : null;
582
583
  };
583
- customElements.get("e-scroll") || customElements.define("e-scroll", Hs);
584
- var Ps;
585
- class Ts extends HTMLElement {
584
+ customElements.get("e-scroll") || customElements.define("e-scroll", kt);
585
+ var Vt;
586
+ class Yt extends HTMLElement {
586
587
  constructor() {
587
588
  super(...arguments);
588
- i(this, Ps, null);
589
+ s(this, Vt, null);
589
590
  }
590
591
  get scrollElement() {
591
- return t(this, Ps);
592
+ return t(this, Vt);
592
593
  }
593
594
  connectedCallback() {
594
- const s = Le(this, Hs);
595
- s instanceof Hs ? r(this, Ps, s) : console.error(this, "e-scroll not found");
595
+ const e = le(this, kt);
596
+ e instanceof kt ? h(this, Vt, e) : console.error(this, "e-scroll not found");
596
597
  }
597
598
  }
598
- Ps = new WeakMap();
599
- var Ct, D, ht, nt, os, cs, Kt, ws, Es, xs;
600
- class Fe extends Ts {
599
+ Vt = new WeakMap();
600
+ var Q, x, W, $, Et, xt, pt, Rt, Ht, Ot;
601
+ class Ae extends Yt {
601
602
  constructor() {
602
603
  super();
603
- i(this, Ct, null);
604
- i(this, D, null);
605
- i(this, ht, !1);
606
- i(this, nt, 0);
607
- i(this, os, 0);
608
- i(this, cs, 0);
609
- i(this, Kt, () => {
610
- r(this, ht, this.offsetWidth > this.offsetHeight);
611
- const s = t(this, ht) ? this.offsetWidth : this.offsetHeight;
612
- r(this, nt, s / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / s)), r(this, nt, Math.max(t(this, nt), 30)), t(this, ht) ? (t(this, D).style.width = t(this, nt) + "px", t(this, D).style.height = "100%") : (t(this, D).style.width = "100%", t(this, D).style.height = t(this, nt) + "px"), r(this, os, s - t(this, nt)), this.scrollElement.scrollSize || (this.style.display = "none");
604
+ s(this, Q, null);
605
+ s(this, x, null);
606
+ s(this, W, !1);
607
+ s(this, $, 0);
608
+ s(this, Et, 0);
609
+ s(this, xt, 0);
610
+ s(this, pt, () => {
611
+ h(this, W, this.offsetWidth > this.offsetHeight);
612
+ const e = t(this, W) ? this.offsetWidth : this.offsetHeight;
613
+ h(this, $, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, $, Math.max(t(this, $), 30)), t(this, W) ? (t(this, x).style.width = t(this, $) + "px", t(this, x).style.height = "100%") : (t(this, x).style.width = "100%", t(this, x).style.height = t(this, $) + "px"), h(this, Et, e - t(this, $)), this.scrollElement.scrollSize || (this.style.display = "none");
613
614
  });
614
- i(this, ws, () => {
615
- r(this, cs, this.scrollElement.currentProgress * t(this, os)), t(this, ht) ? t(this, D).style.transform = `translate3d(${t(this, cs)}px, 0px, 0px)` : t(this, D).style.transform = `translate3d(0px, ${t(this, cs)}px, 0px)`;
615
+ s(this, Rt, () => {
616
+ h(this, xt, this.scrollElement.currentProgress * t(this, Et)), t(this, W) ? t(this, x).style.transform = `translate3d(${t(this, xt)}px, 0px, 0px)` : t(this, x).style.transform = `translate3d(0px, ${t(this, xt)}px, 0px)`;
616
617
  });
617
- i(this, Es, () => {
618
+ s(this, Ht, () => {
618
619
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
619
620
  });
620
- i(this, xs, (s) => {
621
- document.documentElement.classList.add("grabbing"), xe(
622
- (a) => {
623
- const g = t(this, ht) ? a.x : a.y, A = this.scrollElement.distance / t(this, os), ts = (g - h) * A;
624
- this.scrollElement.setPosition(e + ts);
621
+ s(this, Ot, (e) => {
622
+ document.documentElement.classList.add("grabbing"), Pe(
623
+ (c) => {
624
+ const b = t(this, W) ? c.x : c.y, w = this.scrollElement.distance / t(this, Et), ft = (b - r) * w;
625
+ this.scrollElement.setPosition(i + ft);
625
626
  },
626
627
  () => {
627
628
  document.documentElement.classList.remove("grabbing");
628
629
  }
629
630
  );
630
- const e = this.scrollElement.damped.target, h = t(this, ht) ? s.x : s.y;
631
+ const i = this.scrollElement.damped.target, r = t(this, W) ? e.x : e.y;
631
632
  });
632
- if (Ms) {
633
- const s = this.attachShadow({ mode: "open" });
634
- s.adoptedStyleSheets.push(
635
- Xs({
633
+ if (qt) {
634
+ const e = this.attachShadow({ mode: "open" });
635
+ e.adoptedStyleSheets.push(
636
+ ne({
636
637
  ":host": {
637
638
  display: "inline-block",
638
639
  zIndex: "1",
@@ -661,466 +662,119 @@ class Fe extends Ts {
661
662
  touchAction: "none"
662
663
  }
663
664
  })
664
- ), r(this, Ct, document.createElement("slot")), t(this, Ct).innerHTML = '<div class="default-thumb"></div>', s.appendChild(t(this, Ct));
665
+ ), h(this, Q, document.createElement("slot")), t(this, Q).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, Q));
665
666
  }
666
667
  }
667
668
  get thumbElement() {
668
- return t(this, D);
669
+ return t(this, x);
669
670
  }
670
671
  connectedCallback() {
671
672
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
672
- const s = t(this, Ct).assignedElements()[0] || t(this, Ct).firstElementChild;
673
- r(this, D, s), t(this, D).addEventListener("pointerdown", t(this, xs)), ms.subscribe(t(this, Kt), Ks.SCROLL), Is.subscribe(this, t(this, Kt)), this.scrollElement.onScroll(t(this, ws)), this.scrollElement.axisCSSProperty.subscribe(t(this, Es));
673
+ const e = t(this, Q).assignedElements()[0] || t(this, Q).firstElementChild;
674
+ h(this, x, e), t(this, x).addEventListener("pointerdown", t(this, Ot)), Wt.subscribe(t(this, pt), oe.SCROLL), $t.subscribe(this, t(this, pt)), this.scrollElement.onScroll(t(this, Rt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ht));
674
675
  }
675
676
  disconnectedCallback() {
676
- this.removeAttribute("drag-dead-zone"), t(this, D).removeEventListener("pointerdown", t(this, xs)), ms.unsubscribe(t(this, Kt)), Is.unsubscribe(t(this, Kt)), this.scrollElement.offScroll(t(this, ws)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Es));
677
+ this.removeAttribute("drag-dead-zone"), t(this, x).removeEventListener("pointerdown", t(this, Ot)), Wt.unsubscribe(t(this, pt)), $t.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Rt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Ht));
677
678
  }
678
679
  }
679
- Ct = new WeakMap(), D = new WeakMap(), ht = new WeakMap(), nt = new WeakMap(), os = new WeakMap(), cs = new WeakMap(), Kt = new WeakMap(), ws = new WeakMap(), Es = new WeakMap(), xs = new WeakMap();
680
- customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Fe);
681
- class re extends Ts {
680
+ Q = new WeakMap(), x = new WeakMap(), W = new WeakMap(), $ = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), pt = new WeakMap(), Rt = new WeakMap(), Ht = new WeakMap(), Ot = new WeakMap();
681
+ customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ae);
682
+ class ue extends Yt {
682
683
  constructor() {
683
- super(), Ms && this.addEventListener("click", () => {
684
+ super(), qt && this.addEventListener("click", () => {
684
685
  this.handleClick();
685
686
  });
686
687
  }
687
688
  }
688
- class ke extends re {
689
+ class Ie extends ue {
689
690
  handleClick() {
690
- const n = this.getAttribute("index"), s = this.getAttribute("behaviour");
691
- this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: s });
691
+ const n = this.getAttribute("index"), e = this.getAttribute("behaviour");
692
+ this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: e });
692
693
  }
693
694
  }
694
- customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", ke);
695
- class De extends re {
695
+ customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Ie);
696
+ class Me extends ue {
696
697
  handleClick() {
697
- const n = this.getAttribute("step"), s = this.getAttribute("behaviour");
698
- this.scrollElement.shiftSections(parseInt(n || "1"), { behaviour: s });
698
+ const n = this.getAttribute("step"), e = this.getAttribute("behaviour");
699
+ this.scrollElement.shiftSections(parseInt(n || "1"), { behaviour: e });
699
700
  }
700
701
  }
701
- customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", De);
702
- var ot, Pt, ls, Ls, Vs, us;
703
- class Re {
704
- constructor(n, s, e) {
705
- i(this, ot, null);
706
- i(this, Pt, null);
707
- i(this, ls, null);
708
- i(this, Ls, null);
709
- i(this, Vs, () => {
710
- t(this, Pt).scrollToSection(t(this, ls), {
711
- behaviour: t(this, Ls)
702
+ customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Me);
703
+ var q, X, wt, Bt, Ft, Pt;
704
+ class Te {
705
+ constructor(n, e, i) {
706
+ s(this, q, null);
707
+ s(this, X, null);
708
+ s(this, wt, null);
709
+ s(this, Bt, null);
710
+ s(this, Ft, () => {
711
+ t(this, X).scrollToSection(t(this, wt), {
712
+ behaviour: t(this, Bt)
712
713
  });
713
714
  });
714
- i(this, us, () => {
715
- t(this, ot).classList.toggle(
715
+ s(this, Pt, () => {
716
+ t(this, q).classList.toggle(
716
717
  "current",
717
- t(this, Pt).counter.current === t(this, ls)
718
+ t(this, X).counter.current === t(this, wt)
718
719
  );
719
720
  });
720
- Ms && (r(this, ot, document.createElement("button")), r(this, Pt, n), r(this, Ls, e), r(this, ls, s), t(this, ot).addEventListener("click", t(this, Vs)), t(this, Pt).counter.subscribe(t(this, us)), t(this, us).call(this));
721
+ qt && (h(this, q, document.createElement("button")), h(this, X, n), h(this, Bt, i), h(this, wt, e), t(this, q).addEventListener("click", t(this, Ft)), t(this, X).counter.subscribe(t(this, Pt)), t(this, Pt).call(this));
721
722
  }
722
723
  get element() {
723
- return t(this, ot);
724
+ return t(this, q);
724
725
  }
725
726
  destroy() {
726
- t(this, ot).removeEventListener("click", t(this, Vs)), t(this, Pt).counter.unsubscribe(t(this, us)), t(this, ot).remove();
727
+ t(this, q).removeEventListener("click", t(this, Ft)), t(this, X).counter.unsubscribe(t(this, Pt)), t(this, q).remove();
727
728
  }
728
729
  }
729
- ot = new WeakMap(), Pt = new WeakMap(), ls = new WeakMap(), Ls = new WeakMap(), Vs = new WeakMap(), us = new WeakMap();
730
- var wt, as;
731
- class Ae extends Ts {
730
+ q = new WeakMap(), X = new WeakMap(), wt = new WeakMap(), Bt = new WeakMap(), Ft = new WeakMap(), Pt = new WeakMap();
731
+ var Y, Lt;
732
+ class Ve extends Yt {
732
733
  constructor() {
733
734
  super(...arguments);
734
- i(this, wt, []);
735
- i(this, as, ee(() => {
736
- t(this, wt).forEach((s) => s.destroy()), r(this, wt, []);
737
- for (let s = 0; s < this.scrollElement.sections.length; s++) {
738
- const e = new Re(
735
+ s(this, Y, []);
736
+ s(this, Lt, Le(() => {
737
+ t(this, Y).forEach((e) => e.destroy()), h(this, Y, []);
738
+ for (let e = 0; e < this.scrollElement.sections.length; e++) {
739
+ const i = new Te(
739
740
  this.scrollElement,
740
- s,
741
+ e,
741
742
  this.getAttribute("behaviour") || "smooth"
742
743
  );
743
- this.appendChild(e.element), t(this, wt).push(e);
744
+ this.appendChild(i.element), t(this, Y).push(i);
744
745
  }
745
746
  }, 0));
746
747
  }
747
748
  connectedCallback() {
748
749
  super.connectedCallback(), this.scrollElement.addEventListener(
749
750
  "sectionsChange",
750
- t(this, as)
751
- ), t(this, as).call(this);
751
+ t(this, Lt)
752
+ ), t(this, Lt).call(this);
752
753
  }
753
754
  disconnectedCallback() {
754
755
  this.scrollElement.removeEventListener(
755
756
  "sectionsChange",
756
- t(this, as)
757
- ), t(this, wt).forEach((s) => s.destroy()), r(this, wt, []);
757
+ t(this, Lt)
758
+ ), t(this, Y).forEach((e) => e.destroy()), h(this, Y, []);
758
759
  }
759
760
  }
760
- wt = new WeakMap(), as = new WeakMap();
761
- customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Ae);
762
- var _t, Zt, jt, Jt, Et, xt, Lt, Vt, V, O, H, B, zt, x, ct, lt, ds, ut, at, dt, w, $, W, j, J, q, zs, m, Qt, Xt, Fs, z, Ft, R, F, N, fs, kt, P, S, he, ne, oe, ce, le, ue, ks, ps, At, ae, de, Gs, Ds;
763
- class Ie extends Ts {
764
- constructor() {
765
- super(...arguments);
766
- i(this, S);
767
- i(this, _t, new c(this, "--damping", 20));
768
- i(this, Zt, new c(this, "--mass", 0));
769
- i(this, jt, new c(this, "--stiffness", 0));
770
- i(this, Jt, new c(this, "--target", ""));
771
- i(this, Et, new c(this, "--disabled", !1));
772
- i(this, xt, new c(
773
- this,
774
- "--distance-offset",
775
- 0,
776
- { rawValueCheck: !1 }
777
- ));
778
- i(this, Lt, new c(this, "--start-offset", 0, {
779
- rawValueCheck: !1
780
- }));
781
- i(this, Vt, new c(
782
- this,
783
- "--capture-once",
784
- !1
785
- ));
786
- i(this, V, new c(this, "--captured", ""));
787
- i(this, O, new c(this, "--released", ""));
788
- i(this, H, new c(
789
- this,
790
- "--captured-from-start",
791
- ""
792
- ));
793
- i(this, B, new c(
794
- this,
795
- "--captured-from-finish",
796
- ""
797
- ));
798
- i(this, zt, new c(
799
- this,
800
- "--released-from-start",
801
- ""
802
- ));
803
- i(this, x, new c(
804
- this,
805
- "--released-from-finish",
806
- ""
807
- ));
808
- i(this, ct, new c(this, "--passed-var", ""));
809
- i(this, lt, new c(this, "--progress-var", ""));
810
- i(this, ds, new c(
811
- this,
812
- "--animation-var-type",
813
- "current"
814
- ));
815
- i(this, ut, new c(this, "--distance-var", ""));
816
- i(this, at, new c(this, "--start-var", ""));
817
- i(this, dt, new c(this, "--finish-var", ""));
818
- i(this, w, new Dt(!1));
819
- i(this, $, new Dt(!1));
820
- i(this, W, new Dt(!1));
821
- i(this, j, new Dt(!1));
822
- i(this, J, new Dt(!1));
823
- i(this, q, new Dt(!1));
824
- i(this, zs, []);
825
- i(this, m, this);
826
- i(this, Qt, 0);
827
- i(this, Xt, 0);
828
- i(this, Fs, 0);
829
- i(this, z, new se(0, { order: te.SEGMENT, min: 0, max: 1 }));
830
- i(this, Ft, 0);
831
- i(this, R, 0);
832
- i(this, F, 0);
833
- i(this, N, 0);
834
- i(this, fs, !1);
835
- i(this, kt, !1);
836
- i(this, P, !0);
837
- i(this, ks, () => {
838
- t(this, P) || (this.resize(), t(this, ps).call(this));
839
- });
840
- i(this, ps, () => {
841
- !t(this, P) && t(this, fs) && this.tick();
842
- });
843
- i(this, Ds, ee(() => {
844
- const s = Yt.getAll(this).reverse();
845
- let e = 0;
846
- s.forEach((h, a) => {
847
- h.element === this.scrollElement && (e = a);
848
- }), r(this, zs, s.slice(e + 1));
849
- }, 0));
850
- }
851
- get distanceOffsetCSSProperty() {
852
- return t(this, xt);
853
- }
854
- get startOffsetCSSProperty() {
855
- return t(this, Lt);
856
- }
857
- get captureOnceCSSProperty() {
858
- return t(this, Vt);
859
- }
860
- get capturedCSSProperty() {
861
- return t(this, V);
862
- }
863
- get releasedCSSProperty() {
864
- return t(this, O);
865
- }
866
- get capturedFromStartCSSProperty() {
867
- return t(this, H);
868
- }
869
- get capturedFromFinishCSSProperty() {
870
- return t(this, B);
871
- }
872
- get releasedFromStartCSSProperty() {
873
- return t(this, zt);
874
- }
875
- get releasedFromFinishCSSProperty() {
876
- return t(this, x);
877
- }
878
- get passedVarCSSProperty() {
879
- return t(this, ct);
880
- }
881
- get progressVarCSSProperty() {
882
- return t(this, lt);
883
- }
884
- get animationVarTypeCSSProperty() {
885
- return t(this, ds);
886
- }
887
- get distanceVarCSSProperty() {
888
- return t(this, ut);
889
- }
890
- get startVarCSSProperty() {
891
- return t(this, at);
892
- }
893
- get finishVarCSSProperty() {
894
- return t(this, dt);
895
- }
896
- get disabledCSSProperty() {
897
- return t(this, Et);
898
- }
899
- get dampingCSSProperty() {
900
- return t(this, _t);
901
- }
902
- get massCSSProperty() {
903
- return t(this, Zt);
904
- }
905
- get stiffnessCSSProperty() {
906
- return t(this, jt);
907
- }
908
- get targetCSSProperty() {
909
- return t(this, Jt);
910
- }
911
- get isCaptured() {
912
- return t(this, w);
913
- }
914
- get isReleased() {
915
- return t(this, $);
916
- }
917
- get isCapturedFromStart() {
918
- return t(this, W);
919
- }
920
- get isReleasedFromStart() {
921
- return t(this, j);
922
- }
923
- get isCapturedFromFinish() {
924
- return t(this, J);
925
- }
926
- get isReleasedFromFinish() {
927
- return t(this, q);
928
- }
929
- get directionPosition() {
930
- return t(this, Qt);
931
- }
932
- get directionSize() {
933
- return t(this, Xt);
934
- }
935
- get passed() {
936
- return t(this, z);
937
- }
938
- get progress() {
939
- return t(this, Ft);
940
- }
941
- get start() {
942
- return t(this, R);
943
- }
944
- get finish() {
945
- return t(this, N);
946
- }
947
- get distance() {
948
- return t(this, F);
949
- }
950
- get isCapturedOnce() {
951
- return t(this, kt);
952
- }
953
- get isDisabled() {
954
- return t(this, P);
955
- }
956
- resize() {
957
- r(this, Xt, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), r(this, Qt, this.scrollElement.vertical ? Rs(this, this.scrollElement) : As(this, this.scrollElement)), r(this, R, this.getStart()), r(this, F, this.getDistance()), r(this, R, t(this, R) + t(this, Lt).current), r(this, F, t(this, F) + t(this, xt).current), r(this, N, t(this, R) + t(this, F)), this.scrollElement.currentScrollValue > t(this, N) && !t(this, w).current && !t(this, $).current && (t(this, w).current = !0), this.setVar(t(this, at).current, t(this, R)), this.setVar(t(this, dt).current, t(this, N)), this.setVar(t(this, ut).current, t(this, F)), t(this, z).max = t(this, F), r(this, fs, !0);
958
- }
959
- tick() {
960
- let s = this.scrollElement.currentScrollValue;
961
- t(this, zs).forEach((h) => {
962
- s += h.value;
963
- }), t(this, z).set(s - t(this, R));
964
- const e = Math.round(s);
965
- t(this, w).current && (e >= t(this, R) ? t(this, W).current || o(this, S, oe).call(this) : t(this, W).current && !t(this, j).current && o(this, S, le).call(this), e < t(this, N) ? t(this, q).current && !t(this, J).current && o(this, S, ce).call(this) : t(this, W).current && !t(this, q).current && o(this, S, ue).call(this)), e >= t(this, R) && e < t(this, N) ? t(this, w).current || o(this, S, he).call(this) : t(this, w).current && (t(this, z).set(
966
- ge(t(this, F) / 2, t(this, z).target, 0, t(this, F))
967
- ), o(this, S, ne).call(this)), t(this, kt) && t(this, Vt).current && (t(this, V).current && t(this, m).classList.add(t(this, V).current), r(this, P, !0));
968
- }
969
- disable() {
970
- this.style.cssText = "", r(this, Qt, 0), r(this, Xt, 0), t(this, z).reset(), r(this, Ft, 0), r(this, R, 0), r(this, F, 0), r(this, N, 0), r(this, fs, !1), t(this, w).current = !1, t(this, $).current = !1, t(this, W).current = !1, t(this, j).current = !1, t(this, J).current = !1, t(this, q).current = !1, r(this, kt, !1), r(this, P, !0), o(this, S, Gs).call(this);
971
- }
972
- enable() {
973
- r(this, P, !1);
974
- }
761
+ Y = new WeakMap(), Lt = new WeakMap();
762
+ customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Ve);
763
+ class Re extends ze {
975
764
  connectedCallback() {
976
- super.connectedCallback(), t(this, w).subscribe((e) => {
977
- e.current && Q(this, "scrollSegmentCapture", {
978
- composed: !0,
979
- custom: !0
980
- });
981
- }), t(this, W).subscribe((e) => {
982
- e.current && Q(this, "scrollSegmentCaptureFromStart", {
983
- composed: !0,
984
- custom: !0
985
- });
986
- }), t(this, J).subscribe((e) => {
987
- e.current && Q(this, "scrollSegmentCaptureFromFinish", {
988
- composed: !0,
989
- custom: !0
990
- });
991
- }), t(this, $).subscribe((e) => {
992
- e.current && Q(this, "scrollSegmentRelease", {
993
- composed: !0,
994
- custom: !0
995
- });
996
- }), t(this, j).subscribe((e) => {
997
- e.current && Q(this, "scrollSegmentReleaseFromStart", {
998
- composed: !0,
999
- custom: !0
1000
- });
1001
- }), t(this, q).subscribe((e) => {
1002
- e.current && Q(this, "scrollSegmentReleaseFromFinish", {
1003
- composed: !0,
1004
- custom: !0
1005
- });
1006
- }), t(this, _t).observe(), t(this, Zt).observe(), t(this, jt).observe(), t(this, Jt).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Lt).observe(), t(this, Vt).observe(), t(this, V).observe(), t(this, O).observe(), t(this, H).observe(), t(this, B).observe(), t(this, zt).observe(), t(this, x).observe(), t(this, ct).observe(), t(this, lt).observe(), t(this, ds).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, dt).observe();
1007
- let s = !1;
1008
- this.scrollElement.addEventListener(
765
+ const n = le(this, kt);
766
+ n instanceof kt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
1009
767
  "scrollSectionsChange",
1010
- t(this, Ds)
1011
- ), t(this, Ds).call(this), t(this, Et).current || this.enable(), t(this, _t).subscribe((e) => {
1012
- t(this, z).damping = e.current;
1013
- }), t(this, Zt).subscribe((e) => {
1014
- t(this, z).mass = e.current;
1015
- }), t(this, jt).subscribe((e) => {
1016
- t(this, z).stiffness = e.current;
1017
- }), t(this, Jt).subscribe((e) => {
1018
- e.previous && o(this, S, Gs).call(this), e.current ? e.current === "parent" ? r(this, m, this.parentElement || this) : r(this, m, document.querySelector(e.current) || this) : r(this, m, this);
1019
- }), t(this, Et).subscribe((e) => {
1020
- e.current && !e.previous ? this.disable() : !e.current && e.previous && (this.resize(), this.enable());
1021
- }), t(this, Lt).subscribe(() => {
1022
- s && !t(this, P) && this.resize();
1023
- }), t(this, xt).subscribe(() => {
1024
- s && !t(this, P) && this.resize();
1025
- }), t(this, V).subscribe((e) => {
1026
- o(this, S, At).call(this, e);
1027
- }), t(this, H).subscribe((e) => {
1028
- o(this, S, At).call(this, e);
1029
- }), t(this, B).subscribe((e) => {
1030
- o(this, S, At).call(this, e);
1031
- }), t(this, O).subscribe((e) => {
1032
- o(this, S, At).call(this, e);
1033
- }), t(this, zt).subscribe((e) => {
1034
- o(this, S, At).call(this, e);
1035
- }), t(this, x).subscribe((e) => {
1036
- o(this, S, At).call(this, e);
1037
- }), t(this, Vt).subscribe((e) => {
1038
- t(this, P) || !e.current && e.previous && (this.resize(), this.enable());
1039
- }), t(this, ct).subscribe((e) => {
1040
- t(this, P) || (this.removeVar(e.previous), this.setVar(e.current, this.passed.current));
1041
- }), t(this, lt).subscribe((e) => {
1042
- t(this, P) || (this.removeVar(e.previous), this.setVar(e.current, t(this, Ft)));
1043
- }), t(this, at).subscribe((e) => {
1044
- t(this, P) || (this.removeVar(e.previous), this.setVar(e.current, t(this, R)));
1045
- }), t(this, dt).subscribe((e) => {
1046
- t(this, P) || (this.removeVar(e.previous), this.setVar(e.current, t(this, N)));
1047
- }), t(this, ut).subscribe((e) => {
1048
- t(this, P) || (this.removeVar(e.previous), this.setVar(e.current, t(this, F)));
1049
- }), t(this, z).subscribe((e) => {
1050
- const h = t(this, z)[t(this, ds).current];
1051
- r(this, Ft, h / t(this, F) || 0), this.setVar(t(this, ct).current, h.toFixed(6)), this.setVar(
1052
- t(this, lt).current,
1053
- t(this, Ft).toFixed(6)
1054
- );
1055
- }), ms.subscribe(t(this, ks), Ks.SCROLL), this.scrollElement.onScroll(t(this, ps)), s = !0;
1056
- }
1057
- disconnectedCallback() {
1058
- ms.unsubscribe(t(this, ks)), this.scrollElement.offScroll(t(this, ps)), t(this, _t).close(), t(this, Zt).close(), t(this, jt).close(), t(this, Jt).close(), t(this, Et).close(), t(this, xt).close(), t(this, Lt).close(), t(this, Vt).close(), t(this, V).close(), t(this, O).close(), t(this, H).close(), t(this, B).close(), t(this, zt).close(), t(this, x).close(), t(this, ct).close(), t(this, lt).close(), t(this, ut).close(), t(this, at).close(), t(this, dt).close(), t(this, w).close(), t(this, $).close(), t(this, W).close(), t(this, j).close(), t(this, J).close(), t(this, q).close(), this.disable();
1059
- }
1060
- removeVar(s) {
1061
- s && t(this, m).style.removeProperty(`--${s}`);
1062
- }
1063
- setVar(s, e) {
1064
- s && t(this, m).style.setProperty(`--${s}`, e.toString());
1065
- }
1066
- getDistance() {
1067
- return t(this, Xt) + t(this, Fs);
1068
- }
1069
- getStart() {
1070
- return t(this, Qt) - t(this, Fs);
768
+ this.findAnotherScrollEntries
769
+ )) : console.error(this, "e-scroll not found");
1071
770
  }
1072
771
  }
1073
- _t = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Lt = new WeakMap(), Vt = new WeakMap(), V = new WeakMap(), O = new WeakMap(), H = new WeakMap(), B = new WeakMap(), zt = new WeakMap(), x = new WeakMap(), ct = new WeakMap(), lt = new WeakMap(), ds = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), w = new WeakMap(), $ = new WeakMap(), W = new WeakMap(), j = new WeakMap(), J = new WeakMap(), q = new WeakMap(), zs = new WeakMap(), m = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap(), Fs = new WeakMap(), z = new WeakMap(), Ft = new WeakMap(), R = new WeakMap(), F = new WeakMap(), N = new WeakMap(), fs = new WeakMap(), kt = new WeakMap(), P = new WeakMap(), S = new WeakSet(), he = function() {
1074
- t(this, w).current = !0, t(this, $).current = !1, r(this, kt, !0), t(this, O).current && t(this, m).classList.remove(t(this, O).current), t(this, x).current && t(this, m).classList.remove(
1075
- t(this, x).current
1076
- ), t(this, x).current && t(this, m).classList.remove(
1077
- t(this, x).current
1078
- ), t(this, V).current && t(this, m).classList.add(t(this, V).current);
1079
- }, ne = function() {
1080
- t(this, $).current = !0, t(this, w).current = !1, r(this, kt, !0), t(this, V).current && t(this, m).classList.remove(t(this, V).current), t(this, H).current && t(this, m).classList.remove(
1081
- t(this, H).current
1082
- ), t(this, B).current && t(this, m).classList.remove(
1083
- t(this, B).current
1084
- ), t(this, O).current && t(this, m).classList.add(t(this, O).current);
1085
- }, oe = function() {
1086
- t(this, w).current = !0, t(this, W).current = !0, t(this, j).current = !1, t(this, H).current && t(this, m).classList.add(
1087
- t(this, H).current
1088
- );
1089
- }, ce = function() {
1090
- t(this, w).current = !0, t(this, J).current = !0, t(this, q).current = !1, t(this, B).current && t(this, m).classList.add(
1091
- t(this, B).current
1092
- );
1093
- }, le = function() {
1094
- t(this, $).current = !0, t(this, j).current = !0, t(this, W).current = !1, t(this, x).current && t(this, m).classList.add(
1095
- t(this, x).current
1096
- );
1097
- }, ue = function() {
1098
- t(this, $).current = !0, t(this, q).current = !0, t(this, J).current = !1, t(this, x).current && t(this, m).classList.add(
1099
- t(this, x).current
1100
- );
1101
- }, ks = new WeakMap(), ps = new WeakMap(), At = function(s) {
1102
- if (t(this, P)) {
1103
- s.previous && t(this, m).classList.remove(s.previous), s.current && t(this, m).classList.remove(s.current);
1104
- return;
1105
- }
1106
- s.current && t(this, w).current ? (s.previous && t(this, m).classList.remove(s.previous), t(this, m).classList.add(s.current)) : !s.current && s.previous && t(this, m).classList.remove(s.previous);
1107
- }, ae = function(...s) {
1108
- s.forEach((e) => {
1109
- e && t(this, m).classList.remove(e);
1110
- });
1111
- }, de = function(...s) {
1112
- s.forEach((e) => {
1113
- e && t(this, m).style.removeProperty(`--${e}`);
1114
- });
1115
- }, Gs = function() {
1116
- o(this, S, ae).call(this, t(this, V).current, t(this, H).current, t(this, B).current, t(this, O).current, t(this, zt).current, t(this, x).current), o(this, S, de).call(this, t(this, ct).current, t(this, lt).current, t(this, ut).current, t(this, at).current, t(this, dt).current);
1117
- }, Ds = new WeakMap();
1118
- customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Ie);
772
+ customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Re);
1119
773
  export {
1120
- Ae as ScrollBulletButtonsElement,
1121
- Hs as ScrollElement,
1122
- Ie as ScrollSegmentElement,
1123
- ke as ScrollSetButtonElement,
1124
- De as ScrollStepButtonElement,
1125
- Fe as ScrollbarElement
774
+ Ve as ScrollBulletButtonsElement,
775
+ kt as ScrollElement,
776
+ Re as ScrollSegmentElement,
777
+ Ie as ScrollSetButtonElement,
778
+ Me as ScrollStepButtonElement,
779
+ Ae as ScrollbarElement
1126
780
  };