aptechka 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animated-CJcYqJzq.js +130 -0
- package/lib/Animated-DyZuTEQE.cjs +1 -0
- package/lib/Damped-AHRBHNEQ.cjs +1 -0
- package/lib/Damped-Csj-9_gH.js +36 -0
- package/lib/Derived-Bc88XJ8J.js +27 -0
- package/lib/Derived-SjPdLJiZ.cjs +1 -0
- package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
- package/lib/ElementConstructor-CoKM2CTK.js +228 -0
- package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
- package/lib/SourceManager-CI6NfLzW.cjs +1 -0
- package/lib/Store-D0_rDIsE.cjs +1 -0
- package/lib/Store-JOKrNVEr.js +152 -0
- package/lib/Viewport-COsaberc.cjs +1 -0
- package/lib/Viewport-CXY5xcGJ.js +129 -0
- package/lib/WheelControls-CX9WUbBC.js +83 -0
- package/lib/WheelControls-CfDeGCOU.cjs +1 -0
- package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
- package/lib/abstract-elements/index.cjs +1 -0
- package/lib/abstract-elements/index.d.ts +1 -0
- package/lib/abstract-elements/index.js +27 -0
- package/lib/accordion/AccordionElement.d.ts +24 -1
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +166 -0
- package/lib/animation/Animated.d.ts +9 -12
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +11 -17
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +8 -4
- package/lib/attribute/index.js +44 -35
- package/lib/canvas/index.cjs +1 -0
- package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/connector/index.js +54 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +23 -27
- package/lib/createStylesheet-BON7aJYs.js +10 -0
- package/lib/createStylesheet-uicRVW05.cjs +1 -0
- package/lib/createTheme-BMH9cRrS.js +15 -0
- package/lib/createTheme-COo8IzPG.cjs +1 -0
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.d.ts +3 -1
- package/lib/custom-element/index.js +19 -9
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -121
- package/lib/element-constructor/ElementConstructor.d.ts +15 -17
- package/lib/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/element-constructor/createTheme.d.ts +12 -0
- package/lib/element-constructor/htmlTags.d.ts +115 -113
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +2 -1
- package/lib/element-constructor/index.js +387 -1136
- package/lib/element-constructor/svgTags.d.ts +63 -63
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/element-resizer/index.js +64 -0
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.js +252 -242
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/events-CoqmkUxo.js +11 -0
- package/lib/events-D68xg4dy.cjs +1 -0
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/htmlTags-BCNUG7oK.js +683 -0
- package/lib/htmlTags-BSQys9wH.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DgtdcBEI.js +310 -0
- package/lib/index-i_Ki9M-w.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +2 -1
- package/lib/intersector/index.js +33 -22
- package/lib/jsx/ComponentElement.d.ts +17 -0
- package/lib/jsx/h.d.ts +8 -0
- package/lib/jsx/hooks.d.ts +25 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +116 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +186 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -0
- package/lib/layout-box/index.js +113 -99
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +17 -20
- package/lib/modal/ModalElement.d.ts +12 -0
- package/lib/modal/index.cjs +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.js +144 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/number-Bo5RdrA1.js +23 -0
- package/lib/number-yVpzMdbQ.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +19 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +122 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +5 -3
- package/lib/scroll/index.cjs +1 -71
- package/lib/scroll/index.js +349 -314
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/scroll-entries/index.js +4 -2
- package/lib/select/SelectElement.d.ts +25 -0
- package/lib/select/SelectHeadElement.d.ts +12 -0
- package/lib/select/SelectOptionElement.d.ts +13 -0
- package/lib/select/SelectUserElement.d.ts +7 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +4 -0
- package/lib/select/index.js +7 -0
- package/lib/source/SourceClass.d.ts +1 -1
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +13 -18
- package/lib/store/CumulativeResource.d.ts +2 -2
- package/lib/store/Resource.d.ts +1 -1
- package/lib/store/Store.d.ts +55 -9
- package/lib/store/StoreRegistry.d.ts +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -1
- package/lib/store/index.js +105 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +3 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.js +1004 -0
- package/lib/studio/studioStorage.d.ts +14 -0
- package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
- package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
- package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
- package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/theme/index.cjs +1 -0
- package/lib/theme/index.d.ts +90 -0
- package/lib/theme/index.js +34 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/utils/events.d.ts +6 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +8 -7
- package/lib/utils/index.js +95 -105
- package/lib/utils/number.d.ts +2 -3
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-utility.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -20
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/lib/window-resizer/index.js +46 -0
- package/package.json +91 -28
- package/lib/Damped-DdPj4Sho.cjs +0 -1
- package/lib/Damped-H3PuZwKV.js +0 -152
- package/lib/SourceManager-tmQlXkSD.cjs +0 -1
- package/lib/Store-qq7IjRLE.js +0 -136
- package/lib/Store-txkR3wXU.cjs +0 -1
- package/lib/WheelControls-9ZQKSYYq.js +0 -83
- package/lib/WheelControls-TYhGU6oA.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/element-constructor/specialObjects.d.ts +0 -2
- package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
- package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
- package/lib/measurer/Meaurer.d.ts +0 -8
- package/lib/measurer/index.cjs +0 -1
- package/lib/measurer/index.d.ts +0 -3
- package/lib/measurer/index.js +0 -48
- package/lib/number-2bR0KBcX.cjs +0 -1
- package/lib/number-bCHB2GAD.js +0 -31
- package/lib/resizer/index.cjs +0 -1
- package/lib/resizer/index.d.ts +0 -10
- package/lib/resizer/index.js +0 -45
- package/lib/string-GmxZA5Nq.js +0 -31
- package/lib/string-WmNOGq16.cjs +0 -1
- package/lib/utils/dev.d.ts +0 -3
- /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
- /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
- /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
- /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
- /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
- /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
- /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
- /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
- /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
- /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
- /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
- /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
- /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
- /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
package/lib/scroll/index.js
CHANGED
|
@@ -1,228 +1,264 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var yt = (i, s, e) => {
|
|
2
|
+
if (!s.has(i))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var n = (i, s, e) => (yt(i, s, "read from private field"), e ? e.call(i) : s.get(i)), D = (i, s, e) => {
|
|
6
|
+
if (s.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, $ = (s, e,
|
|
10
|
-
import { S as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
9
|
+
}, $ = (i, s, e, r) => (yt(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e);
|
|
10
|
+
import { S as Ht } from "../Store-JOKrNVEr.js";
|
|
11
|
+
import { D as Ft } from "../Derived-Bc88XJ8J.js";
|
|
12
|
+
import { i as At } from "../browser-0zX67oeU.js";
|
|
13
|
+
import { a as gt, g as wt } from "../layout-HoBT_Da2.js";
|
|
14
|
+
import { c as zt } from "../math-BOBiC4TN.js";
|
|
14
15
|
import "../ticker/index.js";
|
|
15
|
-
import { D as
|
|
16
|
-
import { Attribute as
|
|
17
|
-
import { W as
|
|
18
|
-
import { CustomElement as
|
|
19
|
-
import { TICK_ORDER as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, t = (s, e, i) => (vt(s, e, "read from private field"), i ? i.call(s) : e.get(s)), l = (s, e, i) => {
|
|
36
|
-
if (e.has(s))
|
|
16
|
+
import { D as Bt } from "../Damped-Csj-9_gH.js";
|
|
17
|
+
import { Attribute as E } from "../attribute/index.js";
|
|
18
|
+
import { W as Kt, K as Gt } from "../WheelControls-CX9WUbBC.js";
|
|
19
|
+
import { CustomElement as Lt, define as $t } from "../custom-element/index.js";
|
|
20
|
+
import { TICK_ORDER as Nt, RESIZE_ORDER as Pt } from "../order/index.js";
|
|
21
|
+
import { windowResizer as ot } from "../window-resizer/index.js";
|
|
22
|
+
import { scrollEntries as I } from "../scroll-entries/index.js";
|
|
23
|
+
import { e as Ot } from "../ElementConstructor-CoKM2CTK.js";
|
|
24
|
+
import { C as Mt, aw as bt } from "../htmlTags-BCNUG7oK.js";
|
|
25
|
+
import { c as Vt } from "../createStylesheet-BON7aJYs.js";
|
|
26
|
+
import { f as Ut } from "../dom-BY7JhTx5.js";
|
|
27
|
+
var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s, e, r) => {
|
|
28
|
+
for (var a = r > 1 ? void 0 : r ? qt(s, e) : s, g = i.length - 1, x; g >= 0; g--)
|
|
29
|
+
(x = i[g]) && (a = (r ? x(s, e, a) : x(a)) || a);
|
|
30
|
+
return r && a && Zt(s, e, a), a;
|
|
31
|
+
}, Et = (i, s, e) => {
|
|
32
|
+
if (!s.has(i))
|
|
33
|
+
throw TypeError("Cannot " + e);
|
|
34
|
+
}, t = (i, s, e) => (Et(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
|
|
35
|
+
if (s.has(i))
|
|
37
36
|
throw TypeError("Cannot add the same private member more than once");
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
class
|
|
41
|
-
constructor(
|
|
37
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
38
|
+
}, d = (i, s, e, r) => (Et(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), f = (i, s, e) => (Et(i, s, "access private method"), e), o, C, R, O, T, q, k, J, Q, X, u, ct, c, Y, j, v, p, W, H, m, B, P, N, ut, F, U, pt, kt, ft, Wt, tt, vt, et, _t, V, mt, xt, Dt, st, it, St, _, w, L, y;
|
|
39
|
+
class Qt {
|
|
40
|
+
constructor(s, e) {
|
|
42
41
|
D(this, _, void 0);
|
|
43
|
-
D(this,
|
|
44
|
-
D(this,
|
|
45
|
-
D(this,
|
|
46
|
-
$(this, _,
|
|
42
|
+
D(this, w, void 0);
|
|
43
|
+
D(this, L, 0);
|
|
44
|
+
D(this, y, 0);
|
|
45
|
+
$(this, _, s), $(this, w, e), I.register(n(this, _));
|
|
47
46
|
}
|
|
48
47
|
get size() {
|
|
49
|
-
return
|
|
48
|
+
return n(this, L);
|
|
50
49
|
}
|
|
51
50
|
get position() {
|
|
52
|
-
return
|
|
51
|
+
return n(this, y);
|
|
53
52
|
}
|
|
54
53
|
destroy() {
|
|
55
|
-
|
|
54
|
+
I.unregister(n(this, _)), n(this, _).style.transform = "";
|
|
56
55
|
}
|
|
57
56
|
resize() {
|
|
58
|
-
$(this,
|
|
57
|
+
$(this, L, n(this, w).vertical ? n(this, _).offsetHeight : n(this, _).offsetWidth), $(this, y, n(this, w).vertical ? gt(n(this, _)) : wt(n(this, _))), $(this, y, n(this, y) - n(this, w).contentPosition);
|
|
59
58
|
}
|
|
60
59
|
transform() {
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
h(this, W) + h(this, T)
|
|
60
|
+
let s = 0;
|
|
61
|
+
n(this, w).infiniteAttribute.current && n(this, w).overscroll && n(this, y) + n(this, L) < n(this, w).currentScrollValue && (s = n(this, w).distance * -1), I.update(
|
|
62
|
+
n(this, _),
|
|
63
|
+
n(this, w).axisAttibute.current,
|
|
64
|
+
s
|
|
67
65
|
);
|
|
68
|
-
|
|
66
|
+
const e = n(this, w).viewportSize - n(this, L), r = zt(
|
|
67
|
+
n(this, w).currentScrollValue + s,
|
|
68
|
+
n(this, y) - n(this, w).viewportSize - e,
|
|
69
|
+
n(this, y) + n(this, L) + e
|
|
70
|
+
);
|
|
71
|
+
n(this, w).vertical ? n(this, _).style.transform = `translate3d(0px, ${r * -1}px, 0px)` : n(this, _).style.transform = `translate3d(${r * -1}px, 0px, 0px)`;
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
_ = new WeakMap(),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
_ = new WeakMap(), w = new WeakMap(), L = new WeakMap(), y = new WeakMap();
|
|
75
|
+
const Xt = Vt({
|
|
76
|
+
":host": {
|
|
77
|
+
position: "relative",
|
|
78
|
+
width: "100%",
|
|
79
|
+
height: "100%",
|
|
80
|
+
display: "block",
|
|
81
|
+
outline: "none"
|
|
82
|
+
},
|
|
83
|
+
':host([hibernated="true"])': {
|
|
84
|
+
display: "contents"
|
|
85
|
+
},
|
|
86
|
+
".static": {
|
|
87
|
+
position: "absolute",
|
|
88
|
+
top: "0",
|
|
89
|
+
left: "0",
|
|
90
|
+
zIndex: "1",
|
|
91
|
+
width: "100%",
|
|
92
|
+
height: "100%"
|
|
93
|
+
},
|
|
94
|
+
".content": {
|
|
95
|
+
position: "relative",
|
|
96
|
+
display: "flex",
|
|
97
|
+
width: "100%",
|
|
98
|
+
height: "100%",
|
|
99
|
+
gap: "var(--gap, 0px)"
|
|
100
|
+
},
|
|
101
|
+
':host([hibernated="true"]) .content': {
|
|
102
|
+
display: "contents"
|
|
103
|
+
},
|
|
104
|
+
"::slotted(*)": {
|
|
105
|
+
flexShrink: "0"
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
let dt = class extends Lt {
|
|
109
|
+
constructor(i) {
|
|
110
|
+
if (super(), h(this, N), h(this, F), h(this, pt), h(this, ft), h(this, tt), h(this, et), h(this, xt), h(this, it), h(this, o, null), h(this, C, new E(this, "axis", "y")), h(this, R, new E(this, "pages", 0, {
|
|
75
111
|
validate: (s) => Math.max(0, s - 1)
|
|
76
|
-
})),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
112
|
+
})), h(this, O, new E(this, "split", !1)), h(this, T, new E(this, "sectional", !1)), h(this, q, new E(
|
|
113
|
+
this,
|
|
114
|
+
"wheel-max-delta",
|
|
115
|
+
!1
|
|
116
|
+
)), h(this, k, new E(this, "infinite", !1)), h(this, J, new E(this, "damping", 0.03)), h(this, Q, new E(this, "disabled", !1)), h(this, X, new E(this, "hibernated", !1)), h(this, u, null), h(this, ct, null), h(this, c, []), h(this, Y, 0), h(this, j, 0), h(this, v, 0), h(this, p, 0), h(this, W, null), h(this, H, null), h(this, m, new Ht(0)), h(this, B, 0), h(this, P, 0), h(this, V, () => {
|
|
117
|
+
const s = this.currentScrollValue / t(this, p);
|
|
118
|
+
if (d(this, Y, this.vertical ? gt(this) : wt(this)), d(this, j, this.vertical ? gt(t(this, u)) : wt(t(this, u))), d(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, R).current) {
|
|
119
|
+
d(this, p, t(this, v) * t(this, R).current);
|
|
120
|
+
const e = t(this, p) + t(this, v);
|
|
121
|
+
this.vertical ? (t(this, u).style.width = e + "px", t(this, u).style.height = "100%") : (t(this, u).style.height = e + "px", t(this, u).style.width = "100%");
|
|
82
122
|
} else
|
|
83
|
-
this.vertical ? (t(this,
|
|
84
|
-
if (t(this,
|
|
123
|
+
this.vertical ? (t(this, u).style.width = "100%", t(this, u).style.height = "max-content", d(this, p, t(this, u).offsetHeight - t(this, v))) : (t(this, u).style.width = "max-content", t(this, u).style.height = "100%", d(this, p, t(this, u).offsetWidth - t(this, v)));
|
|
124
|
+
if (!t(this, k).current) {
|
|
125
|
+
const e = getComputedStyle(this);
|
|
126
|
+
d(this, p, t(this, p) + (this.vertical ? parseFloat(e.paddingBlockStart) + parseFloat(e.paddingBlockEnd) : parseFloat(e.paddingInlineStart) + parseFloat(e.paddingInlineEnd))), t(this, o).max.current = t(this, p);
|
|
127
|
+
}
|
|
128
|
+
if (t(this, c).forEach((e) => {
|
|
85
129
|
e.resize(), e.transform();
|
|
86
|
-
}), t(this,
|
|
87
|
-
const e = t(this, c)[t(this, c).length - 1],
|
|
88
|
-
|
|
130
|
+
}), t(this, k).current && t(this, c).length) {
|
|
131
|
+
const e = t(this, c)[t(this, c).length - 1], r = e.position + e.size - t(this, v), a = t(this, p) - r;
|
|
132
|
+
d(this, P, e.position + e.size + a);
|
|
89
133
|
} else
|
|
90
|
-
|
|
91
|
-
if (t(this,
|
|
134
|
+
d(this, P, t(this, p));
|
|
135
|
+
if (t(this, T).current && t(this, c).length) {
|
|
92
136
|
const e = t(this, c)[t(this, m).current];
|
|
93
|
-
t(this,
|
|
137
|
+
t(this, o).set(e.position, !0);
|
|
94
138
|
} else
|
|
95
|
-
t(this,
|
|
96
|
-
}),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
139
|
+
t(this, o).set(s * t(this, p), !0);
|
|
140
|
+
}), h(this, mt, () => {
|
|
141
|
+
const s = this.currentScrollValue;
|
|
142
|
+
if (d(this, B, Math.max(0, s - t(this, p))), t(this, c).length) {
|
|
143
|
+
let e = 0;
|
|
144
|
+
for (let r = 0; r < t(this, c).length; r++) {
|
|
145
|
+
const a = t(this, c)[r];
|
|
146
|
+
a.transform(), this.targetScrollValue + this.viewportSize / 2 >= a.position && (e = r);
|
|
102
147
|
}
|
|
103
|
-
t(this, m).current =
|
|
148
|
+
t(this, m).current = e;
|
|
104
149
|
} else
|
|
105
|
-
this.vertical ? t(this,
|
|
106
|
-
|
|
107
|
-
}),
|
|
150
|
+
this.vertical ? t(this, u).style.transform = `translate3d(0px, ${s * -1}px, 0px)` : t(this, u).style.transform = `translate3d(${s * -1}px, 0px, 0px)`;
|
|
151
|
+
I.update(this, t(this, C).current, s);
|
|
152
|
+
}), h(this, st, (s) => {
|
|
108
153
|
if (typeof s == "number")
|
|
109
|
-
if (t(this,
|
|
154
|
+
if (t(this, T).current) {
|
|
110
155
|
const e = Math.sign(s);
|
|
111
|
-
t(this, c).length ? this.shiftSections(e) : t(this,
|
|
156
|
+
t(this, c).length ? this.shiftSections(e) : t(this, o).shift(e * t(this, v));
|
|
112
157
|
} else
|
|
113
|
-
t(this,
|
|
158
|
+
t(this, o).shift(s);
|
|
114
159
|
else
|
|
115
|
-
s === "min" ? t(this,
|
|
116
|
-
}),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
t(this, p).style.flexDirection = n === "x" ? "row" : "column", t(this, V).axis = n, this.isConnected && t(this, R).call(this);
|
|
165
|
-
}), t(this, A).subscribe(() => {
|
|
166
|
-
this.isConnected && t(this, R).call(this);
|
|
167
|
-
}), t(this, L).subscribe((n) => {
|
|
168
|
-
t(this, m).current = 0, t(this, V).debounce = n.current, t(this, a).reset(), this.isConnected && (n.current && !n.previous ? f(this, N, ot).call(this) : !n.current && n.previous && f(this, B, Q).call(this));
|
|
169
|
-
}), t(this, x).subscribe((n) => {
|
|
170
|
-
n.current ? (this.isConnected && (t(this, c).length || (t(this, y).current = !0)), t(this, c).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (g(this, J, 0), t(this, a).max = t(this, d), t(this, a).min = 0);
|
|
171
|
-
}), t(this, y).subscribe(({ current: n }) => {
|
|
172
|
-
this.isConnected && (n ? f(this, N, ot).call(this) : f(this, B, Q).call(this));
|
|
173
|
-
}), t(this, H).subscribe((n) => {
|
|
174
|
-
t(this, a).damping = n.current;
|
|
175
|
-
}), t(this, I).subscribe((n) => {
|
|
176
|
-
n.current && !n.previous ? f(this, at, gt).call(this) : !n.current && n.previous && f(this, ct, wt).call(this);
|
|
177
|
-
}), t(this, K).subscribe((n) => {
|
|
178
|
-
n.current && !n.previous ? f(this, j, dt).call(this) : !n.current && n.previous && f(this, tt, ft).call(this);
|
|
160
|
+
s === "min" ? t(this, o).set(t(this, o).min.current) : s === "max" && t(this, o).set(t(this, o).delta);
|
|
161
|
+
}), At) {
|
|
162
|
+
let s, e = i || this.getAttribute("name");
|
|
163
|
+
e && (s = {
|
|
164
|
+
name: e
|
|
165
|
+
}), d(this, o, new Bt({
|
|
166
|
+
damping: 0.01,
|
|
167
|
+
min: 0,
|
|
168
|
+
order: Nt.SCROLL,
|
|
169
|
+
passport: s
|
|
170
|
+
})), this.openShadow(Xt), Ot(this, {
|
|
171
|
+
attributes: {
|
|
172
|
+
tabIndex: 0
|
|
173
|
+
},
|
|
174
|
+
shadowChildren: [
|
|
175
|
+
Mt({
|
|
176
|
+
class: "static",
|
|
177
|
+
children: [bt({ attributes: { name: "static" } })]
|
|
178
|
+
}),
|
|
179
|
+
Mt({
|
|
180
|
+
class: "content",
|
|
181
|
+
children: [bt({ ref: (r) => d(this, ct, r) })],
|
|
182
|
+
style: {
|
|
183
|
+
flexDirection: new Ft(
|
|
184
|
+
t(this, C),
|
|
185
|
+
(r) => r === "x" ? "row" : "column"
|
|
186
|
+
)
|
|
187
|
+
},
|
|
188
|
+
ref: (r) => d(this, u, r)
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
}), d(this, W, new Kt({ element: this })), t(this, W).changeEvent.subscribe(t(this, st)), d(this, H, new Gt({ element: this })), t(this, H).changeEvent.subscribe(t(this, st)), t(this, C).subscribe(({ current: r }) => {
|
|
192
|
+
t(this, u).style.flexDirection = r === "x" ? "row" : "column", t(this, W).axis = t(this, q).current ? "max" : r, this.isConnected && t(this, V).call(this);
|
|
193
|
+
}), t(this, q).subscribe((r) => {
|
|
194
|
+
t(this, W).axis = r.current ? "max" : t(this, C).current;
|
|
195
|
+
}), t(this, R).subscribe(() => {
|
|
196
|
+
this.isConnected && t(this, V).call(this);
|
|
197
|
+
}), t(this, O).subscribe(({ current: r }) => {
|
|
198
|
+
this.isConnected && (r ? f(this, N, ut).call(this) : f(this, F, U).call(this));
|
|
199
|
+
}), t(this, T).subscribe((r) => {
|
|
200
|
+
t(this, m).current = 0, t(this, W).debounce = r.current, t(this, o).reset(), this.isConnected && (r.current && !r.previous ? f(this, N, ut).call(this) : !r.current && r.previous && f(this, F, U).call(this));
|
|
201
|
+
}), t(this, k).subscribe((r) => {
|
|
202
|
+
r.current ? (this.isConnected && (t(this, c).length || (t(this, O).current = !0)), t(this, c).length && (t(this, o).max.current = 1 / 0, t(this, o).min.current = -1 / 0)) : (d(this, B, 0), t(this, o).max.current = t(this, p), t(this, o).min.current = 0);
|
|
203
|
+
}), t(this, J).subscribe((r) => {
|
|
204
|
+
t(this, o).damping = r.current;
|
|
205
|
+
}), t(this, Q).subscribe((r) => {
|
|
206
|
+
r.current && !r.previous ? f(this, pt, kt).call(this) : !r.current && r.previous && f(this, ft, Wt).call(this);
|
|
207
|
+
}), t(this, X).subscribe((r) => {
|
|
208
|
+
r.current && !r.previous ? f(this, tt, vt).call(this) : !r.current && r.previous && f(this, et, _t).call(this);
|
|
179
209
|
});
|
|
180
210
|
}
|
|
181
211
|
}
|
|
182
212
|
get currentScrollValue() {
|
|
183
|
-
return f(this,
|
|
213
|
+
return f(this, it, St).call(this, "current");
|
|
184
214
|
}
|
|
185
215
|
get targetScrollValue() {
|
|
186
|
-
return f(this,
|
|
216
|
+
return f(this, it, St).call(this, "target");
|
|
187
217
|
}
|
|
188
218
|
get damped() {
|
|
189
|
-
return t(this,
|
|
219
|
+
return t(this, o);
|
|
190
220
|
}
|
|
191
221
|
get dampedAttibute() {
|
|
192
|
-
return t(this,
|
|
222
|
+
return t(this, o);
|
|
193
223
|
}
|
|
194
224
|
get axisAttibute() {
|
|
195
|
-
return t(this,
|
|
225
|
+
return t(this, C);
|
|
196
226
|
}
|
|
197
227
|
get pagesAttibute() {
|
|
198
|
-
return t(this,
|
|
228
|
+
return t(this, R);
|
|
229
|
+
}
|
|
230
|
+
get splitAttibute() {
|
|
231
|
+
return t(this, O);
|
|
199
232
|
}
|
|
200
233
|
get sectionalAttibute() {
|
|
201
|
-
return t(this,
|
|
234
|
+
return t(this, T);
|
|
202
235
|
}
|
|
203
236
|
get infiniteAttribute() {
|
|
204
|
-
return t(this,
|
|
205
|
-
}
|
|
206
|
-
get splitAttibute() {
|
|
207
|
-
return t(this, y);
|
|
237
|
+
return t(this, k);
|
|
208
238
|
}
|
|
209
239
|
get dampingAttibute() {
|
|
210
|
-
return t(this,
|
|
240
|
+
return t(this, J);
|
|
211
241
|
}
|
|
212
242
|
get disabledAttibute() {
|
|
213
|
-
return t(this,
|
|
243
|
+
return t(this, Q);
|
|
214
244
|
}
|
|
215
245
|
get hibernatedAttibute() {
|
|
216
|
-
return t(this,
|
|
246
|
+
return t(this, X);
|
|
247
|
+
}
|
|
248
|
+
get contentElement() {
|
|
249
|
+
return t(this, u);
|
|
217
250
|
}
|
|
218
251
|
get position() {
|
|
219
252
|
return t(this, Y);
|
|
220
253
|
}
|
|
254
|
+
get contentPosition() {
|
|
255
|
+
return t(this, j);
|
|
256
|
+
}
|
|
221
257
|
get viewportSize() {
|
|
222
|
-
return t(this,
|
|
258
|
+
return t(this, v);
|
|
223
259
|
}
|
|
224
260
|
get scrollSize() {
|
|
225
|
-
return t(this,
|
|
261
|
+
return t(this, p);
|
|
226
262
|
}
|
|
227
263
|
get counter() {
|
|
228
264
|
return t(this, m);
|
|
@@ -231,10 +267,10 @@ let ut = class extends kt {
|
|
|
231
267
|
return t(this, P);
|
|
232
268
|
}
|
|
233
269
|
get overscroll() {
|
|
234
|
-
return t(this,
|
|
270
|
+
return t(this, B);
|
|
235
271
|
}
|
|
236
272
|
get vertical() {
|
|
237
|
-
return t(this,
|
|
273
|
+
return t(this, C).current === "y";
|
|
238
274
|
}
|
|
239
275
|
get currentProgress() {
|
|
240
276
|
return this.currentScrollValue / t(this, P);
|
|
@@ -243,202 +279,201 @@ let ut = class extends kt {
|
|
|
243
279
|
return this.targetScrollValue / t(this, P);
|
|
244
280
|
}
|
|
245
281
|
// TODO: Поправить значение когда скролл не секционный ??
|
|
246
|
-
scrollToSection(
|
|
282
|
+
scrollToSection(i, s = "smooth") {
|
|
247
283
|
if (!t(this, c).length)
|
|
248
284
|
return;
|
|
249
|
-
const
|
|
250
|
-
f(this,
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
-
let
|
|
254
|
-
const
|
|
255
|
-
t(this, m).current === 0 &&
|
|
285
|
+
const e = t(this, m).current;
|
|
286
|
+
f(this, xt, Dt).call(this, i);
|
|
287
|
+
const r = t(this, c)[e], a = t(this, c)[t(this, m).current];
|
|
288
|
+
if (r && a) {
|
|
289
|
+
let g = 0;
|
|
290
|
+
const x = t(this, c).length - 1;
|
|
291
|
+
t(this, k).current ? t(this, m).current === 0 && e === x ? g = t(this, p) + t(this, v) - r.position : t(this, m).current === x && e === 0 ? g = a.position - (t(this, p) + t(this, v)) : g = a.position - r.position : g = a.position - r.position, t(this, o).shift(g, s === "instant");
|
|
256
292
|
}
|
|
257
293
|
}
|
|
258
|
-
shiftSections(
|
|
259
|
-
t(this, c).length && this.scrollToSection(t(this, m).current +
|
|
294
|
+
shiftSections(i, s = "smooth") {
|
|
295
|
+
t(this, c).length && this.scrollToSection(t(this, m).current + i, s);
|
|
260
296
|
}
|
|
261
297
|
connectedCallback() {
|
|
262
|
-
f(this,
|
|
298
|
+
f(this, et, _t).call(this);
|
|
263
299
|
}
|
|
264
300
|
disconnectedCallback() {
|
|
265
|
-
f(this,
|
|
301
|
+
f(this, tt, vt).call(this);
|
|
266
302
|
}
|
|
267
303
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
304
|
+
o = /* @__PURE__ */ new WeakMap();
|
|
305
|
+
C = /* @__PURE__ */ new WeakMap();
|
|
306
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
307
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
308
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
309
|
+
q = /* @__PURE__ */ new WeakMap();
|
|
310
|
+
k = /* @__PURE__ */ new WeakMap();
|
|
311
|
+
J = /* @__PURE__ */ new WeakMap();
|
|
312
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
313
|
+
X = /* @__PURE__ */ new WeakMap();
|
|
314
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
315
|
+
ct = /* @__PURE__ */ new WeakMap();
|
|
278
316
|
c = /* @__PURE__ */ new WeakMap();
|
|
279
317
|
Y = /* @__PURE__ */ new WeakMap();
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
318
|
+
j = /* @__PURE__ */ new WeakMap();
|
|
319
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
320
|
+
p = /* @__PURE__ */ new WeakMap();
|
|
321
|
+
W = /* @__PURE__ */ new WeakMap();
|
|
322
|
+
H = /* @__PURE__ */ new WeakMap();
|
|
284
323
|
m = /* @__PURE__ */ new WeakMap();
|
|
285
|
-
|
|
324
|
+
B = /* @__PURE__ */ new WeakMap();
|
|
286
325
|
P = /* @__PURE__ */ new WeakMap();
|
|
287
326
|
N = /* @__PURE__ */ new WeakSet();
|
|
288
|
-
|
|
289
|
-
f(this,
|
|
290
|
-
|
|
291
|
-
}), t(this,
|
|
292
|
-
};
|
|
293
|
-
B = /* @__PURE__ */ new WeakSet();
|
|
294
|
-
Q = function() {
|
|
295
|
-
t(this, c).forEach((s) => {
|
|
296
|
-
s.destroy();
|
|
297
|
-
}), g(this, c, []);
|
|
327
|
+
ut = function() {
|
|
328
|
+
f(this, F, U).call(this), t(this, ct).assignedElements().forEach((i) => {
|
|
329
|
+
i instanceof HTMLElement && t(this, c).push(new Qt(i, this));
|
|
330
|
+
}), t(this, u).style.transform = "", t(this, V).call(this);
|
|
298
331
|
};
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
t(this,
|
|
332
|
+
F = /* @__PURE__ */ new WeakSet();
|
|
333
|
+
U = function() {
|
|
334
|
+
t(this, c).forEach((i) => {
|
|
335
|
+
i.destroy();
|
|
336
|
+
}), d(this, c, []);
|
|
302
337
|
};
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
t(this,
|
|
338
|
+
pt = /* @__PURE__ */ new WeakSet();
|
|
339
|
+
kt = function() {
|
|
340
|
+
t(this, o).unsubscribe(t(this, mt)), t(this, o).unlistenAnimationFrame(), t(this, W).disconnect(), t(this, H).disconnect();
|
|
306
341
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
342
|
+
ft = /* @__PURE__ */ new WeakSet();
|
|
343
|
+
Wt = function() {
|
|
344
|
+
t(this, o).subscribe(t(this, mt)), t(this, W).connect(), t(this, H).connect();
|
|
310
345
|
};
|
|
311
346
|
tt = /* @__PURE__ */ new WeakSet();
|
|
312
|
-
|
|
313
|
-
t(this,
|
|
347
|
+
vt = function() {
|
|
348
|
+
ot.unsubscribe(t(this, V)), t(this, o).reset(), f(this, pt, kt).call(this), t(this, u).style.transform = "", t(this, O).current && f(this, F, U).call(this), I.unregister(this);
|
|
314
349
|
};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
350
|
+
et = /* @__PURE__ */ new WeakSet();
|
|
351
|
+
_t = function() {
|
|
352
|
+
t(this, O).current && f(this, N, ut).call(this), I.register(this), ot.subscribe(t(this, V), Pt.SCROLL), f(this, ft, Wt).call(this);
|
|
353
|
+
};
|
|
354
|
+
V = /* @__PURE__ */ new WeakMap();
|
|
355
|
+
mt = /* @__PURE__ */ new WeakMap();
|
|
356
|
+
xt = /* @__PURE__ */ new WeakSet();
|
|
357
|
+
Dt = function(i) {
|
|
358
|
+
t(this, k).current ? (t(this, m).current = i % t(this, c).length, t(this, m).current = t(this, m).current < 0 ? t(this, c).length + t(this, m).current : t(this, m).current) : t(this, m).current = zt(i, 0, t(this, c).length - 1);
|
|
320
359
|
};
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
if (t(this,
|
|
325
|
-
const
|
|
326
|
-
return
|
|
360
|
+
st = /* @__PURE__ */ new WeakMap();
|
|
361
|
+
it = /* @__PURE__ */ new WeakSet();
|
|
362
|
+
St = function(i = "current") {
|
|
363
|
+
if (t(this, k).current && t(this, c).length) {
|
|
364
|
+
const s = t(this, o)[i] % (t(this, p) + t(this, v));
|
|
365
|
+
return s < 0 ? t(this, p) + s + t(this, v) : s;
|
|
327
366
|
} else
|
|
328
|
-
return t(this,
|
|
367
|
+
return t(this, o)[i];
|
|
329
368
|
};
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
],
|
|
333
|
-
var
|
|
334
|
-
class
|
|
369
|
+
dt = Jt([
|
|
370
|
+
$t("e-scroll")
|
|
371
|
+
], dt);
|
|
372
|
+
var Z;
|
|
373
|
+
class Yt extends Lt {
|
|
335
374
|
constructor() {
|
|
336
375
|
super(...arguments);
|
|
337
|
-
D(this,
|
|
376
|
+
D(this, Z, null);
|
|
338
377
|
}
|
|
339
378
|
get scrollElement() {
|
|
340
|
-
return
|
|
379
|
+
return n(this, Z);
|
|
341
380
|
}
|
|
342
381
|
connectedCallback() {
|
|
343
|
-
const
|
|
344
|
-
|
|
382
|
+
const e = Ut(this, dt);
|
|
383
|
+
e instanceof dt ? $(this, Z, e) : console.error(this, "e-scroll not found");
|
|
345
384
|
}
|
|
346
385
|
}
|
|
347
|
-
|
|
348
|
-
var
|
|
349
|
-
for (var
|
|
350
|
-
(
|
|
351
|
-
return
|
|
352
|
-
},
|
|
353
|
-
if (!
|
|
354
|
-
throw TypeError("Cannot " +
|
|
355
|
-
},
|
|
356
|
-
if (
|
|
386
|
+
Z = new WeakMap();
|
|
387
|
+
var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, ee = (i, s, e, r) => {
|
|
388
|
+
for (var a = r > 1 ? void 0 : r ? te(s, e) : s, g = i.length - 1, x; g >= 0; g--)
|
|
389
|
+
(x = i[g]) && (a = (r ? x(s, e, a) : x(a)) || a);
|
|
390
|
+
return r && a && jt(s, e, a), a;
|
|
391
|
+
}, Rt = (i, s, e) => {
|
|
392
|
+
if (!s.has(i))
|
|
393
|
+
throw TypeError("Cannot " + e);
|
|
394
|
+
}, l = (i, s, e) => (Rt(i, s, "read from private field"), e ? e.call(i) : s.get(i)), S = (i, s, e) => {
|
|
395
|
+
if (s.has(i))
|
|
357
396
|
throw TypeError("Cannot add the same private member more than once");
|
|
358
|
-
|
|
359
|
-
},
|
|
360
|
-
|
|
397
|
+
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
398
|
+
}, M = (i, s, e, r) => (Rt(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), rt, b, A, z, K, G, nt, ht, lt, at;
|
|
399
|
+
const se = Vt({
|
|
400
|
+
":host": {
|
|
401
|
+
display: "inline-block",
|
|
402
|
+
zIndex: "1",
|
|
403
|
+
backgroundColor: "#efefef"
|
|
404
|
+
},
|
|
405
|
+
':host([axis="y"])': {
|
|
406
|
+
position: "absolute",
|
|
407
|
+
right: "0",
|
|
408
|
+
top: "0",
|
|
409
|
+
width: "1vmin",
|
|
410
|
+
height: "100%"
|
|
411
|
+
},
|
|
412
|
+
':host([axis="x"])': {
|
|
413
|
+
position: "absolute",
|
|
414
|
+
left: "0",
|
|
415
|
+
bottom: "0",
|
|
416
|
+
width: "100%",
|
|
417
|
+
height: "1vmin"
|
|
418
|
+
},
|
|
419
|
+
".default-thumb": {
|
|
420
|
+
backgroundColor: "#181818",
|
|
421
|
+
borderRadius: "1vmin",
|
|
422
|
+
touchAction: "none"
|
|
423
|
+
},
|
|
424
|
+
"::slotted(*)": {
|
|
425
|
+
touchAction: "none"
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
let Ct = class extends Yt {
|
|
361
429
|
constructor() {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
}), S(this,
|
|
367
|
-
|
|
368
|
-
}), S(this,
|
|
430
|
+
super(), S(this, rt, null), S(this, b, null), S(this, A, !1), S(this, z, 0), S(this, K, 0), S(this, G, 0), S(this, nt, () => {
|
|
431
|
+
M(this, A, this.offsetWidth > this.offsetHeight);
|
|
432
|
+
const i = l(this, A) ? this.offsetWidth : this.offsetHeight;
|
|
433
|
+
M(this, z, i / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / i)), M(this, z, Math.max(l(this, z), 30)), l(this, A) ? (l(this, b).style.width = l(this, z) + "px", l(this, b).style.height = "100%") : (l(this, b).style.width = "100%", l(this, b).style.height = l(this, z) + "px"), M(this, K, i - l(this, z)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
434
|
+
}), S(this, ht, () => {
|
|
435
|
+
M(this, G, this.scrollElement.currentProgress * l(this, K)), l(this, A) ? l(this, b).style.transform = `translate3d(${l(this, G)}px, 0px, 0px)` : l(this, b).style.transform = `translate3d(0px, ${l(this, G)}px, 0px)`;
|
|
436
|
+
}), S(this, lt, () => {
|
|
369
437
|
this.setAttribute("axis", this.scrollElement.axisAttibute.current);
|
|
370
|
-
}), S(this,
|
|
371
|
-
const
|
|
372
|
-
const
|
|
373
|
-
this.scrollElement.damped.set(
|
|
374
|
-
},
|
|
375
|
-
removeEventListener("pointermove",
|
|
438
|
+
}), S(this, at, (i) => {
|
|
439
|
+
const s = (g) => {
|
|
440
|
+
const x = l(this, A) ? g.x : g.y, Tt = this.scrollElement.distance / l(this, K), It = (x - a) * Tt;
|
|
441
|
+
this.scrollElement.damped.set(r + It);
|
|
442
|
+
}, e = () => {
|
|
443
|
+
removeEventListener("pointermove", s), removeEventListener("pointerup", e), removeEventListener("touchend", e);
|
|
376
444
|
};
|
|
377
|
-
addEventListener("pointermove",
|
|
378
|
-
const
|
|
379
|
-
}),
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
:host {
|
|
383
|
-
display: inline-block;
|
|
384
|
-
z-index: 1;
|
|
385
|
-
background-color: #efefef;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
:host([axis="y"]) {
|
|
389
|
-
position: absolute;
|
|
390
|
-
right: 0;
|
|
391
|
-
top: 0;
|
|
392
|
-
width: 1vmin;
|
|
393
|
-
height: 100%;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
:host([axis="x"]) {
|
|
397
|
-
position: absolute;
|
|
398
|
-
left: 0;
|
|
399
|
-
bottom: 0;
|
|
400
|
-
width: 100%;
|
|
401
|
-
height: 1vmin;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.default-thumb {
|
|
405
|
-
background-color: #181818;
|
|
406
|
-
border-radius: 1vmin;
|
|
407
|
-
touch-action: none;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
::slotted(*) {
|
|
411
|
-
touch-action: none;
|
|
412
|
-
}
|
|
413
|
-
`, s.appendChild(e), C(this, F, document.createElement("slot")), s.appendChild(r(this, F));
|
|
414
|
-
}
|
|
445
|
+
addEventListener("pointermove", s), addEventListener("pointerup", e), addEventListener("touchend", e);
|
|
446
|
+
const r = this.scrollElement.damped.target, a = l(this, A) ? i.x : i.y;
|
|
447
|
+
}), At && (this.openShadow(se), Ot(this, {
|
|
448
|
+
shadowChildren: [bt({ ref: (i) => M(this, rt, i) })]
|
|
449
|
+
}));
|
|
415
450
|
}
|
|
416
451
|
get thumbElement() {
|
|
417
|
-
return
|
|
452
|
+
return l(this, b);
|
|
418
453
|
}
|
|
419
454
|
connectedCallback() {
|
|
420
455
|
super.connectedCallback();
|
|
421
|
-
const
|
|
422
|
-
|
|
456
|
+
const i = l(this, rt).assignedElements()[0];
|
|
457
|
+
i instanceof HTMLElement ? M(this, b, i) : (M(this, b, document.createElement("div")), l(this, b).classList.add("default-thumb"), this.shadowRoot.appendChild(l(this, b))), l(this, b).addEventListener("pointerdown", l(this, at)), ot.subscribe(l(this, nt), Pt.SCROLL + 1), this.scrollElement.damped.subscribe(l(this, ht)), this.scrollElement.axisAttibute.subscribe(l(this, lt));
|
|
423
458
|
}
|
|
424
459
|
disconnectedCallback() {
|
|
425
|
-
|
|
460
|
+
l(this, b).removeEventListener("pointerdown", l(this, at)), ot.unsubscribe(l(this, nt)), this.scrollElement.damped.unsubscribe(l(this, ht)), this.scrollElement.axisAttibute.unsubscribe(l(this, lt));
|
|
426
461
|
}
|
|
427
462
|
};
|
|
428
|
-
|
|
463
|
+
rt = /* @__PURE__ */ new WeakMap();
|
|
429
464
|
b = /* @__PURE__ */ new WeakMap();
|
|
465
|
+
A = /* @__PURE__ */ new WeakMap();
|
|
430
466
|
z = /* @__PURE__ */ new WeakMap();
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
Z = /* @__PURE__ */ new WeakMap();
|
|
434
|
-
it = /* @__PURE__ */ new WeakMap();
|
|
467
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
468
|
+
G = /* @__PURE__ */ new WeakMap();
|
|
435
469
|
nt = /* @__PURE__ */ new WeakMap();
|
|
436
|
-
rt = /* @__PURE__ */ new WeakMap();
|
|
437
470
|
ht = /* @__PURE__ */ new WeakMap();
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
471
|
+
lt = /* @__PURE__ */ new WeakMap();
|
|
472
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
473
|
+
Ct = ee([
|
|
474
|
+
$t("e-scrollbar")
|
|
475
|
+
], Ct);
|
|
441
476
|
export {
|
|
442
|
-
|
|
443
|
-
|
|
477
|
+
dt as ScrollElement,
|
|
478
|
+
Ct as ScrollbarElement
|
|
444
479
|
};
|