aptechka 0.50.22 → 0.50.24

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,23 +1,23 @@
1
1
  var We = Object.defineProperty;
2
- var ke = Object.getOwnPropertySymbols;
2
+ var ze = Object.getOwnPropertySymbols;
3
3
  var Fe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
4
- var ze = (u) => {
4
+ var Ie = (u) => {
5
5
  throw TypeError(u);
6
6
  };
7
- var Ie = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Me = (u, n) => {
7
+ var ke = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Me = (u, n) => {
8
8
  for (var e in n || (n = {}))
9
- Fe.call(n, e) && Ie(u, e, n[e]);
10
- if (ke)
11
- for (var e of ke(n))
12
- $e.call(n, e) && Ie(u, e, n[e]);
9
+ Fe.call(n, e) && ke(u, e, n[e]);
10
+ if (ze)
11
+ for (var e of ze(n))
12
+ $e.call(n, e) && ke(u, e, n[e]);
13
13
  return u;
14
14
  };
15
- var Se = (u, n, e) => n.has(u) || ze("Cannot " + e);
16
- var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? ze("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Se(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), c = (u, n, e) => (Se(u, n, "access private method"), e);
15
+ var Se = (u, n, e) => n.has(u) || Ie("Cannot " + e);
16
+ var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ie("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Se(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), c = (u, n, e) => (Se(u, n, "access private method"), e);
17
17
  import { S as Ne } from "../Store-D2xCXENW.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
19
  import { a as qe } from "../easings-Bni3YAAW.js";
20
- import { d as ue } from "../events-CsVF98U6.js";
20
+ import { d as Yt } from "../events-CsVF98U6.js";
21
21
  import { c as Te } from "../jss-DtnXPEnq.js";
22
22
  import { a as ge, g as ve } from "../layout-DpZo-I0y.js";
23
23
  import { c as De } from "../math-BOBiC4TN.js";
@@ -32,29 +32,29 @@ import { scrollEntries as gt } from "../scroll-entries/index.js";
32
32
  import { cssUnitParser as Ae } from "../css-unit-parser/index.js";
33
33
  import { CSSProperty as p } from "../css-property/index.js";
34
34
  import { device as Xe } from "../device/index.js";
35
- import { elementResizer as Yt } from "../element-resizer/index.js";
35
+ import { elementResizer as ee } from "../element-resizer/index.js";
36
36
  import { s as Ye } from "../gestures-CcXV6fCp.js";
37
37
  import { b as Ve } from "../dom-CVWzyXPH.js";
38
38
  import { d as ts } from "../function-C10DGppn.js";
39
39
  import { ScrollSegmentElement as es } from "../scroll-segment/index.js";
40
- var m, Tt, g, vt, B, X, yt, Dt, de;
40
+ var m, Dt, g, vt, B, X, yt, Vt, de;
41
41
  class ss {
42
42
  constructor(n, e, i) {
43
- s(this, Dt);
43
+ s(this, Vt);
44
44
  s(this, m);
45
- s(this, Tt);
45
+ s(this, Dt);
46
46
  s(this, g);
47
47
  s(this, vt, 0);
48
48
  s(this, B, 0);
49
49
  s(this, X, null);
50
50
  s(this, yt, 0);
51
- h(this, m, n), h(this, Tt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Tt));
51
+ h(this, m, n), h(this, Dt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Dt));
52
52
  }
53
53
  get element() {
54
54
  return t(this, m);
55
55
  }
56
56
  get index() {
57
- return t(this, Tt);
57
+ return t(this, Dt);
58
58
  }
59
59
  get size() {
60
60
  return t(this, vt);
@@ -69,7 +69,7 @@ class ss {
69
69
  gt.unregister(t(this, m)), this.unsetTransform();
70
70
  }
71
71
  unsetTransform() {
72
- t(this, m).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setSize();
72
+ t(this, m).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setMiddle(!1), this.setSize();
73
73
  }
74
74
  setSize(n) {
75
75
  n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, g).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"));
@@ -89,7 +89,7 @@ class ss {
89
89
  h(this, yt, b * -1), t(this, g).vertical ? t(this, m).style.transform = `translate3d(0px, ${t(this, yt)}px, 0px)` : t(this, m).style.transform = `translate3d(${t(this, yt)}px, 0px, 0px)`;
90
90
  }
91
91
  setMark(n) {
92
- t(this, X) !== n && (t(this, X) && t(this, m).classList.remove(t(this, X)), n && t(this, m).classList.add(n), h(this, X, n), ue(t(this, m), "scrollSectionMarkChange", {
92
+ t(this, X) !== n && (t(this, X) && t(this, m).classList.remove(t(this, X)), n && t(this, m).classList.add(n), h(this, X, n), Yt(t(this, m), "scrollSectionMarkChange", {
93
93
  composed: !0,
94
94
  detail: {
95
95
  mark: t(this, X)
@@ -97,17 +97,20 @@ class ss {
97
97
  custom: !0
98
98
  }));
99
99
  }
100
+ setMiddle(n) {
101
+ t(this, m).classList.toggle("middle", n);
102
+ }
100
103
  setIndex(n) {
101
- c(this, Dt, de).call(this, "--index", n);
104
+ c(this, Vt, de).call(this, "--index", n);
102
105
  }
103
106
  setCurrentIndex(n) {
104
- c(this, Dt, de).call(this, "--current-index", n);
107
+ c(this, Vt, de).call(this, "--current-index", n);
105
108
  }
106
109
  setCurrentIndexArc(n) {
107
- c(this, Dt, de).call(this, "--current-index-arc", n);
110
+ c(this, Vt, de).call(this, "--current-index-arc", n);
108
111
  }
109
112
  }
110
- m = new WeakMap(), Tt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Dt = new WeakSet(), de = function(n, e) {
113
+ m = new WeakMap(), Dt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Vt = new WeakSet(), de = function(n, e) {
111
114
  e !== null ? t(this, m).style.setProperty(n, e.toString()) : t(this, m).style.removeProperty(n);
112
115
  };
113
116
  const is = Te({
@@ -148,8 +151,8 @@ const is = Te({
148
151
  flexShrink: "0"
149
152
  }
150
153
  });
151
- var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt, Vt, M, kt, it, A, rt, q, nt, It, ht, ot, lt, f, Rt, l, ee, se, v, S, I, V, ct, R, w, E, Ot, at, U, G, K, Ht, ut, _, Bt, O, x, ie, dt, o, Ce, Xt, Mt, pe, fe, we, Ee, L, Wt, Re, Ft, re, xe, Pe, St, Oe, me, ne;
152
- class te extends HTMLElement {
154
+ var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt, Rt, M, zt, it, A, rt, q, nt, kt, ht, ot, lt, f, Ot, l, se, ie, v, S, k, V, ct, R, w, E, Ht, at, U, G, K, Bt, ut, _, Wt, O, x, re, dt, o, Ce, te, Mt, pe, fe, we, Ee, L, Ft, Re, $t, ne, xe, Pe, St, Oe, me, he;
155
+ class Tt extends HTMLElement {
153
156
  constructor() {
154
157
  super();
155
158
  s(this, o);
@@ -190,13 +193,13 @@ class te extends HTMLElement {
190
193
  s(this, xt, new p(this, "--mass", 0));
191
194
  s(this, Pt, new p(this, "--stiffness", 0));
192
195
  s(this, Lt, new p(this, "--mouse-drag", !1));
193
- s(this, Vt, new p(
196
+ s(this, Rt, new p(
194
197
  this,
195
198
  "--section-distance-scale",
196
199
  0.5
197
200
  ));
198
201
  s(this, M, new p(this, "--autoplay", 0));
199
- s(this, kt, new p(
202
+ s(this, zt, new p(
200
203
  this,
201
204
  "--autoplay-pause-duration",
202
205
  0
@@ -218,7 +221,7 @@ class te extends HTMLElement {
218
221
  0
219
222
  ));
220
223
  s(this, nt, new p(this, "--focus-delay", 0));
221
- s(this, It, new p(
224
+ s(this, kt, new p(
222
225
  this,
223
226
  "--focus-duration",
224
227
  3e3
@@ -227,42 +230,42 @@ class te extends HTMLElement {
227
230
  s(this, ot, new p(this, "--hibernate", !1));
228
231
  s(this, lt, null);
229
232
  s(this, f, null);
230
- s(this, Rt, null);
233
+ s(this, Ot, null);
231
234
  s(this, l, []);
232
- s(this, ee, 0);
233
235
  s(this, se, 0);
236
+ s(this, ie, 0);
234
237
  s(this, v, 0);
235
238
  s(this, S, 0);
236
- s(this, I, 0);
239
+ s(this, k, 0);
237
240
  s(this, V, null);
238
241
  s(this, ct, null);
239
242
  s(this, R, null);
240
243
  s(this, w, null);
241
244
  s(this, E, new Ne(0));
242
- s(this, Ot, 0);
245
+ s(this, Ht, 0);
243
246
  s(this, at, 0);
244
247
  s(this, U, !1);
245
248
  s(this, G, !0);
246
249
  s(this, K, !0);
247
- s(this, Ht);
250
+ s(this, Bt);
248
251
  s(this, ut);
249
252
  s(this, _, new _e());
250
- s(this, Bt, !1);
253
+ s(this, Wt, !1);
251
254
  s(this, O, null);
252
255
  s(this, x, !1);
253
- s(this, ie, null);
256
+ s(this, re, null);
254
257
  s(this, dt, []);
255
258
  s(this, L, () => {
256
259
  if (t(this, ot).current)
257
260
  return;
258
261
  t(this, d).unlistenAnimationFrame();
259
262
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
260
- if (h(this, ee, this.vertical ? ge(this) : ve(this)), h(this, se, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Ae.parse(
263
+ if (h(this, se, this.vertical ? ge(this) : ve(this)), h(this, ie, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Ae.parse(
261
264
  getComputedStyle(t(this, f)).rowGap
262
- )) : h(this, I, Ae.parse(
265
+ )) : h(this, k, Ae.parse(
263
266
  getComputedStyle(t(this, f)).columnGap
264
267
  )), t(this, N).current && t(this, l).length) {
265
- const r = t(this, D).current, a = (t(this, v) - t(this, I) * (r - 1)) / r;
268
+ const r = t(this, D).current, a = (t(this, v) - t(this, k) * (r - 1)) / r;
266
269
  t(this, l).forEach((b) => {
267
270
  b.setSize(a);
268
271
  });
@@ -296,13 +299,13 @@ class te extends HTMLElement {
296
299
  t(this, d).set(e * t(this, S), {
297
300
  equalize: !0
298
301
  });
299
- h(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, fe).call(this) : c(this, o, pe).call(this), t(this, Wt).call(this);
302
+ h(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, fe).call(this) : c(this, o, pe).call(this), Yt(this, "scrollResize", { custom: !0 }), t(this, Ft).call(this);
300
303
  });
301
- s(this, Wt, () => {
304
+ s(this, Ft, () => {
302
305
  if (!t(this, U) || t(this, K) || t(this, G))
303
306
  return;
304
307
  const e = this.currentScrollValue;
305
- if (h(this, Ot, Math.max(0, e - t(this, S))), t(this, l).length) {
308
+ if (h(this, Ht, Math.max(0, e - t(this, S))), t(this, l).length) {
306
309
  for (let i = 0; i < t(this, l).length; i++)
307
310
  t(this, l)[i].transform();
308
311
  t(this, E).current = c(this, o, me).call(this);
@@ -314,21 +317,21 @@ class te extends HTMLElement {
314
317
  e
315
318
  );
316
319
  });
317
- s(this, Ft, (e, i) => {
318
- t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, re).call(this, e, i));
320
+ s(this, $t, (e, i) => {
321
+ t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, ne).call(this, e, i));
319
322
  });
320
- s(this, re, (e, i) => {
323
+ s(this, ne, (e, i) => {
321
324
  if (t(this, W).current) {
322
325
  if (t(this, W).current < 0 && i > 0)
323
326
  return;
324
327
  if (t(this, W).current > 0 && i < 0)
325
328
  return;
326
329
  }
327
- if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, M).current && t(this, nt).current && (clearInterval(t(this, Ht)), h(this, Ht, setTimeout(() => {
330
+ if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, M).current && t(this, nt).current && (clearInterval(t(this, Bt)), h(this, Bt, setTimeout(() => {
328
331
  const r = t(this, l)[c(this, o, me).call(this)];
329
332
  r && this.scrollToSection(r.index, {
330
333
  tween: {
331
- duration: t(this, It).current,
334
+ duration: t(this, kt).current,
332
335
  easing: qe
333
336
  }
334
337
  });
@@ -342,22 +345,22 @@ class te extends HTMLElement {
342
345
  duration: t(this, et).current || 500
343
346
  } : void 0
344
347
  };
345
- t(this, Bt) ? this.scrollToSection(t(this, E).current, a) : this.shiftSections(r, a);
348
+ t(this, Wt) ? this.scrollToSection(t(this, E).current, a) : this.shiftSections(r, a);
346
349
  } else
347
350
  t(this, d).shift(r * t(this, v));
348
351
  } else
349
352
  t(this, d).shift(i);
350
- h(this, Bt, e === "drag");
353
+ h(this, Wt, e === "drag");
351
354
  }
352
355
  });
353
- s(this, ne, () => {
356
+ s(this, he, () => {
354
357
  h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, Ee).call(this);
355
358
  });
356
359
  if (H) {
357
360
  const e = this.attachShadow({ mode: "open" });
358
361
  e.adoptedStyleSheets = [is];
359
362
  const i = document.createElement("div");
360
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Rt, document.createElement("slot")), t(this, f).appendChild(t(this, Rt)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, ie, new MutationObserver((r) => {
363
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Ot, document.createElement("slot")), t(this, f).appendChild(t(this, Ot)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, re, new MutationObserver((r) => {
361
364
  this.tryResplit();
362
365
  }));
363
366
  }
@@ -420,13 +423,13 @@ class te extends HTMLElement {
420
423
  return t(this, Lt);
421
424
  }
422
425
  get sectionDistanceScaleCSSProperty() {
423
- return t(this, Vt);
426
+ return t(this, Rt);
424
427
  }
425
428
  get autoplayCSSProperty() {
426
429
  return t(this, M);
427
430
  }
428
431
  get autoplayPauseDurationCSSProperty() {
429
- return t(this, kt);
432
+ return t(this, zt);
430
433
  }
431
434
  get autoplayUserDirectionCSSProperty() {
432
435
  return t(this, it);
@@ -444,7 +447,7 @@ class te extends HTMLElement {
444
447
  return t(this, nt);
445
448
  }
446
449
  get focusDurationCSSProperty() {
447
- return t(this, It);
450
+ return t(this, kt);
448
451
  }
449
452
  get disabledCSSProperty() {
450
453
  return t(this, ht);
@@ -468,10 +471,10 @@ class te extends HTMLElement {
468
471
  return t(this, l);
469
472
  }
470
473
  get position() {
471
- return t(this, ee);
474
+ return t(this, se);
472
475
  }
473
476
  get contentPosition() {
474
- return t(this, se);
477
+ return t(this, ie);
475
478
  }
476
479
  get viewportSize() {
477
480
  return t(this, v);
@@ -480,7 +483,7 @@ class te extends HTMLElement {
480
483
  return t(this, S);
481
484
  }
482
485
  get gap() {
483
- return t(this, I);
486
+ return t(this, k);
484
487
  }
485
488
  get counter() {
486
489
  return t(this, E);
@@ -494,13 +497,13 @@ class te extends HTMLElement {
494
497
  return t(this, at);
495
498
  }
496
499
  get loopDistance() {
497
- return t(this, y).current ? t(this, at) + t(this, I) : t(this, at);
500
+ return t(this, y).current ? t(this, at) + t(this, k) : t(this, at);
498
501
  }
499
502
  get hasOverflow() {
500
503
  return t(this, U);
501
504
  }
502
505
  get overscroll() {
503
- return t(this, Ot);
506
+ return t(this, Ht);
504
507
  }
505
508
  get scrollLine() {
506
509
  return t(this, O);
@@ -521,7 +524,7 @@ class te extends HTMLElement {
521
524
  return t(this, P).current === "x" ? 0 : t(this, d).distance;
522
525
  }
523
526
  tryResplit() {
524
- !t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o, Xt).call(this);
527
+ !t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o, te).call(this);
525
528
  }
526
529
  onScroll(...e) {
527
530
  return t(this, d).subscribe(...e);
@@ -546,9 +549,9 @@ class te extends HTMLElement {
546
549
  return;
547
550
  const r = t(this, E).current, a = c(this, o, Re).call(this, e), b = t(this, l)[r], C = t(this, l)[a];
548
551
  if (b && C) {
549
- let z = 0;
550
- const be = c(this, o, me).call(this), Qt = t(this, l)[be], Be = Qt ? this.targetScrollValue - Qt.position : 0;
551
- t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? z = t(this, S) + t(this, v) - b.position + t(this, I) : a === t(this, l).length - 1 && r === 0 ? z = C.position - (t(this, S) + t(this, v) + t(this, I)) : z = C.position - b.position : z = C.position - b.position, this.shiftPosition(z - Be, i);
552
+ let I = 0;
553
+ const be = c(this, o, me).call(this), Xt = t(this, l)[be], Be = Xt ? this.targetScrollValue - Xt.position : 0;
554
+ t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - b.position + t(this, k) : a === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, k)) : I = C.position - b.position : I = C.position - b.position, this.shiftPosition(I - Be, i);
552
555
  }
553
556
  }
554
557
  shiftSections(e, i) {
@@ -569,13 +572,13 @@ class te extends HTMLElement {
569
572
  damping: 0.01,
570
573
  min: 0,
571
574
  order: Ge.SCROLL
572
- })), this.setAttribute("tabindex", "0"), h(this, V, new Ze({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ft)), h(this, ct, new je({
575
+ })), this.setAttribute("tabindex", "0"), h(this, V, new Ze({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, $t)), h(this, ct, new je({
573
576
  element: this
574
577
  })), t(this, ct).changeEvent.subscribe(
575
- t(this, Ft)
576
- ), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, Ft)), h(this, w, new Qe({
578
+ t(this, $t)
579
+ ), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, $t)), h(this, w, new Qe({
577
580
  culling: this
578
- })), t(this, w).changeEvent.subscribe(t(this, re)), t(this, P).subscribe(() => {
581
+ })), t(this, w).changeEvent.subscribe(t(this, ne)), t(this, P).subscribe(() => {
579
582
  c(this, o, Ce).call(this);
580
583
  }), t(this, Y).subscribe(() => {
581
584
  c(this, o, Ce).call(this);
@@ -586,15 +589,15 @@ class te extends HTMLElement {
586
589
  }), t(this, F).subscribe(() => {
587
590
  t(this, x) && t(this, L).call(this);
588
591
  }), t(this, $).subscribe(({ current: e }) => {
589
- t(this, x) && (e ? c(this, o, Xt).call(this) : c(this, o, Mt).call(this));
592
+ t(this, x) && (e ? c(this, o, te).call(this) : c(this, o, Mt).call(this));
590
593
  }), t(this, T).subscribe((e) => {
591
- t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, Xt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
594
+ t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
592
595
  }), t(this, N).subscribe((e) => {
593
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, Xt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
596
+ t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
594
597
  }), t(this, D).subscribe((e) => {
595
598
  t(this, x) && (t(this, L).call(this), c(this, o, St).call(this));
596
599
  }), t(this, y).subscribe((e) => {
597
- e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ot, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
600
+ e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ht, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
598
601
  }), t(this, Et).subscribe((e) => {
599
602
  t(this, d).damping = e.current;
600
603
  }), t(this, xt).subscribe((e) => {
@@ -621,65 +624,65 @@ class te extends HTMLElement {
621
624
  e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, fe).call(this));
622
625
  }), t(this, ot).subscribe((e) => {
623
626
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, we).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, Ee).call(this));
624
- }), t(this, Ct).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, Vt).observe(), t(this, M).observe(), t(this, M).observe(), t(this, kt).observe(), t(this, it).observe(), t(this, A).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, It).observe(), t(this, ht).observe(), t(this, ot).observe(), At.subscribe(t(this, ne), ye.LAST);
627
+ }), t(this, Ct).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, Rt).observe(), t(this, M).observe(), t(this, M).observe(), t(this, zt).observe(), t(this, it).observe(), t(this, A).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, kt).observe(), t(this, ht).observe(), t(this, ot).observe(), At.subscribe(t(this, he), ye.LAST);
625
628
  }
626
629
  disconnectedCallback() {
627
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Ct).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, Vt).unobserve(), t(this, M).unobserve(), t(this, kt).unobserve(), t(this, it).unobserve(), t(this, A).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, It).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), At.unsubscribe(t(this, ne)), c(this, o, we).call(this), t(this, ie).disconnect();
630
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Ct).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, Rt).unobserve(), t(this, M).unobserve(), t(this, zt).unobserve(), t(this, it).unobserve(), t(this, A).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, kt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), At.unsubscribe(t(this, he)), c(this, o, we).call(this), t(this, re).disconnect();
628
631
  }
629
632
  }
630
- d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Vt = new WeakMap(), M = new WeakMap(), kt = new WeakMap(), it = new WeakMap(), A = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), It = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Rt = new WeakMap(), l = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), v = new WeakMap(), S = new WeakMap(), I = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ot = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Ht = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Bt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), ie = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
633
+ d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Rt = new WeakMap(), M = new WeakMap(), zt = new WeakMap(), it = new WeakMap(), A = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Ot = new WeakMap(), l = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Bt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Wt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), re = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
631
634
  const e = t(this, P).current, i = t(this, Y).current ? "-reverse" : "";
632
635
  t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
633
- }, Xt = function() {
634
- c(this, o, Mt).call(this), t(this, Rt).assignedElements().forEach((e, i) => {
636
+ }, te = function() {
637
+ c(this, o, Mt).call(this), t(this, Ot).assignedElements().forEach((e, i) => {
635
638
  e instanceof HTMLElement && t(this, l).push(new ss(e, i, this));
636
- }), t(this, f).style.transform = "", ue(this, "scrollSectionsChange", {
639
+ }), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
637
640
  custom: !0,
638
641
  composed: !0
639
642
  }), t(this, L).call(this), c(this, o, St).call(this);
640
643
  }, Mt = function() {
641
644
  t(this, l).forEach((e) => {
642
645
  e.destroy();
643
- }), h(this, l, []), t(this, E).reset(), t(this, d).reset(), ue(this, "scrollSectionsChange", {
646
+ }), h(this, l, []), t(this, E).reset(), t(this, d).reset(), Yt(this, "scrollSectionsChange", {
644
647
  custom: !0,
645
648
  composed: !0
646
649
  });
647
650
  }, pe = function() {
648
- t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this, Wt)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Ht)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ct).disconnect(), t(this, R).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
651
+ t(this, G) || (h(this, G, !0), t(this, d).unsubscribe(t(this, Ft)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Bt)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ct).disconnect(), t(this, R).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
649
652
  e.unsetTransform();
650
653
  }), t(this, L).call(this)));
651
654
  }, fe = function() {
652
- t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Wt)), t(this, V).connect(), t(this, ct).connect(), t(this, R).connect(), t(this, M).current && t(this, w).connect());
655
+ t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Ft)), t(this, V).connect(), t(this, ct).connect(), t(this, R).connect(), t(this, M).current && t(this, w).connect());
653
656
  }, we = function() {
654
- t(this, K) || (h(this, K, !0), At.unsubscribe(t(this, L)), Yt.unsubscribe(t(this, L)), c(this, o, pe).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Mt).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
657
+ t(this, K) || (h(this, K, !0), At.unsubscribe(t(this, L)), ee.unsubscribe(t(this, L)), c(this, o, pe).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Mt).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
655
658
  }, Ee = function() {
656
- t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), At.subscribe(t(this, L), ye.SCROLL), Yt.subscribe(this, t(this, L)));
657
- }, L = new WeakMap(), Wt = new WeakMap(), Re = function(e) {
659
+ t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), At.subscribe(t(this, L), ye.SCROLL), ee.subscribe(this, t(this, L)));
660
+ }, L = new WeakMap(), Ft = new WeakMap(), Re = function(e) {
658
661
  let i = t(this, E).current;
659
662
  return t(this, y).current ? i = Ue(e, t(this, l).length) : i = De(e, 0, this.limit), i;
660
- }, Ft = new WeakMap(), re = new WeakMap(), xe = function(e = 1) {
663
+ }, $t = new WeakMap(), ne = new WeakMap(), xe = function(e = 1) {
661
664
  t(this, it).current && (t(this, w).direction = e), t(this, M).current && t(this, w).pauseAndContinue(
662
- t(this, kt).current,
665
+ t(this, zt).current,
663
666
  this.sectionalCSSProperty.current
664
667
  );
665
668
  }, Pe = function(e = "current") {
666
669
  if (t(this, y).current && t(this, l).length) {
667
- const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, I));
668
- return i < 0 ? t(this, S) + i + t(this, v) + t(this, I) : i;
670
+ const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, k));
671
+ return i < 0 ? t(this, S) + i + t(this, v) + t(this, k) : i;
669
672
  } else
670
673
  return t(this, d)[e];
671
674
  }, St = function() {
672
675
  if (t(this, l).length) {
673
676
  const e = t(this, E).current + t(this, rt).current;
674
- if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), ue(this, "scrollLine", {
677
+ if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), Yt(this, "scrollLine", {
675
678
  detail: { line: t(this, O) }
676
679
  }), t(this, A).current) {
677
680
  this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
678
681
  const i = t(this, D).current + t(this, q).current;
679
682
  h(this, dt, []), t(this, l).forEach((r, a) => {
680
683
  r.setCurrentIndex(null), r.setCurrentIndexArc(null);
681
- const b = e - this.limit - 1 + t(this, q).current, C = e + i, z = this.sections.length - C;
682
- a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + z / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
684
+ const b = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
685
+ a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + I / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
683
686
  });
684
687
  }
685
688
  }
@@ -688,7 +691,7 @@ d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W =
688
691
  const e = Math.floor(t(this, dt).length / 2);
689
692
  t(this, dt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, dt).forEach((i, r) => {
690
693
  const a = Math.abs(r - e);
691
- i.setCurrentIndex(r), i.setCurrentIndexArc(a);
694
+ i.setCurrentIndex(r), i.setCurrentIndexArc(a), console.log(r === e), i.setMiddle(r === e);
692
695
  });
693
696
  }
694
697
  }, // TODO: Учитывать loop
@@ -697,54 +700,54 @@ me = function() {
697
700
  const a = t(this, d).direction;
698
701
  for (let b = 0; b < t(this, l).length; b++) {
699
702
  const C = t(this, l)[b];
700
- let z = t(this, Bt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
701
- const Qt = Math.abs(be + z - e);
702
- Qt < i && (i = Qt, r = b);
703
+ let I = t(this, Wt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
704
+ const Xt = Math.abs(be + I - e);
705
+ Xt < i && (i = Xt, r = b);
703
706
  }
704
707
  return r;
705
- }, ne = new WeakMap();
706
- H && !customElements.get("e-scroll") && customElements.define("e-scroll", te);
707
- var he;
708
+ }, he = new WeakMap();
709
+ H && !customElements.get("e-scroll") && customElements.define("e-scroll", Tt);
710
+ var oe;
708
711
  class Le extends HTMLElement {
709
712
  constructor() {
710
713
  super(...arguments);
711
- s(this, he, null);
714
+ s(this, oe, null);
712
715
  }
713
716
  get scrollElement() {
714
- return t(this, he);
717
+ return t(this, oe);
715
718
  }
716
719
  connectedCallback() {
717
- const e = Ve(this, te);
718
- e instanceof te ? h(this, he, e) : console.error(this, "e-scroll not found");
720
+ const e = Ve(this, Tt);
721
+ e instanceof Tt ? h(this, oe, e) : console.error(this, "e-scroll not found");
719
722
  }
720
723
  }
721
- he = new WeakMap();
722
- var pt, k, Z, j, $t, Nt, ft, qt, oe, le;
724
+ oe = new WeakMap();
725
+ var pt, z, Z, j, Nt, qt, ft, Ut, le, ce;
723
726
  class rs extends Le {
724
727
  constructor() {
725
728
  super();
726
729
  s(this, pt, null);
727
- s(this, k, null);
730
+ s(this, z, null);
728
731
  s(this, Z, !1);
729
732
  s(this, j, 0);
730
- s(this, $t, 0);
731
733
  s(this, Nt, 0);
734
+ s(this, qt, 0);
732
735
  s(this, ft, () => {
733
736
  h(this, Z, this.offsetWidth > this.offsetHeight);
734
737
  const e = t(this, Z) ? this.offsetWidth : this.offsetHeight;
735
- h(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, k).style.width = t(this, j) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, j) + "px"), h(this, $t, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, qt).call(this);
738
+ h(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, z).style.width = t(this, j) + "px", t(this, z).style.height = "100%") : (t(this, z).style.width = "100%", t(this, z).style.height = t(this, j) + "px"), h(this, Nt, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ut).call(this);
736
739
  });
737
- s(this, qt, () => {
738
- h(this, Nt, this.scrollElement.currentProgress * t(this, $t)), t(this, Z) ? t(this, k).style.transform = `translate3d(${t(this, Nt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Nt)}px, 0px)`;
740
+ s(this, Ut, () => {
741
+ h(this, qt, this.scrollElement.currentProgress * t(this, Nt)), t(this, Z) ? t(this, z).style.transform = `translate3d(${t(this, qt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, qt)}px, 0px)`;
739
742
  });
740
- s(this, oe, () => {
743
+ s(this, le, () => {
741
744
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
742
745
  });
743
- s(this, le, (e) => {
746
+ s(this, ce, (e) => {
744
747
  document.documentElement.classList.add("grabbing"), Ye(
745
748
  (a) => {
746
- const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, $t), z = (b - r) * C;
747
- this.scrollElement.setPosition(i + z);
749
+ const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, Nt), I = (b - r) * C;
750
+ this.scrollElement.setPosition(i + I);
748
751
  },
749
752
  () => {
750
753
  document.documentElement.classList.remove("grabbing");
@@ -788,32 +791,32 @@ class rs extends Le {
788
791
  }
789
792
  }
790
793
  get thumbElement() {
791
- return t(this, k);
794
+ return t(this, z);
792
795
  }
793
796
  connectedCallback() {
794
797
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
795
798
  const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
796
- h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, le)), At.subscribe(t(this, ft), ye.SCROLL), Yt.subscribe(this, t(this, ft)), Yt.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, oe));
799
+ h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ce)), At.subscribe(t(this, ft), ye.SCROLL), ee.subscribe(this, t(this, ft)), ee.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.subscribe(t(this, le));
797
800
  }
798
801
  disconnectedCallback() {
799
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, le)), At.unsubscribe(t(this, ft)), Yt.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, oe));
802
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ce)), At.unsubscribe(t(this, ft)), ee.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, le));
800
803
  }
801
804
  }
802
- pt = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), $t = new WeakMap(), Nt = new WeakMap(), ft = new WeakMap(), qt = new WeakMap(), oe = new WeakMap(), le = new WeakMap();
805
+ pt = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), Ut = new WeakMap(), le = new WeakMap(), ce = new WeakMap();
803
806
  H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", rs);
804
- var Ut, Gt, Kt;
807
+ var Gt, Kt, _t;
805
808
  class He extends Le {
806
809
  constructor() {
807
810
  super();
808
- s(this, Ut, new p(this, "--behaviour", "smooth"));
809
- s(this, Gt, new p(
811
+ s(this, Gt, new p(this, "--behaviour", "smooth"));
812
+ s(this, Kt, new p(
810
813
  this,
811
814
  "--tween-easing",
812
815
  !1
813
816
  ));
814
- s(this, Kt, new p(this, "--tween-duration", 0));
817
+ s(this, _t, new p(this, "--tween-duration", 0));
815
818
  H && this.addEventListener("click", () => {
816
- const e = t(this, Ut).current, i = t(this, Gt).current, r = t(this, Kt).current;
819
+ const e = t(this, Gt).current, i = t(this, Kt).current, r = t(this, _t).current;
817
820
  this.handleClick({
818
821
  behaviour: e,
819
822
  tween: i || r ? { easing: i, duration: r } : void 0
@@ -821,37 +824,37 @@ class He extends Le {
821
824
  });
822
825
  }
823
826
  connectedCallback() {
824
- super.connectedCallback(), t(this, Ut).observe(), t(this, Gt).observe(), t(this, Kt).observe();
827
+ super.connectedCallback(), t(this, Gt).observe(), t(this, Kt).observe(), t(this, _t).observe();
825
828
  }
826
829
  disconnectedCallback() {
827
- t(this, Ut).close(), t(this, Gt).close(), t(this, Kt).close();
830
+ t(this, Gt).close(), t(this, Kt).close(), t(this, _t).close();
828
831
  }
829
832
  }
830
- Ut = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap();
831
- var _t;
833
+ Gt = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap();
834
+ var Zt;
832
835
  class ns extends He {
833
836
  constructor() {
834
837
  super(...arguments);
835
- s(this, _t, new p(this, "--set", 1));
838
+ s(this, Zt, new p(this, "--set", 1));
836
839
  }
837
840
  handleClick(e) {
838
- this.scrollElement.scrollToSection(t(this, _t).current, e);
841
+ this.scrollElement.scrollToSection(t(this, Zt).current, e);
839
842
  }
840
843
  connectedCallback() {
841
- super.connectedCallback(), t(this, _t).observe();
844
+ super.connectedCallback(), t(this, Zt).observe();
842
845
  }
843
846
  disconnectedCallback() {
844
- super.disconnectedCallback(), t(this, _t).close();
847
+ super.disconnectedCallback(), t(this, Zt).close();
845
848
  }
846
849
  }
847
- _t = new WeakMap();
850
+ Zt = new WeakMap();
848
851
  H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ns);
849
- var J, Zt;
852
+ var J, jt;
850
853
  class hs extends He {
851
854
  constructor() {
852
855
  super(...arguments);
853
856
  s(this, J, new p(this, "--step", 1));
854
- s(this, Zt, () => {
857
+ s(this, jt, () => {
855
858
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, J).current > 0 && this.scrollElement.scrollLine === "end" || t(this, J).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
856
859
  });
857
860
  }
@@ -860,52 +863,52 @@ class hs extends He {
860
863
  }
861
864
  connectedCallback() {
862
865
  super.connectedCallback(), this.scrollElement && (t(this, J).subscribe(() => {
863
- t(this, Zt).call(this);
866
+ t(this, jt).call(this);
864
867
  }), t(this, J).observe(), this.scrollElement.addEventListener(
865
868
  "scrollLine",
866
- t(this, Zt)
867
- ), t(this, Zt).call(this));
869
+ t(this, jt)
870
+ ), t(this, jt).call(this));
868
871
  }
869
872
  disconnectedCallback() {
870
873
  super.disconnectedCallback(), t(this, J).close(), this.removeAttribute("disabled");
871
874
  }
872
875
  }
873
- J = new WeakMap(), Zt = new WeakMap();
876
+ J = new WeakMap(), jt = new WeakMap();
874
877
  H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", hs);
875
- var Q, mt, jt, ce, ae, Jt;
878
+ var Q, mt, Jt, ae, ue, Qt;
876
879
  class os {
877
880
  constructor(n, e, i) {
878
881
  s(this, Q, null);
879
882
  s(this, mt, null);
880
- s(this, jt, null);
881
- s(this, ce, null);
882
- s(this, ae, () => {
883
- t(this, mt).scrollToSection(t(this, jt), {
884
- behaviour: t(this, ce)
883
+ s(this, Jt, null);
884
+ s(this, ae, null);
885
+ s(this, ue, () => {
886
+ t(this, mt).scrollToSection(t(this, Jt), {
887
+ behaviour: t(this, ae)
885
888
  });
886
889
  });
887
- s(this, Jt, () => {
890
+ s(this, Qt, () => {
888
891
  t(this, Q).classList.toggle(
889
892
  "current",
890
- t(this, mt).counter.current === t(this, jt)
893
+ t(this, mt).counter.current === t(this, Jt)
891
894
  );
892
895
  });
893
- H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ce, i), h(this, jt, e), t(this, Q).addEventListener("click", t(this, ae)), t(this, mt).counter.subscribe(t(this, Jt)), t(this, Jt).call(this));
896
+ H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ae, i), h(this, Jt, e), t(this, Q).addEventListener("click", t(this, ue)), t(this, mt).counter.subscribe(t(this, Qt)), t(this, Qt).call(this));
894
897
  }
895
898
  get element() {
896
899
  return t(this, Q);
897
900
  }
898
901
  destroy() {
899
- t(this, Q).removeEventListener("click", t(this, ae)), t(this, mt).counter.unsubscribe(t(this, Jt)), t(this, Q).remove();
902
+ t(this, Q).removeEventListener("click", t(this, ue)), t(this, mt).counter.unsubscribe(t(this, Qt)), t(this, Q).remove();
900
903
  }
901
904
  }
902
- Q = new WeakMap(), mt = new WeakMap(), jt = new WeakMap(), ce = new WeakMap(), ae = new WeakMap(), Jt = new WeakMap();
903
- var bt, zt;
905
+ Q = new WeakMap(), mt = new WeakMap(), Jt = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), Qt = new WeakMap();
906
+ var bt, It;
904
907
  class ls extends Le {
905
908
  constructor() {
906
909
  super(...arguments);
907
910
  s(this, bt, []);
908
- s(this, zt, ts(() => {
911
+ s(this, It, ts(() => {
909
912
  t(this, bt).forEach((i) => i.destroy()), h(this, bt, []);
910
913
  const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
911
914
  for (let i = 0; i < e; i++) {
@@ -921,35 +924,41 @@ class ls extends Le {
921
924
  connectedCallback() {
922
925
  super.connectedCallback(), this.scrollElement.addEventListener(
923
926
  "sectionsChange",
924
- t(this, zt)
927
+ t(this, It)
925
928
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
926
- t(this, zt)
929
+ t(this, It)
927
930
  );
928
931
  }
929
932
  disconnectedCallback() {
930
933
  this.scrollElement.removeEventListener(
931
934
  "sectionsChange",
932
- t(this, zt)
935
+ t(this, It)
933
936
  ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
934
- t(this, zt)
937
+ t(this, It)
935
938
  ), t(this, bt).forEach((e) => e.destroy()), h(this, bt, []);
936
939
  }
937
940
  }
938
- bt = new WeakMap(), zt = new WeakMap();
941
+ bt = new WeakMap(), It = new WeakMap();
939
942
  H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ls);
940
943
  class cs extends es {
941
944
  connectedCallback() {
942
- const n = Ve(this, te);
943
- n instanceof te ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
945
+ const n = Ve(this, Tt);
946
+ n instanceof Tt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
947
+ "scrollSectionsChange",
948
+ this.findAnotherScrollEntries
949
+ ), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
950
+ }
951
+ disconnectedCallback() {
952
+ super.disconnectedCallback(), this.scrollContainer instanceof Tt && (this.scrollContainer.removeEventListener(
944
953
  "scrollSectionsChange",
945
954
  this.findAnotherScrollEntries
946
- )) : console.error(this, "e-scroll not found");
955
+ ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
947
956
  }
948
957
  }
949
958
  H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", cs);
950
959
  export {
951
960
  ls as ScrollBulletButtonsElement,
952
- te as ScrollElement,
961
+ Tt as ScrollElement,
953
962
  cs as ScrollSegmentElement,
954
963
  ns as ScrollSetButtonElement,
955
964
  hs as ScrollStepButtonElement,