aptechka 0.30.13 → 0.30.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +43 -38
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +152 -152
- package/package.json +1 -1
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var R=i=>{throw TypeError(i)};var q=(i,r,t)=>r.has(i)||R("Cannot "+t);var e=(i,r,t)=>(q(i,r,"read from private field"),t?t.call(i):r.get(i)),o=(i,r,t)=>r.has(i)?R("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,t),h=(i,r,t,l)=>(q(i,r,"write to private field"),l?l.call(i,t):r.set(i,t),t),b=(i,r,t)=>(q(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("../attribute/index.cjs"),N=require("../Store-CDb6RMce.cjs"),A=require("../events-KVanG9sR.cjs"),j=require("../style-At6aDoqG.cjs"),D=require("../browser-CpzFX2xg.cjs");var L,a,T,p,u,v,g,d,I,E,O,y,x,m;const c=class c extends HTMLElement{constructor(){super(...arguments);o(this,d);o(this,L);o(this,a);o(this,T);o(this,p);o(this,u);o(this,v);o(this,g);o(this,E);o(this,y);o(this,m);h(this,L,-1),h(this,a,new N.Store(!1)),h(this,p,new H.Attribute(this,"history",!1)),h(this,u,new H.Attribute(this,"restore",!1)),h(this,v,new H.Attribute(this,"single",!1)),h(this,g,!1),this.open=(t=!0)=>{if(e(this,a).current)return;e(this,a).current=!0,e(this,v).current&&(c.__opened.forEach(n=>n.close()),c.__opened=[]),c.__opened.push(this),h(this,L,c.__opened.length-1),e(this,p).current&&e(this,g)&&history.pushState("","",e(this,d,I)),clearTimeout(e(this,T)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",A.dispatchEvent(this,"popoverTriggered",{custom:!0});const l=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,y)),this.style.opacity="1",this.classList.add("opened"),A.dispatchEvent(this,"popoverOpened",{custom:!0})};t?setTimeout(l,10):l()},this.close=()=>{e(this,a).current&&(e(this,a).current=!1,c.__opened=c.__opened.filter(t=>t!==this),b(this,d,O).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",A.dispatchEvent(this,"popoverClosing",{custom:!0}),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",A.dispatchEvent(this,"popoverClosed",{custom:!0})},j.getElementTransitionDurationMS(this)+10))},h(this,E,t=>{b(this,d,x).call(this,()=>{var $;const l=t.composedPath();if(l.find(P=>P instanceof HTMLElement&&P.hasAttribute("data-popover-content")))return;const n=l[0],_=n instanceof HTMLElement&&(this.contains(n)||(($=this.shadowRoot)==null?void 0:$.contains(n))),f=n instanceof HTMLElement&&n.hasAttribute("data-outside");(!_||f)&&this.close()})}),h(this,y,t=>{b(this,d,x).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,m,()=>{h(this,g,!1),e(this,a).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,a).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),h(this,g,!0)})}get history(){return e(this,p)}get restore(){return e(this,u)}get single(){return e(this,v)}get opened(){return e(this,a)}connectedCallback(){e(this,p).observe(),e(this,u).observe(),e(this,v).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,m)),setTimeout(()=>{e(this,u).current?e(this,m).call(this):(b(this,d,O).call(this),h(this,g,!0))},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,u).unobserve(),e(this,v).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,T)),removeEventListener("popstate",e(this,m))}};L=new WeakMap,a=new WeakMap,T=new WeakMap,p=new WeakMap,u=new WeakMap,v=new WeakMap,g=new WeakMap,d=new WeakSet,I=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,O=function(){if(e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},y=new WeakMap,x=function(t){(c.__opened[e(this,L)-1]||c.__opened.length===1)&&t()},m=new WeakMap,c.__opened=[];let M=c;customElements.get("e-popover")||customElements.define("e-popover",M);var s,w,k,S,C;class B extends HTMLElement{constructor(){super();o(this,s);o(this,w,()=>{this.classList.add("triggered")});o(this,k,()=>{this.classList.add("opened")});o(this,S,()=>{this.classList.remove("opened")});o(this,C,()=>{this.classList.remove("triggered")});D.isBrowser&&(this.addEventListener("click",()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,s)}connectedCallback(){var l;this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let n=null;if(t==="parent"){const _=this.closest("[popover-target]");if(_)n=_;else{const f=this.getRootNode();f instanceof ShadowRoot?n=f.host.closest("[popover-target]"):f instanceof HTMLElement&&(n=f.closest("[popover-target]"))}}else t==="sibling"?n=(l=this.parentElement)==null?void 0:l.querySelector("[popover-target]"):n=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);n instanceof HTMLElement?(h(this,s,n),e(this,s).addEventListener("popoverTriggered",e(this,w)),e(this,s).addEventListener("popoverOpened",e(this,k)),e(this,s).addEventListener("popoverClosing",e(this,S)),e(this,s).addEventListener("popoverClosed",e(this,C))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,w)),e(this,s).removeEventListener("popoverOpened",e(this,k)),e(this,s).removeEventListener("popoverClosing",e(this,S)),e(this,s).removeEventListener("popoverClosed",e(this,C)))}}s=new WeakMap,w=new WeakMap,k=new WeakMap,S=new WeakMap,C=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",B);exports.PopoverButtonElement=B;exports.PopoverElement=M;
|
package/lib/popover/index.js
CHANGED
|
@@ -1,64 +1,69 @@
|
|
|
1
|
-
var
|
|
1
|
+
var q = (i) => {
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var M = (i, r, t) => r.has(i) ||
|
|
5
|
-
var e = (i, r, t) => (M(i, r, "read from private field"), t ? t.call(i) : r.get(i)), o = (i, r, t) => r.has(i) ?
|
|
6
|
-
import { Attribute as
|
|
7
|
-
import { S as
|
|
4
|
+
var M = (i, r, t) => r.has(i) || q("Cannot " + t);
|
|
5
|
+
var e = (i, r, t) => (M(i, r, "read from private field"), t ? t.call(i) : r.get(i)), o = (i, r, t) => r.has(i) ? q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, t), h = (i, r, t, l) => (M(i, r, "write to private field"), l ? l.call(i, t) : r.set(i, t), t), b = (i, r, t) => (M(i, r, "access private method"), t);
|
|
6
|
+
import { Attribute as H } from "../attribute/index.js";
|
|
7
|
+
import { S as B } from "../Store-OTdcl6SX.js";
|
|
8
8
|
import { d as A } from "../events-CsVF98U6.js";
|
|
9
|
-
import { g as
|
|
10
|
-
import { i as
|
|
11
|
-
var L,
|
|
9
|
+
import { g as P } from "../style-j2TwriJ_.js";
|
|
10
|
+
import { i as D } from "../browser-0zX67oeU.js";
|
|
11
|
+
var L, a, T, p, u, v, g, d, N, E, O, y, $, m;
|
|
12
12
|
const c = class c extends HTMLElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
o(this,
|
|
15
|
+
o(this, d);
|
|
16
16
|
o(this, L);
|
|
17
|
-
o(this, l);
|
|
18
|
-
o(this, T);
|
|
19
17
|
o(this, a);
|
|
18
|
+
o(this, T);
|
|
19
|
+
o(this, p);
|
|
20
20
|
o(this, u);
|
|
21
21
|
o(this, v);
|
|
22
22
|
o(this, g);
|
|
23
23
|
o(this, E);
|
|
24
24
|
o(this, y);
|
|
25
25
|
o(this, m);
|
|
26
|
-
h(this, L, -1), h(this,
|
|
27
|
-
if (e(this,
|
|
26
|
+
h(this, L, -1), h(this, a, new B(!1)), h(this, p, new H(this, "history", !1)), h(this, u, new H(this, "restore", !1)), h(this, v, new H(this, "single", !1)), h(this, g, !1), this.open = (t = !0) => {
|
|
27
|
+
if (e(this, a).current)
|
|
28
28
|
return;
|
|
29
|
-
e(this,
|
|
29
|
+
e(this, a).current = !0, e(this, v).current && (c.__opened.forEach((n) => n.close()), c.__opened = []), c.__opened.push(this), h(this, L, c.__opened.length - 1), e(this, p).current && e(this, g) && history.pushState("", "", e(this, d, N)), clearTimeout(e(this, T)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", A(this, "popoverTriggered", {
|
|
30
30
|
custom: !0
|
|
31
31
|
});
|
|
32
|
-
const
|
|
32
|
+
const l = () => {
|
|
33
33
|
addEventListener("click", e(this, E)), addEventListener("keydown", e(this, y)), this.style.opacity = "1", this.classList.add("opened"), A(this, "popoverOpened", {
|
|
34
34
|
custom: !0
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
t ? setTimeout(
|
|
37
|
+
t ? setTimeout(l, 10) : l();
|
|
38
38
|
}, this.close = () => {
|
|
39
|
-
e(this,
|
|
39
|
+
e(this, a).current && (e(this, a).current = !1, c.__opened = c.__opened.filter((t) => t !== this), b(this, d, O).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", A(this, "popoverClosing", {
|
|
40
40
|
custom: !0
|
|
41
41
|
}), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, y)), setTimeout(() => {
|
|
42
42
|
this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", A(this, "popoverClosed", {
|
|
43
43
|
custom: !0
|
|
44
44
|
});
|
|
45
|
-
},
|
|
45
|
+
}, P(this) + 10));
|
|
46
46
|
}, h(this, E, (t) => {
|
|
47
|
-
b(this,
|
|
47
|
+
b(this, d, $).call(this, () => {
|
|
48
48
|
var R;
|
|
49
|
-
const
|
|
49
|
+
const l = t.composedPath();
|
|
50
|
+
if (l.find(
|
|
51
|
+
(I) => I instanceof HTMLElement && I.hasAttribute("data-popover-content")
|
|
52
|
+
))
|
|
53
|
+
return;
|
|
54
|
+
const n = l[0], _ = n instanceof HTMLElement && (this.contains(n) || ((R = this.shadowRoot) == null ? void 0 : R.contains(n))), f = n instanceof HTMLElement && n.hasAttribute("data-outside");
|
|
50
55
|
(!_ || f) && this.close();
|
|
51
56
|
});
|
|
52
57
|
}), h(this, y, (t) => {
|
|
53
|
-
b(this,
|
|
58
|
+
b(this, d, $).call(this, () => {
|
|
54
59
|
t.code === "Escape" && this.close();
|
|
55
60
|
});
|
|
56
61
|
}), h(this, m, () => {
|
|
57
|
-
h(this, g, !1), e(this,
|
|
62
|
+
h(this, g, !1), e(this, a).current && e(this, p).current && !location.search.includes(this.id) ? this.close() : !e(this, a).current && e(this, p).current && location.search.includes(this.id) && this.open(), h(this, g, !0);
|
|
58
63
|
});
|
|
59
64
|
}
|
|
60
65
|
get history() {
|
|
61
|
-
return e(this,
|
|
66
|
+
return e(this, p);
|
|
62
67
|
}
|
|
63
68
|
get restore() {
|
|
64
69
|
return e(this, u);
|
|
@@ -67,31 +72,31 @@ const c = class c extends HTMLElement {
|
|
|
67
72
|
return e(this, v);
|
|
68
73
|
}
|
|
69
74
|
get opened() {
|
|
70
|
-
return e(this,
|
|
75
|
+
return e(this, a);
|
|
71
76
|
}
|
|
72
77
|
connectedCallback() {
|
|
73
|
-
e(this,
|
|
74
|
-
e(this, u).current ? e(this, m).call(this) : (b(this,
|
|
78
|
+
e(this, p).observe(), e(this, u).observe(), e(this, v).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, m)), setTimeout(() => {
|
|
79
|
+
e(this, u).current ? e(this, m).call(this) : (b(this, d, O).call(this), h(this, g, !0));
|
|
75
80
|
}, 0);
|
|
76
81
|
}
|
|
77
82
|
disconnectedCallback() {
|
|
78
|
-
e(this,
|
|
83
|
+
e(this, p).unobserve(), e(this, u).unobserve(), e(this, v).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, m));
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
|
-
L = new WeakMap(),
|
|
86
|
+
L = new WeakMap(), a = new WeakMap(), T = new WeakMap(), p = new WeakMap(), u = new WeakMap(), v = new WeakMap(), g = new WeakMap(), d = new WeakSet(), N = function() {
|
|
82
87
|
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
83
88
|
}, E = new WeakMap(), O = function() {
|
|
84
|
-
if (e(this,
|
|
89
|
+
if (e(this, p).current) {
|
|
85
90
|
const t = new URL(location.href);
|
|
86
91
|
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
87
92
|
}
|
|
88
93
|
}, y = new WeakMap(), $ = function(t) {
|
|
89
94
|
(c.__opened[e(this, L) - 1] || c.__opened.length === 1) && t();
|
|
90
95
|
}, m = new WeakMap(), c.__opened = [];
|
|
91
|
-
let
|
|
92
|
-
customElements.get("e-popover") || customElements.define("e-popover",
|
|
96
|
+
let x = c;
|
|
97
|
+
customElements.get("e-popover") || customElements.define("e-popover", x);
|
|
93
98
|
var s, w, k, C, S;
|
|
94
|
-
class
|
|
99
|
+
class U extends HTMLElement {
|
|
95
100
|
constructor() {
|
|
96
101
|
super();
|
|
97
102
|
o(this, s);
|
|
@@ -107,7 +112,7 @@ class D extends HTMLElement {
|
|
|
107
112
|
o(this, S, () => {
|
|
108
113
|
this.classList.remove("triggered");
|
|
109
114
|
});
|
|
110
|
-
|
|
115
|
+
D && (this.addEventListener("click", () => {
|
|
111
116
|
if (e(this, s)) {
|
|
112
117
|
const t = this.getAttribute("type") || "open";
|
|
113
118
|
t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
|
|
@@ -120,7 +125,7 @@ class D extends HTMLElement {
|
|
|
120
125
|
return e(this, s);
|
|
121
126
|
}
|
|
122
127
|
connectedCallback() {
|
|
123
|
-
var
|
|
128
|
+
var l;
|
|
124
129
|
this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
125
130
|
const t = this.getAttribute("target");
|
|
126
131
|
if (t) {
|
|
@@ -133,7 +138,7 @@ class D extends HTMLElement {
|
|
|
133
138
|
const f = this.getRootNode();
|
|
134
139
|
f instanceof ShadowRoot ? n = f.host.closest("[popover-target]") : f instanceof HTMLElement && (n = f.closest("[popover-target]"));
|
|
135
140
|
}
|
|
136
|
-
} else t === "sibling" ? n = (
|
|
141
|
+
} else t === "sibling" ? n = (l = this.parentElement) == null ? void 0 : l.querySelector("[popover-target]") : n = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
137
142
|
n instanceof HTMLElement ? (h(this, s, n), e(this, s).addEventListener(
|
|
138
143
|
"popoverTriggered",
|
|
139
144
|
e(this, w)
|
|
@@ -166,8 +171,8 @@ class D extends HTMLElement {
|
|
|
166
171
|
}
|
|
167
172
|
}
|
|
168
173
|
s = new WeakMap(), w = new WeakMap(), k = new WeakMap(), C = new WeakMap(), S = new WeakMap();
|
|
169
|
-
customElements.get("e-popover-button") || customElements.define("e-popover-button",
|
|
174
|
+
customElements.get("e-popover-button") || customElements.define("e-popover-button", U);
|
|
170
175
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
U as PopoverButtonElement,
|
|
177
|
+
x as PopoverElement
|
|
173
178
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ce=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var oe=u=>{throw TypeError(u)};var he=(u,n,e)=>n in u?Ce(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,le=(u,n)=>{for(var e in n||(n={}))Ee.call(n,e)&&he(u,e,n[e]);if(ne)for(var e of ne(n))Pe.call(n,e)&&he(u,e,n[e]);return u};var Zt=(u,n,e)=>n.has(u)||oe("Cannot "+e);var t=(u,n,e)=>(Zt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?oe("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(Zt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(Zt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../../Store-CDb6RMce.cjs"),Kt=require("../../browser-CpzFX2xg.cjs"),xe=require("../../easings-DsS5-Kqc.cjs"),Jt=require("../../events-KVanG9sR.cjs"),ue=require("../../jss-GJLvaNfT.cjs"),gt=require("../../layout-8ryRAMGJ.cjs"),ae=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Qt=require("../../order/index.cjs"),ze=require("../../Damped-CTsV8tl_.cjs"),Le=require("../../Tweened-BttGiyB0.cjs"),Ut=require("../../controls/index.cjs"),jt=require("../../window-resizer/vanilla/index.cjs"),yt=require("../../scroll-entries/index.cjs"),ce=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ke=require("../../device/index.cjs"),Gt=require("../../element-resizer/vanilla/index.cjs"),De=require("../../gestures-DHLrn6Q8.cjs"),de=require("../../dom-JBOkFLTh.cjs"),qe=require("../../function-MthRj-GJ.cjs"),Re=require("../../scroll-segment/index.cjs");var f,Tt,y,nt,A,$;class Te{constructor(n,e,i){s(this,f);s(this,Tt);s(this,y);s(this,nt,0);s(this,A,0);s(this,$,null);h(this,f,n),h(this,Tt,e),h(this,y,i),yt.scrollEntries.register(t(this,f))}get index(){return t(this,Tt)}get size(){return t(this,nt)}get position(){return t(this,A)}destroy(){yt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,nt,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?gt.getCumulativeOffsetTop(t(this,f)):gt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,nt)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),yt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,nt)+e,m=ae.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,$)!==n&&(t(this,$)&&t(this,f).classList.remove(t(this,$)),n&&t(this,f).classList.add(n),h(this,$,n),Jt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$)},custom:!0}))}}f=new WeakMap,Tt=new WeakMap,y=new WeakMap,nt=new WeakMap,A=new WeakMap,$=new WeakMap;const Ae=ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,ht,x,I,M,O,D,V,N,q,C,ot,lt,ct,ut,vt,k,at,j,R,G,B,K,dt,pt,Z,J,p,Ct,l,At,It,v,g,z,T,Q,_,E,b,Et,X,ie,Y,tt,St,Pt,H,o,Rt,bt,$t,Nt,Xt,Yt,L,Mt,pe,wt,Ot,te,ee,rt,se;class qt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ht,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,I,new S.CSSProperty(this,"--direction",0));s(this,M,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,ot,new S.CSSProperty(this,"--damping",20));s(this,lt,new S.CSSProperty(this,"--mass",0));s(this,ct,new S.CSSProperty(this,"--stiffness",0));s(this,ut,new S.CSSProperty(this,"--mouse-drag",!1));s(this,vt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,at,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,dt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,pt,new S.CSSProperty(this,"--disabled",!1));s(this,Z,new S.CSSProperty(this,"--hibernated",!1));s(this,J,null);s(this,p,null);s(this,Ct,null);s(this,l,[]);s(this,At,0);s(this,It,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,T,null);s(this,Q,null);s(this,_,null);s(this,E,null);s(this,b,new we.Store(0));s(this,Et,0);s(this,X,0);s(this,ie,!1);s(this,Y,!1);s(this,tt,!0);s(this,St,!0);s(this,Pt);s(this,H,new Le.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,At,this.vertical?gt.getCumulativeOffsetTop(this):gt.getCumulativeOffsetLeft(this)),h(this,It,this.vertical?gt.getCumulativeOffsetTop(t(this,p)):gt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,M).current){h(this,g,t(this,v)*t(this,M).current);const r=t(this,g)+t(this,v);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%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,v)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,v),m=t(this,g)-c;h(this,X,r.position+r.size+m)}else h(this,X,t(this,g));if(t(this,D).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,Y,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),t(this,Y)?d(this,o,Nt).call(this):d(this,o,$t).call(this)});s(this,Mt,()=>{if(!t(this,Y))return;const e=this.currentScrollValue;if(h(this,Et,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;yt.scrollEntries.update(this,t(this,x).current,e)});s(this,wt,(e,i)=>{t(this,ht).current&&(d(this,o,te).call(this,Math.sign(i)||1),t(this,Ot).call(this,e,i))});s(this,Ot,(e,i)=>{if(t(this,I).current){if(t(this,I).current<0&&i>0)return;if(t(this,I).current>0&&i<0)return}if(t(this,H).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Pt)),h(this,Pt,setTimeout(()=>{const r=d(this,o,se).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,dt).current,easing:xe.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!ke.device.isMobile&&!t(this,ut).current))if(t(this,D).current){const r=Math.sign(i);t(this,l).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Ae);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,J,document.createElement("div")),t(this,J).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,J).appendChild(t(this,p)),e.appendChild(t(this,J))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ht)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,I)}get pagesCSSProperty(){return t(this,M)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,ot)}get massCSSProperty(){return t(this,lt)}get stiffnessCSSProperty(){return t(this,ct)}get mouseDragCSSProperty(){return t(this,ut)}get sectionDistanceScaleCSSProperty(){return t(this,vt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,at)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,pt)}get hibernatedCSSProperty(){return t(this,Z)}get currentScrollValue(){return d(this,o,ee).call(this,"current")}get targetScrollValue(){return d(this,o,ee).call(this,"target")}get contentWrapperElement(){return t(this,J)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,At)}get contentPosition(){return t(this,It)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,X)}get loopDistance(){return t(this,C).current?t(this,X)+t(this,z):t(this,X)}get hasOverflow(){return t(this,Y)}get overscroll(){return t(this,Et)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,b).current;d(this,o,pe).call(this,e);const c=t(this,l)[r],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const mt=d(this,o,se).call(this),ve=mt?this.targetScrollValue-mt.position:0;t(this,C).current?t(this,b).current===0&&r===t(this,l).length-1?w=t(this,g)+t(this,v)-c.position+t(this,z):t(this,b).current===t(this,l).length-1&&r===0?w=m.position-(t(this,g)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,te).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,H).set(t(this,a).current,{equalize:!0}),t(this,H).set(e,le({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new ze.Damped(0,{damping:.01,min:0,order:Qt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,T,new Ut.WheelControls({element:t(this,p)})),t(this,T).changeEvent.subscribe(t(this,wt)),h(this,Q,new Ut.KeyboardControls({element:this})),t(this,Q).changeEvent.subscribe(t(this,wt)),h(this,_,new Ut.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,wt)),h(this,E,new Ut.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Ot)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,T).axis=t(this,N).current?"max":e,t(this,Q).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,T).axis=e.current?"max":t(this,x).current}),t(this,M).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Rt).call(this):d(this,o,bt).call(this))}),t(this,D).subscribe(e=>{t(this,T).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Rt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Rt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,rt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,O).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Et,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,ot).subscribe(e=>{t(this,a).damping=e.current}),t(this,lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ct).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,!t(this,tt)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,o,rt).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,l).length&&d(this,o,rt).call(this)}),t(this,H).subscribe(e=>{t(this,H).isRunning.current&&t(this,a).set(e.current)}),t(this,pt).subscribe(e=>{e.current&&!e.previous?d(this,o,$t).call(this):!e.current&&e.previous&&d(this,o,Nt).call(this)}),t(this,Z).subscribe(e=>{e.current&&!e.previous?d(this,o,Xt).call(this):!e.current&&e.previous&&d(this,o,Yt).call(this)}),t(this,ht).observe(),t(this,x).observe(),t(this,I).observe(),t(this,M).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,N).observe(),t(this,q).observe(),t(this,C).observe(),t(this,ot).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,vt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,at).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,B).observe(),t(this,K).observe(),t(this,dt).observe(),t(this,pt).observe(),t(this,Z).observe(),t(this,Z).current||d(this,o,Yt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,ht).unobserve(),t(this,x).unobserve(),t(this,I).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,vt).unobserve(),t(this,k).unobserve(),t(this,at).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,dt).unobserve(),t(this,pt).unobserve(),t(this,Z).unobserve(),d(this,o,Xt).call(this)}}a=new WeakMap,ht=new WeakMap,x=new WeakMap,I=new WeakMap,M=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,N=new WeakMap,q=new WeakMap,C=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,vt=new WeakMap,k=new WeakMap,at=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakMap,K=new WeakMap,dt=new WeakMap,pt=new WeakMap,Z=new WeakMap,J=new WeakMap,p=new WeakMap,Ct=new WeakMap,l=new WeakMap,At=new WeakMap,It=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,Q=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,Et=new WeakMap,X=new WeakMap,ie=new WeakMap,Y=new WeakMap,tt=new WeakMap,St=new WeakMap,Pt=new WeakMap,H=new WeakMap,o=new WeakSet,Rt=function(){d(this,o,bt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Te(e,i,this))}),t(this,p).style.transform="",Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,rt).call(this)},bt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},$t=function(){t(this,tt)||(console.log(this,"disable"),h(this,tt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Pt)),t(this,H).unlistenAnimationFrame(),t(this,T).disconnect(),t(this,Q).disconnect(),t(this,_).disconnect(),t(this,E).disconnect(),t(this,Y)||this.sections.forEach(e=>{e.unsetTransform()}))},Nt=function(){t(this,tt)&&(h(this,tt,!1),t(this,a).subscribe(t(this,Mt)),t(this,T).connect(),t(this,Q).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Xt=function(){t(this,St)||(h(this,St,!0),jt.windowResizer.unsubscribe(t(this,L)),Gt.elementResizer.unsubscribe(t(this,L)),d(this,o,$t).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,bt).call(this):(t(this,b).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Yt=function(){t(this,St)&&(h(this,St,!1),(t(this,C).current||t(this,O).current||t(this,C).current||t(this,V).current||t(this,D).current)&&d(this,o,Rt).call(this),yt.scrollEntries.register(this),d(this,o,Nt).call(this),jt.windowResizer.subscribe(t(this,L),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Mt=new WeakMap,pe=function(e){t(this,C).current?(t(this,b).current=e%t(this,l).length,t(this,b).current=t(this,b).current<0?t(this,l).length+t(this,b).current:t(this,b).current):t(this,b).current=ae.clamp(e,0,this.limit)},wt=new WeakMap,Ot=new WeakMap,te=function(e=1){t(this,j).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,at).current,this.sectionalCSSProperty.current)},ee=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,g)+t(this,v)+t(this,z));return i<0?t(this,g)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},rt=function(){if(t(this,R).current&&t(this,l).length){const e=t(this,b).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,l).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,mt=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+mt/2||c<=m+i?r.mark("next"):r.mark("previous")})}},se=function(){let e=null,i=1/0;for(let r=0;r<t(this,l).length;r++){const c=Math.abs(t(this,l)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",qt);var Vt;class re extends HTMLElement{constructor(){super(...arguments);s(this,Vt,null)}get scrollElement(){return t(this,Vt)}connectedCallback(){const e=de.findParentElement(this,qt);e instanceof qt?h(this,Vt,e):console.error(this,"e-scroll not found")}}Vt=new WeakMap;var et,P,W,F,xt,zt,ft,Bt,_t,Ht;class Se extends re{constructor(){super();s(this,et,null);s(this,P,null);s(this,W,!1);s(this,F,0);s(this,xt,0);s(this,zt,0);s(this,ft,()=>{h(this,W,this.offsetWidth>this.offsetHeight);const e=t(this,W)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,W)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,xt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Bt,()=>{h(this,zt,this.scrollElement.currentProgress*t(this,xt)),t(this,W)?t(this,P).style.transform=`translate3d(${t(this,zt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,zt)}px, 0px)`});s(this,_t,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ht,e=>{document.documentElement.classList.add("grabbing"),De.setupDrag(c=>{const m=t(this,W)?c.x:c.y,w=this.scrollElement.distance/t(this,xt),mt=(m-r)*w;this.scrollElement.setPosition(i+mt)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,W)?e.x:e.y});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,et,document.createElement("slot")),t(this,et).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,et))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,et).assignedElements()[0]||t(this,et).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,Ht)),jt.windowResizer.subscribe(t(this,ft),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,ft)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,_t))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,Ht)),jt.windowResizer.unsubscribe(t(this,ft)),Gt.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,_t))}}et=new WeakMap,P=new WeakMap,W=new WeakMap,F=new WeakMap,xt=new WeakMap,zt=new WeakMap,ft=new WeakMap,Bt=new WeakMap,_t=new WeakMap,Ht=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Se);class fe extends re{constructor(){super(),Kt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class me extends fe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",me);class be extends fe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",be);var U,st,Lt,Wt,Ft,kt;class Ie{constructor(n,e,i){s(this,U,null);s(this,st,null);s(this,Lt,null);s(this,Wt,null);s(this,Ft,()=>{t(this,st).scrollToSection(t(this,Lt),{behaviour:t(this,Wt)})});s(this,kt,()=>{t(this,U).classList.toggle("current",t(this,st).counter.current===t(this,Lt))});Kt.isBrowser&&(h(this,U,document.createElement("button")),h(this,st,n),h(this,Wt,i),h(this,Lt,e),t(this,U).addEventListener("click",t(this,Ft)),t(this,st).counter.subscribe(t(this,kt)),t(this,kt).call(this))}get element(){return t(this,U)}destroy(){t(this,U).removeEventListener("click",t(this,Ft)),t(this,st).counter.unsubscribe(t(this,kt)),t(this,U).remove()}}U=new WeakMap,st=new WeakMap,Lt=new WeakMap,Wt=new WeakMap,Ft=new WeakMap,kt=new WeakMap;var it,Dt;class ge extends re{constructor(){super(...arguments);s(this,it,[]);s(this,Dt,qe.debounce(()=>{t(this,it).forEach(e=>e.destroy()),h(this,it,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ie(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,it).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Dt)),t(this,Dt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Dt)),t(this,it).forEach(e=>e.destroy()),h(this,it,[])}}it=new WeakMap,Dt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ge);class ye extends Re.ScrollSegmentElement{connectedCallback(){const n=de.findParentElement(this,qt);n instanceof qt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",ye);exports.ScrollBulletButtonsElement=ge;exports.ScrollElement=qt;exports.ScrollSegmentElement=ye;exports.ScrollSetButtonElement=me;exports.ScrollStepButtonElement=be;exports.ScrollbarElement=Se;
|
|
1
|
+
"use strict";var Ce=Object.defineProperty;var ne=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var oe=u=>{throw TypeError(u)};var he=(u,n,e)=>n in u?Ce(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,le=(u,n)=>{for(var e in n||(n={}))Ee.call(n,e)&&he(u,e,n[e]);if(ne)for(var e of ne(n))Pe.call(n,e)&&he(u,e,n[e]);return u};var Zt=(u,n,e)=>n.has(u)||oe("Cannot "+e);var t=(u,n,e)=>(Zt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?oe("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(Zt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(Zt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../../Store-CDb6RMce.cjs"),Kt=require("../../browser-CpzFX2xg.cjs"),xe=require("../../easings-DsS5-Kqc.cjs"),Jt=require("../../events-KVanG9sR.cjs"),ue=require("../../jss-GJLvaNfT.cjs"),gt=require("../../layout-8ryRAMGJ.cjs"),ae=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Qt=require("../../order/index.cjs"),ze=require("../../Damped-CTsV8tl_.cjs"),Le=require("../../Tweened-BttGiyB0.cjs"),Ut=require("../../controls/index.cjs"),jt=require("../../window-resizer/vanilla/index.cjs"),yt=require("../../scroll-entries/index.cjs"),ce=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ke=require("../../device/index.cjs"),Gt=require("../../element-resizer/vanilla/index.cjs"),De=require("../../gestures-DHLrn6Q8.cjs"),de=require("../../dom-JBOkFLTh.cjs"),qe=require("../../function-MthRj-GJ.cjs"),Re=require("../../scroll-segment/index.cjs");var f,At,y,nt,A,N;class Te{constructor(n,e,i){s(this,f);s(this,At);s(this,y);s(this,nt,0);s(this,A,0);s(this,N,null);h(this,f,n),h(this,At,e),h(this,y,i),yt.scrollEntries.register(t(this,f))}get index(){return t(this,At)}get size(){return t(this,nt)}get position(){return t(this,A)}destroy(){yt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,nt,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?gt.getCumulativeOffsetTop(t(this,f)):gt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,nt)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),yt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,nt)+e,m=ae.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,N)!==n&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),n&&t(this,f).classList.add(n),h(this,N,n),Jt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,At=new WeakMap,y=new WeakMap,nt=new WeakMap,A=new WeakMap,N=new WeakMap;const Ae=ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,ht,x,I,M,O,D,V,j,q,C,ot,lt,ct,ut,vt,k,at,G,R,K,B,Z,dt,pt,J,Q,p,Ct,l,It,Mt,v,g,z,T,X,_,E,b,Et,Y,ie,H,tt,St,Pt,W,o,Tt,bt,$t,Nt,Xt,Yt,L,wt,pe,xt,Ot,te,ee,rt,se;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ht,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,I,new S.CSSProperty(this,"--direction",0));s(this,M,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,O,new S.CSSProperty(this,"--split",!1));s(this,D,new S.CSSProperty(this,"--sectional",!1));s(this,V,new S.CSSProperty(this,"--auto-size",!1));s(this,j,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,ot,new S.CSSProperty(this,"--damping",20));s(this,lt,new S.CSSProperty(this,"--mass",0));s(this,ct,new S.CSSProperty(this,"--stiffness",0));s(this,ut,new S.CSSProperty(this,"--mouse-drag",!1));s(this,vt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,at,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,G,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,K,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,B,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Z,new S.CSSProperty(this,"--focus-delay",0));s(this,dt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,pt,new S.CSSProperty(this,"--disabled",!1));s(this,J,new S.CSSProperty(this,"--hibernated",!1));s(this,Q,null);s(this,p,null);s(this,Ct,null);s(this,l,[]);s(this,It,0);s(this,Mt,0);s(this,v,0);s(this,g,0);s(this,z,0);s(this,T,null);s(this,X,null);s(this,_,null);s(this,E,null);s(this,b,new we.Store(0));s(this,Et,0);s(this,Y,0);s(this,ie,!1);s(this,H,!1);s(this,tt,!0);s(this,St,!0);s(this,Pt);s(this,W,new Le.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,b).current;if(h(this,It,this.vertical?gt.getCumulativeOffsetTop(this):gt.getCumulativeOffsetLeft(this)),h(this,Mt,this.vertical?gt.getCumulativeOffsetTop(t(this,p)):gt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,ce.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,V).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,M).current){h(this,g,t(this,v)*t(this,M).current);const r=t(this,g)+t(this,v);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%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,v)));if(!t(this,C).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,g,t(this,g)+c),t(this,a).max=t(this,g)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,v),m=t(this,g)-c;h(this,Y,r.position+r.size+m)}else h(this,Y,t(this,g));if(t(this,D).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,g),{equalize:!0});h(this,H,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Nt).call(this):d(this,o,$t).call(this),t(this,wt).call(this)});s(this,wt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,Et,Math.max(0,e-t(this,g))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,b).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;yt.scrollEntries.update(this,t(this,x).current,e)});s(this,xt,(e,i)=>{t(this,ht).current&&(d(this,o,te).call(this,Math.sign(i)||1),t(this,Ot).call(this,e,i))});s(this,Ot,(e,i)=>{if(t(this,I).current){if(t(this,I).current<0&&i>0)return;if(t(this,I).current>0&&i<0)return}if(t(this,W).unlistenAnimationFrame(),!t(this,k).current&&t(this,Z).current&&(clearInterval(t(this,Pt)),h(this,Pt,setTimeout(()=>{const r=d(this,o,se).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,dt).current,easing:xe.easeInOutExpo}})},t(this,Z).current))),!(e==="drag"&&!ke.device.isMobile&&!t(this,ut).current))if(t(this,D).current){const r=Math.sign(i);t(this,l).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Ae);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Q,document.createElement("div")),t(this,Q).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ct,document.createElement("slot")),t(this,p).appendChild(t(this,Ct)),t(this,Q).appendChild(t(this,p)),e.appendChild(t(this,Q))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ht)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,I)}get pagesCSSProperty(){return t(this,M)}get splitCSSProperty(){return t(this,O)}get sectionalCSSProperty(){return t(this,D)}get autoSizeCSSProperty(){return t(this,V)}get wheelMaxDeltaCSSProperty(){return t(this,j)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,ot)}get massCSSProperty(){return t(this,lt)}get stiffnessCSSProperty(){return t(this,ct)}get mouseDragCSSProperty(){return t(this,ut)}get sectionDistanceScaleCSSProperty(){return t(this,vt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,at)}get autoplayUserDirectionCSSProperty(){return t(this,G)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,K)}get currentIndexEndOffsetCSSProperty(){return t(this,B)}get focusDelayCSSProperty(){return t(this,Z)}get focusDurationCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,pt)}get hibernatedCSSProperty(){return t(this,J)}get currentScrollValue(){return d(this,o,ee).call(this,"current")}get targetScrollValue(){return d(this,o,ee).call(this,"target")}get contentWrapperElement(){return t(this,Q)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,It)}get contentPosition(){return t(this,Mt)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,g)}get gap(){return t(this,z)}get counter(){return t(this,b)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,Y)}get loopDistance(){return t(this,C).current?t(this,Y)+t(this,z):t(this,Y)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,Et)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,b).current;d(this,o,pe).call(this,e);const c=t(this,l)[r],m=t(this,l)[t(this,b).current];if(c&&m){let w=0;const mt=d(this,o,se).call(this),ve=mt?this.targetScrollValue-mt.position:0;t(this,C).current?t(this,b).current===0&&r===t(this,l).length-1?w=t(this,g)+t(this,v)-c.position+t(this,z)+1:t(this,b).current===t(this,l).length-1&&r===0?w=m.position-(t(this,g)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,b).current+e,i)}setPosition(e,i){d(this,o,te).call(this,Math.sign(e)||1),i!=null&&i.tween?(t(this,W).set(t(this,a).current,{equalize:!0}),t(this,W).set(e,le({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new ze.Damped(0,{damping:.01,min:0,order:Qt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,T,new Ut.WheelControls({element:t(this,p)})),t(this,T).changeEvent.subscribe(t(this,xt)),h(this,X,new Ut.KeyboardControls({element:this})),t(this,X).changeEvent.subscribe(t(this,xt)),h(this,_,new Ut.DragControls({element:t(this,p)})),t(this,_).changeEvent.subscribe(t(this,xt)),h(this,E,new Ut.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Ot)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,T).axis=t(this,j).current?"max":e,t(this,X).dimension=e==="x"?"width":"height",t(this,_).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,j).subscribe(e=>{t(this,T).axis=e.current?"max":t(this,x).current}),t(this,M).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,O).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Tt).call(this):d(this,o,bt).call(this))}),t(this,D).subscribe(e=>{t(this,T).debounce=e.current,t(this,_).swipe=e.current,t(this,E).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,V).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Tt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,bt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,rt).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,O).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Et,0),t(this,a).max=t(this,g),t(this,a).min=0)}),t(this,ot).subscribe(e=>{t(this,a).damping=e.current}),t(this,lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ct).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,E).speed=e.current,!t(this,tt)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,G).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,o,rt).call(this)}),t(this,K).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,B).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,rt).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,b).subscribe(e=>{t(this,l).length&&d(this,o,rt).call(this)}),t(this,W).subscribe(e=>{t(this,W).isRunning.current&&t(this,a).set(e.current)}),t(this,pt).subscribe(e=>{e.current&&!e.previous?d(this,o,$t).call(this):!e.current&&e.previous&&d(this,o,Nt).call(this)}),t(this,J).subscribe(e=>{e.current&&!e.previous?d(this,o,Xt).call(this):!e.current&&e.previous&&d(this,o,Yt).call(this)}),t(this,ht).observe(),t(this,x).observe(),t(this,I).observe(),t(this,M).observe(),t(this,O).observe(),t(this,D).observe(),t(this,V).observe(),t(this,j).observe(),t(this,q).observe(),t(this,C).observe(),t(this,ot).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,vt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,at).observe(),t(this,G).observe(),t(this,R).observe(),t(this,K).observe(),t(this,B).observe(),t(this,Z).observe(),t(this,dt).observe(),t(this,pt).observe(),t(this,J).observe(),t(this,J).current||d(this,o,Yt).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,ht).unobserve(),t(this,x).unobserve(),t(this,I).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,D).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,vt).unobserve(),t(this,k).unobserve(),t(this,at).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,K).unobserve(),t(this,B).unobserve(),t(this,Z).unobserve(),t(this,dt).unobserve(),t(this,pt).unobserve(),t(this,J).unobserve(),d(this,o,Xt).call(this)}}a=new WeakMap,ht=new WeakMap,x=new WeakMap,I=new WeakMap,M=new WeakMap,O=new WeakMap,D=new WeakMap,V=new WeakMap,j=new WeakMap,q=new WeakMap,C=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,vt=new WeakMap,k=new WeakMap,at=new WeakMap,G=new WeakMap,R=new WeakMap,K=new WeakMap,B=new WeakMap,Z=new WeakMap,dt=new WeakMap,pt=new WeakMap,J=new WeakMap,Q=new WeakMap,p=new WeakMap,Ct=new WeakMap,l=new WeakMap,It=new WeakMap,Mt=new WeakMap,v=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,X=new WeakMap,_=new WeakMap,E=new WeakMap,b=new WeakMap,Et=new WeakMap,Y=new WeakMap,ie=new WeakMap,H=new WeakMap,tt=new WeakMap,St=new WeakMap,Pt=new WeakMap,W=new WeakMap,o=new WeakSet,Tt=function(){d(this,o,bt).call(this),t(this,Ct).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Te(e,i,this))}),t(this,p).style.transform="",Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,rt).call(this)},bt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,b).reset(),t(this,a).reset(),Jt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},$t=function(){t(this,tt)||(h(this,tt,!0),t(this,a).unsubscribe(t(this,wt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Pt)),t(this,W).unlistenAnimationFrame(),t(this,T).disconnect(),t(this,X).disconnect(),t(this,_).disconnect(),t(this,E).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Nt=function(){t(this,tt)&&(h(this,tt,!1),t(this,a).subscribe(t(this,wt)),t(this,T).connect(),t(this,X).connect(),t(this,_).connect(),t(this,k).current&&t(this,E).connect())},Xt=function(){t(this,St)||(h(this,St,!0),jt.windowResizer.unsubscribe(t(this,L)),Gt.elementResizer.unsubscribe(t(this,L)),d(this,o,$t).call(this),t(this,p).style.transform="",t(this,l).length?d(this,o,bt).call(this):(t(this,b).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Yt=function(){t(this,St)&&(h(this,St,!1),(t(this,C).current||t(this,O).current||t(this,C).current||t(this,V).current||t(this,D).current)&&d(this,o,Tt).call(this),yt.scrollEntries.register(this),d(this,o,Nt).call(this),jt.windowResizer.subscribe(t(this,L),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,wt=new WeakMap,pe=function(e){t(this,C).current?(t(this,b).current=e%t(this,l).length,t(this,b).current=t(this,b).current<0?t(this,l).length+t(this,b).current:t(this,b).current):t(this,b).current=ae.clamp(e,0,this.limit)},xt=new WeakMap,Ot=new WeakMap,te=function(e=1){t(this,G).current&&(t(this,E).direction=e),t(this,k).current&&t(this,E).pauseAndContinue(t(this,at).current,this.sectionalCSSProperty.current)},ee=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,g)+t(this,v)+t(this,z));return i<0?t(this,g)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},rt=function(){if(t(this,R).current&&t(this,l).length){const e=t(this,b).current+t(this,K).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,B).current;t(this,l).forEach((r,c)=>{const m=e-this.limit-1+t(this,B).current,w=e+i,mt=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+mt/2||c<=m+i?r.mark("next"):r.mark("previous")})}},se=function(){let e=null,i=1/0;for(let r=0;r<t(this,l).length;r++){const c=Math.abs(t(this,l)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Rt);var Vt;class re extends HTMLElement{constructor(){super(...arguments);s(this,Vt,null)}get scrollElement(){return t(this,Vt)}connectedCallback(){const e=de.findParentElement(this,Rt);e instanceof Rt?h(this,Vt,e):console.error(this,"e-scroll not found")}}Vt=new WeakMap;var et,P,F,U,zt,Lt,ft,Bt,_t,Ht;class Se extends re{constructor(){super();s(this,et,null);s(this,P,null);s(this,F,!1);s(this,U,0);s(this,zt,0);s(this,Lt,0);s(this,ft,()=>{h(this,F,this.offsetWidth>this.offsetHeight);const e=t(this,F)?this.offsetWidth:this.offsetHeight;h(this,U,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,U,Math.max(t(this,U),30)),t(this,F)?(t(this,P).style.width=t(this,U)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,U)+"px"),h(this,zt,e-t(this,U)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Bt,()=>{h(this,Lt,this.scrollElement.currentProgress*t(this,zt)),t(this,F)?t(this,P).style.transform=`translate3d(${t(this,Lt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,Lt)}px, 0px)`});s(this,_t,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ht,e=>{document.documentElement.classList.add("grabbing"),De.setupDrag(c=>{const m=t(this,F)?c.x:c.y,w=this.scrollElement.distance/t(this,zt),mt=(m-r)*w;this.scrollElement.setPosition(i+mt)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,F)?e.x:e.y});if(Kt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,et,document.createElement("slot")),t(this,et).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,et))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,et).assignedElements()[0]||t(this,et).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,Ht)),jt.windowResizer.subscribe(t(this,ft),Qt.RESIZE_ORDER.SCROLL),Gt.elementResizer.subscribe(this,t(this,ft)),this.scrollElement.onScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.subscribe(t(this,_t))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,Ht)),jt.windowResizer.unsubscribe(t(this,ft)),Gt.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Bt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,_t))}}et=new WeakMap,P=new WeakMap,F=new WeakMap,U=new WeakMap,zt=new WeakMap,Lt=new WeakMap,ft=new WeakMap,Bt=new WeakMap,_t=new WeakMap,Ht=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Se);class fe extends re{constructor(){super(),Kt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class me extends fe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",me);class be extends fe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",be);var $,st,kt,Wt,Ft,Dt;class Ie{constructor(n,e,i){s(this,$,null);s(this,st,null);s(this,kt,null);s(this,Wt,null);s(this,Ft,()=>{t(this,st).scrollToSection(t(this,kt),{behaviour:t(this,Wt)})});s(this,Dt,()=>{t(this,$).classList.toggle("current",t(this,st).counter.current===t(this,kt))});Kt.isBrowser&&(h(this,$,document.createElement("button")),h(this,st,n),h(this,Wt,i),h(this,kt,e),t(this,$).addEventListener("click",t(this,Ft)),t(this,st).counter.subscribe(t(this,Dt)),t(this,Dt).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,Ft)),t(this,st).counter.unsubscribe(t(this,Dt)),t(this,$).remove()}}$=new WeakMap,st=new WeakMap,kt=new WeakMap,Wt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap;var it,qt;class ge extends re{constructor(){super(...arguments);s(this,it,[]);s(this,qt,qe.debounce(()=>{t(this,it).forEach(e=>e.destroy()),h(this,it,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ie(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,it).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,qt)),t(this,qt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,qt)),t(this,it).forEach(e=>e.destroy()),h(this,it,[])}}it=new WeakMap,qt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ge);class ye extends Re.ScrollSegmentElement{connectedCallback(){const n=de.findParentElement(this,Rt);n instanceof Rt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",ye);exports.ScrollBulletButtonsElement=ge;exports.ScrollElement=Rt;exports.ScrollSegmentElement=ye;exports.ScrollSetButtonElement=me;exports.ScrollStepButtonElement=be;exports.ScrollbarElement=Se;
|
|
@@ -24,31 +24,31 @@ import { c as ae } from "../../math-BOBiC4TN.js";
|
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
25
|
import { TICK_ORDER as Ce, RESIZE_ORDER as ue } from "../../order/index.js";
|
|
26
26
|
import { D as Ee } from "../../Damped-Chu29wn-.js";
|
|
27
|
-
import { T as
|
|
28
|
-
import { WheelControls as
|
|
27
|
+
import { T as we } from "../../Tweened-BUuSLSF7.js";
|
|
28
|
+
import { WheelControls as xe, KeyboardControls as Pe, DragControls as Le, AutoplayControls as ze } from "../../controls/index.js";
|
|
29
29
|
import { windowResizer as Ut } from "../../window-resizer/vanilla/index.js";
|
|
30
30
|
import { scrollEntries as gt } from "../../scroll-entries/index.js";
|
|
31
31
|
import { cssUnitParser as le } from "../../css-unit-parser/index.js";
|
|
32
|
-
import { CSSProperty as
|
|
32
|
+
import { CSSProperty as p } from "../../css-property/index.js";
|
|
33
33
|
import { device as ke } from "../../device/index.js";
|
|
34
34
|
import { elementResizer as Gt } from "../../element-resizer/vanilla/index.js";
|
|
35
35
|
import { s as De } from "../../gestures-D2Fdra_G.js";
|
|
36
36
|
import { f as de } from "../../dom-0S_WDL4g.js";
|
|
37
37
|
import { d as Ae } from "../../function-C10DGppn.js";
|
|
38
38
|
import { ScrollSegmentElement as Ie } from "../../scroll-segment/index.js";
|
|
39
|
-
var m,
|
|
39
|
+
var m, Mt, v, nt, T, G;
|
|
40
40
|
class Me {
|
|
41
41
|
constructor(n, e, i) {
|
|
42
42
|
s(this, m);
|
|
43
|
-
s(this,
|
|
43
|
+
s(this, Mt);
|
|
44
44
|
s(this, v);
|
|
45
45
|
s(this, nt, 0);
|
|
46
46
|
s(this, T, 0);
|
|
47
|
-
s(this,
|
|
48
|
-
h(this, m, n), h(this,
|
|
47
|
+
s(this, G, null);
|
|
48
|
+
h(this, m, n), h(this, Mt, e), h(this, v, i), gt.register(t(this, m));
|
|
49
49
|
}
|
|
50
50
|
get index() {
|
|
51
|
-
return t(this,
|
|
51
|
+
return t(this, Mt);
|
|
52
52
|
}
|
|
53
53
|
get size() {
|
|
54
54
|
return t(this, nt);
|
|
@@ -80,16 +80,16 @@ class Me {
|
|
|
80
80
|
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)`;
|
|
81
81
|
}
|
|
82
82
|
mark(n) {
|
|
83
|
-
t(this,
|
|
83
|
+
t(this, G) !== n && (t(this, G) && t(this, m).classList.remove(t(this, G)), n && t(this, m).classList.add(n), h(this, G, n), Zt(t(this, m), "scrollSectionMarkChange", {
|
|
84
84
|
composed: !0,
|
|
85
85
|
detail: {
|
|
86
|
-
mark: t(this,
|
|
86
|
+
mark: t(this, G)
|
|
87
87
|
},
|
|
88
88
|
custom: !0
|
|
89
89
|
}));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
m = new WeakMap(),
|
|
92
|
+
m = new WeakMap(), Mt = new WeakMap(), v = new WeakMap(), nt = new WeakMap(), T = new WeakMap(), G = new WeakMap();
|
|
93
93
|
const Te = ce({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
@@ -128,102 +128,102 @@ const Te = ce({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u, ht, P, V, R, O, D, H,
|
|
132
|
-
class
|
|
131
|
+
var u, ht, P, V, R, O, D, H, K, A, C, ot, lt, ct, at, vt, k, ut, _, I, Z, B, j, dt, ft, J, Q, f, yt, l, Tt, Vt, y, g, L, M, X, W, E, S, Ct, Y, se, F, tt, pt, Et, $, o, At, St, Nt, qt, Qt, Xt, z, wt, fe, xt, Rt, Yt, te, rt, ee;
|
|
132
|
+
class It extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this, ht, new
|
|
138
|
-
s(this, P, new
|
|
139
|
-
s(this, V, new
|
|
140
|
-
s(this, R, new
|
|
137
|
+
s(this, ht, new p(this, "--controls", !0));
|
|
138
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
139
|
+
s(this, V, new p(this, "--direction", 0));
|
|
140
|
+
s(this, R, new p(this, "--pages", 0, {
|
|
141
141
|
validate: (e) => Math.max(0, e - 1)
|
|
142
142
|
}));
|
|
143
|
-
s(this, O, new
|
|
144
|
-
s(this, D, new
|
|
145
|
-
s(this, H, new
|
|
146
|
-
s(this,
|
|
143
|
+
s(this, O, new p(this, "--split", !1));
|
|
144
|
+
s(this, D, new p(this, "--sectional", !1));
|
|
145
|
+
s(this, H, new p(this, "--auto-size", !1));
|
|
146
|
+
s(this, K, new p(
|
|
147
147
|
this,
|
|
148
148
|
"--wheel-max-delta",
|
|
149
149
|
!1
|
|
150
150
|
));
|
|
151
|
-
s(this, A, new
|
|
151
|
+
s(this, A, new p(
|
|
152
152
|
this,
|
|
153
153
|
"--sections-in-view",
|
|
154
154
|
1
|
|
155
155
|
));
|
|
156
|
-
s(this, C, new
|
|
157
|
-
s(this, ot, new
|
|
158
|
-
s(this, lt, new
|
|
159
|
-
s(this, ct, new
|
|
160
|
-
s(this, at, new
|
|
161
|
-
s(this, vt, new
|
|
156
|
+
s(this, C, new p(this, "--loop", !1));
|
|
157
|
+
s(this, ot, new p(this, "--damping", 20));
|
|
158
|
+
s(this, lt, new p(this, "--mass", 0));
|
|
159
|
+
s(this, ct, new p(this, "--stiffness", 0));
|
|
160
|
+
s(this, at, new p(this, "--mouse-drag", !1));
|
|
161
|
+
s(this, vt, new p(
|
|
162
162
|
this,
|
|
163
163
|
"--section-distance-scale",
|
|
164
164
|
0.5
|
|
165
165
|
));
|
|
166
|
-
s(this, k, new
|
|
167
|
-
s(this, ut, new
|
|
166
|
+
s(this, k, new p(this, "--autoplay", 0));
|
|
167
|
+
s(this, ut, new p(
|
|
168
168
|
this,
|
|
169
169
|
"--autoplay-pause-duration",
|
|
170
170
|
0
|
|
171
171
|
));
|
|
172
|
-
s(this,
|
|
172
|
+
s(this, _, new p(
|
|
173
173
|
this,
|
|
174
174
|
"--autoplay-user-direction",
|
|
175
175
|
!1
|
|
176
176
|
));
|
|
177
|
-
s(this, I, new
|
|
178
|
-
s(this,
|
|
177
|
+
s(this, I, new p(this, "--classes", !1));
|
|
178
|
+
s(this, Z, new p(
|
|
179
179
|
this,
|
|
180
180
|
"--current-index-start-offset",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this, B, new
|
|
183
|
+
s(this, B, new p(
|
|
184
184
|
this,
|
|
185
185
|
"--current-index-end-offset",
|
|
186
186
|
0
|
|
187
187
|
));
|
|
188
|
-
s(this,
|
|
189
|
-
s(this, dt, new
|
|
188
|
+
s(this, j, new p(this, "--focus-delay", 0));
|
|
189
|
+
s(this, dt, new p(
|
|
190
190
|
this,
|
|
191
191
|
"--focus-duration",
|
|
192
192
|
3e3
|
|
193
193
|
));
|
|
194
|
-
s(this,
|
|
195
|
-
s(this,
|
|
196
|
-
s(this,
|
|
197
|
-
s(this,
|
|
194
|
+
s(this, ft, new p(this, "--disabled", !1));
|
|
195
|
+
s(this, J, new p(this, "--hibernated", !1));
|
|
196
|
+
s(this, Q, null);
|
|
197
|
+
s(this, f, null);
|
|
198
198
|
s(this, yt, null);
|
|
199
199
|
s(this, l, []);
|
|
200
|
-
s(this, Mt, 0);
|
|
201
200
|
s(this, Tt, 0);
|
|
201
|
+
s(this, Vt, 0);
|
|
202
202
|
s(this, y, 0);
|
|
203
203
|
s(this, g, 0);
|
|
204
|
-
s(this,
|
|
204
|
+
s(this, L, 0);
|
|
205
205
|
s(this, M, null);
|
|
206
|
-
s(this,
|
|
206
|
+
s(this, X, null);
|
|
207
207
|
s(this, W, null);
|
|
208
208
|
s(this, E, null);
|
|
209
209
|
s(this, S, new ve(0));
|
|
210
210
|
s(this, Ct, 0);
|
|
211
|
-
s(this,
|
|
211
|
+
s(this, Y, 0);
|
|
212
212
|
s(this, se, !1);
|
|
213
|
-
s(this,
|
|
213
|
+
s(this, F, !1);
|
|
214
214
|
s(this, tt, !0);
|
|
215
|
-
s(this,
|
|
215
|
+
s(this, pt, !0);
|
|
216
216
|
s(this, Et);
|
|
217
|
-
s(this,
|
|
218
|
-
s(this,
|
|
217
|
+
s(this, $, new we());
|
|
218
|
+
s(this, z, () => {
|
|
219
219
|
t(this, u).unlistenAnimationFrame();
|
|
220
220
|
const e = this.currentScrollValue / t(this, g) || 0, i = t(this, S).current;
|
|
221
|
-
if (h(this,
|
|
222
|
-
getComputedStyle(t(this,
|
|
223
|
-
)) : h(this,
|
|
224
|
-
getComputedStyle(t(this,
|
|
221
|
+
if (h(this, Tt, this.vertical ? jt(this) : Jt(this)), h(this, Vt, this.vertical ? jt(t(this, f)) : Jt(t(this, f))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, le.parse(
|
|
222
|
+
getComputedStyle(t(this, f)).rowGap
|
|
223
|
+
)) : h(this, L, le.parse(
|
|
224
|
+
getComputedStyle(t(this, f)).columnGap
|
|
225
225
|
)), t(this, H).current && t(this, l).length) {
|
|
226
|
-
const r = t(this, A).current, c = (t(this, y) - t(this,
|
|
226
|
+
const r = t(this, A).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
|
|
227
227
|
t(this, l).forEach((b) => {
|
|
228
228
|
b.setSize(c);
|
|
229
229
|
});
|
|
@@ -236,18 +236,18 @@ class At extends HTMLElement {
|
|
|
236
236
|
}), t(this, R).current) {
|
|
237
237
|
h(this, g, t(this, y) * t(this, R).current);
|
|
238
238
|
const r = t(this, g) + t(this, y);
|
|
239
|
-
this.vertical ? (t(this,
|
|
239
|
+
this.vertical ? (t(this, f).style.width = r + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = r + "px", t(this, f).style.width = "100%");
|
|
240
240
|
} else
|
|
241
|
-
this.vertical ? (t(this,
|
|
241
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, g, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, g, t(this, f).offsetWidth - t(this, y)));
|
|
242
242
|
if (!t(this, C).current) {
|
|
243
243
|
const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
244
244
|
h(this, g, t(this, g) + c), t(this, u).max = t(this, g);
|
|
245
245
|
}
|
|
246
246
|
if (t(this, C).current && t(this, l).length) {
|
|
247
247
|
const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, y), b = t(this, g) - c;
|
|
248
|
-
h(this,
|
|
248
|
+
h(this, Y, r.position + r.size + b);
|
|
249
249
|
} else
|
|
250
|
-
h(this,
|
|
250
|
+
h(this, Y, t(this, g));
|
|
251
251
|
if (t(this, D).current && t(this, l).length) {
|
|
252
252
|
const r = t(this, l)[i];
|
|
253
253
|
t(this, u).set(r.position, {
|
|
@@ -257,10 +257,10 @@ class At extends HTMLElement {
|
|
|
257
257
|
t(this, u).set(e * t(this, g), {
|
|
258
258
|
equalize: !0
|
|
259
259
|
});
|
|
260
|
-
h(this,
|
|
260
|
+
h(this, F, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, F)), t(this, F) ? d(this, o, qt).call(this) : d(this, o, Nt).call(this), t(this, wt).call(this);
|
|
261
261
|
});
|
|
262
|
-
s(this,
|
|
263
|
-
if (!t(this,
|
|
262
|
+
s(this, wt, () => {
|
|
263
|
+
if (!t(this, F))
|
|
264
264
|
return;
|
|
265
265
|
const e = this.currentScrollValue;
|
|
266
266
|
if (h(this, Ct, Math.max(0, e - t(this, g))), t(this, l).length) {
|
|
@@ -271,7 +271,7 @@ class At extends HTMLElement {
|
|
|
271
271
|
}
|
|
272
272
|
t(this, S).current = i;
|
|
273
273
|
} else
|
|
274
|
-
this.vertical ? t(this,
|
|
274
|
+
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
275
275
|
gt.update(
|
|
276
276
|
this,
|
|
277
277
|
t(this, P).current,
|
|
@@ -288,7 +288,7 @@ class At extends HTMLElement {
|
|
|
288
288
|
if (t(this, V).current > 0 && i < 0)
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
if (t(this,
|
|
291
|
+
if (t(this, $).unlistenAnimationFrame(), !t(this, k).current && t(this, j).current && (clearInterval(t(this, Et)), h(this, Et, setTimeout(() => {
|
|
292
292
|
const r = d(this, o, ee).call(this);
|
|
293
293
|
r && this.scrollToSection(r.index, {
|
|
294
294
|
tween: {
|
|
@@ -296,7 +296,7 @@ class At extends HTMLElement {
|
|
|
296
296
|
easing: ye
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
|
-
}, t(this,
|
|
299
|
+
}, t(this, j).current))), !(e === "drag" && !ke.isMobile && !t(this, at).current))
|
|
300
300
|
if (t(this, D).current) {
|
|
301
301
|
const r = Math.sign(i);
|
|
302
302
|
t(this, l).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
|
|
@@ -307,7 +307,7 @@ class At extends HTMLElement {
|
|
|
307
307
|
const e = this.attachShadow({ mode: "open" });
|
|
308
308
|
e.adoptedStyleSheets.push(Te);
|
|
309
309
|
const i = document.createElement("div");
|
|
310
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this,
|
|
310
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Q, document.createElement("div")), t(this, Q).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, yt, document.createElement("slot")), t(this, f).appendChild(t(this, yt)), t(this, Q).appendChild(t(this, f)), e.appendChild(t(this, Q));
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
get damped() {
|
|
@@ -335,7 +335,7 @@ class At extends HTMLElement {
|
|
|
335
335
|
return t(this, H);
|
|
336
336
|
}
|
|
337
337
|
get wheelMaxDeltaCSSProperty() {
|
|
338
|
-
return t(this,
|
|
338
|
+
return t(this, K);
|
|
339
339
|
}
|
|
340
340
|
get sectionsInViewCSSProperty() {
|
|
341
341
|
return t(this, A);
|
|
@@ -365,28 +365,28 @@ class At extends HTMLElement {
|
|
|
365
365
|
return t(this, ut);
|
|
366
366
|
}
|
|
367
367
|
get autoplayUserDirectionCSSProperty() {
|
|
368
|
-
return t(this,
|
|
368
|
+
return t(this, _);
|
|
369
369
|
}
|
|
370
370
|
get classesCSSProperty() {
|
|
371
371
|
return t(this, I);
|
|
372
372
|
}
|
|
373
373
|
get currentIndexStartOffsetCSSProperty() {
|
|
374
|
-
return t(this,
|
|
374
|
+
return t(this, Z);
|
|
375
375
|
}
|
|
376
376
|
get currentIndexEndOffsetCSSProperty() {
|
|
377
377
|
return t(this, B);
|
|
378
378
|
}
|
|
379
379
|
get focusDelayCSSProperty() {
|
|
380
|
-
return t(this,
|
|
380
|
+
return t(this, j);
|
|
381
381
|
}
|
|
382
382
|
get focusDurationCSSProperty() {
|
|
383
383
|
return t(this, dt);
|
|
384
384
|
}
|
|
385
385
|
get disabledCSSProperty() {
|
|
386
|
-
return t(this,
|
|
386
|
+
return t(this, ft);
|
|
387
387
|
}
|
|
388
388
|
get hibernatedCSSProperty() {
|
|
389
|
-
return t(this,
|
|
389
|
+
return t(this, J);
|
|
390
390
|
}
|
|
391
391
|
get currentScrollValue() {
|
|
392
392
|
return d(this, o, te).call(this, "current");
|
|
@@ -395,19 +395,19 @@ class At extends HTMLElement {
|
|
|
395
395
|
return d(this, o, te).call(this, "target");
|
|
396
396
|
}
|
|
397
397
|
get contentWrapperElement() {
|
|
398
|
-
return t(this,
|
|
398
|
+
return t(this, Q);
|
|
399
399
|
}
|
|
400
400
|
get contentElement() {
|
|
401
|
-
return t(this,
|
|
401
|
+
return t(this, f);
|
|
402
402
|
}
|
|
403
403
|
get sections() {
|
|
404
404
|
return t(this, l);
|
|
405
405
|
}
|
|
406
406
|
get position() {
|
|
407
|
-
return t(this,
|
|
407
|
+
return t(this, Tt);
|
|
408
408
|
}
|
|
409
409
|
get contentPosition() {
|
|
410
|
-
return t(this,
|
|
410
|
+
return t(this, Vt);
|
|
411
411
|
}
|
|
412
412
|
get viewportSize() {
|
|
413
413
|
return t(this, y);
|
|
@@ -416,7 +416,7 @@ class At extends HTMLElement {
|
|
|
416
416
|
return t(this, g);
|
|
417
417
|
}
|
|
418
418
|
get gap() {
|
|
419
|
-
return t(this,
|
|
419
|
+
return t(this, L);
|
|
420
420
|
}
|
|
421
421
|
get counter() {
|
|
422
422
|
return t(this, S);
|
|
@@ -425,13 +425,13 @@ class At extends HTMLElement {
|
|
|
425
425
|
return t(this, l).length - t(this, A).current;
|
|
426
426
|
}
|
|
427
427
|
get distance() {
|
|
428
|
-
return t(this,
|
|
428
|
+
return t(this, Y);
|
|
429
429
|
}
|
|
430
430
|
get loopDistance() {
|
|
431
|
-
return t(this, C).current ? t(this,
|
|
431
|
+
return t(this, C).current ? t(this, Y) + t(this, L) : t(this, Y);
|
|
432
432
|
}
|
|
433
433
|
get hasOverflow() {
|
|
434
|
-
return t(this,
|
|
434
|
+
return t(this, F);
|
|
435
435
|
}
|
|
436
436
|
get overscroll() {
|
|
437
437
|
return t(this, Ct);
|
|
@@ -473,19 +473,19 @@ class At extends HTMLElement {
|
|
|
473
473
|
if (!t(this, l).length)
|
|
474
474
|
return;
|
|
475
475
|
const r = t(this, S).current;
|
|
476
|
-
d(this, o,
|
|
476
|
+
d(this, o, fe).call(this, e);
|
|
477
477
|
const c = t(this, l)[r], b = t(this, l)[t(this, S).current];
|
|
478
478
|
if (c && b) {
|
|
479
|
-
let
|
|
479
|
+
let x = 0;
|
|
480
480
|
const bt = d(this, o, ee).call(this), me = bt ? this.targetScrollValue - bt.position : 0;
|
|
481
|
-
t(this, C).current ? t(this, S).current === 0 && r === t(this, l).length - 1 ?
|
|
481
|
+
t(this, C).current ? t(this, S).current === 0 && r === t(this, l).length - 1 ? x = t(this, g) + t(this, y) - c.position + t(this, L) + 1 : t(this, S).current === t(this, l).length - 1 && r === 0 ? x = b.position - (t(this, g) + t(this, y) + t(this, L)) : x = b.position - c.position : x = b.position - c.position, this.shiftPosition(x - me, i);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
shiftSections(e, i) {
|
|
485
485
|
t(this, l).length && this.scrollToSection(t(this, S).current + e, i);
|
|
486
486
|
}
|
|
487
487
|
setPosition(e, i) {
|
|
488
|
-
d(this, o, Yt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this,
|
|
488
|
+
d(this, o, Yt).call(this, Math.sign(e) || 1), i != null && i.tween ? (t(this, $).set(t(this, u).current, { equalize: !0 }), t(this, $).set(e, oe({}, i.tween))) : t(this, u).set(e, {
|
|
489
489
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
490
490
|
});
|
|
491
491
|
}
|
|
@@ -497,26 +497,26 @@ class At extends HTMLElement {
|
|
|
497
497
|
damping: 0.01,
|
|
498
498
|
min: 0,
|
|
499
499
|
order: Ce.SCROLL
|
|
500
|
-
})), this.setAttribute("tabindex", "0"), h(this, M, new
|
|
500
|
+
})), this.setAttribute("tabindex", "0"), h(this, M, new xe({ element: t(this, f) })), t(this, M).changeEvent.subscribe(t(this, xt)), h(this, X, new Pe({
|
|
501
501
|
element: this
|
|
502
|
-
})), t(this,
|
|
502
|
+
})), t(this, X).changeEvent.subscribe(
|
|
503
503
|
t(this, xt)
|
|
504
|
-
), h(this, W, new
|
|
504
|
+
), h(this, W, new Le({ element: t(this, f) })), t(this, W).changeEvent.subscribe(t(this, xt)), h(this, E, new ze({
|
|
505
505
|
culling: this
|
|
506
506
|
})), t(this, E).changeEvent.subscribe(t(this, Rt)), t(this, P).subscribe(({ current: e }) => {
|
|
507
|
-
t(this,
|
|
508
|
-
}), t(this,
|
|
507
|
+
t(this, f).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, K).current ? "max" : e, t(this, X).dimension = e === "x" ? "width" : "height", t(this, W).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
|
|
508
|
+
}), t(this, K).subscribe((e) => {
|
|
509
509
|
t(this, M).axis = e.current ? "max" : t(this, P).current;
|
|
510
510
|
}), t(this, R).subscribe(() => {
|
|
511
|
-
this.isConnected && t(this,
|
|
511
|
+
this.isConnected && t(this, z).call(this);
|
|
512
512
|
}), t(this, O).subscribe(({ current: e }) => {
|
|
513
|
-
this.isConnected && (e ? d(this, o,
|
|
513
|
+
this.isConnected && (e ? d(this, o, At).call(this) : d(this, o, St).call(this));
|
|
514
514
|
}), t(this, D).subscribe((e) => {
|
|
515
|
-
t(this, M).debounce = e.current, t(this, W).swipe = e.current, t(this, E).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o,
|
|
515
|
+
t(this, M).debounce = e.current, t(this, W).swipe = e.current, t(this, E).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, At).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, St).call(this));
|
|
516
516
|
}), t(this, H).subscribe((e) => {
|
|
517
|
-
this.isConnected && (t(this,
|
|
517
|
+
this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, At).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, St).call(this));
|
|
518
518
|
}), t(this, A).subscribe((e) => {
|
|
519
|
-
this.isConnected && (t(this,
|
|
519
|
+
this.isConnected && (t(this, z).call(this), d(this, o, rt).call(this));
|
|
520
520
|
}), t(this, C).subscribe((e) => {
|
|
521
521
|
e.current ? (this.isConnected && (t(this, l).length || (t(this, O).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, Ct, 0), t(this, u).max = t(this, g), t(this, u).min = 0);
|
|
522
522
|
}), t(this, ot).subscribe((e) => {
|
|
@@ -527,11 +527,11 @@ class At extends HTMLElement {
|
|
|
527
527
|
t(this, u).stiffness = e.current;
|
|
528
528
|
}), t(this, k).subscribe((e) => {
|
|
529
529
|
t(this, E).speed = e.current, !t(this, tt) && e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
|
|
530
|
-
}), t(this,
|
|
530
|
+
}), t(this, _).subscribe((e) => {
|
|
531
531
|
e.current || (t(this, E).direction = 1);
|
|
532
532
|
}), t(this, I).subscribe((e) => {
|
|
533
533
|
this.isConnected && d(this, o, rt).call(this);
|
|
534
|
-
}), t(this,
|
|
534
|
+
}), t(this, Z).subscribe((e) => {
|
|
535
535
|
this.isConnected && t(this, I).current && d(this, o, rt).call(this);
|
|
536
536
|
}), t(this, B).subscribe((e) => {
|
|
537
537
|
this.isConnected && t(this, I).current && d(this, o, rt).call(this);
|
|
@@ -539,25 +539,25 @@ class At extends HTMLElement {
|
|
|
539
539
|
this.classList.toggle("active", e.current);
|
|
540
540
|
}), t(this, S).subscribe((e) => {
|
|
541
541
|
t(this, l).length && d(this, o, rt).call(this);
|
|
542
|
-
}), t(this,
|
|
543
|
-
t(this,
|
|
544
|
-
}), t(this,
|
|
542
|
+
}), t(this, $).subscribe((e) => {
|
|
543
|
+
t(this, $).isRunning.current && t(this, u).set(e.current);
|
|
544
|
+
}), t(this, ft).subscribe((e) => {
|
|
545
545
|
e.current && !e.previous ? d(this, o, Nt).call(this) : !e.current && e.previous && d(this, o, qt).call(this);
|
|
546
|
-
}), t(this,
|
|
546
|
+
}), t(this, J).subscribe((e) => {
|
|
547
547
|
e.current && !e.previous ? d(this, o, Qt).call(this) : !e.current && e.previous && d(this, o, Xt).call(this);
|
|
548
|
-
}), t(this, ht).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, O).observe(), t(this, D).observe(), t(this, H).observe(), t(this,
|
|
548
|
+
}), t(this, ht).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, O).observe(), t(this, D).observe(), t(this, H).observe(), t(this, K).observe(), t(this, A).observe(), t(this, C).observe(), t(this, ot).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, vt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, ut).observe(), t(this, _).observe(), t(this, I).observe(), t(this, Z).observe(), t(this, B).observe(), t(this, j).observe(), t(this, dt).observe(), t(this, ft).observe(), t(this, J).observe(), t(this, J).current || d(this, o, Xt).call(this);
|
|
549
549
|
}
|
|
550
550
|
disconnectedCallback() {
|
|
551
|
-
this.
|
|
551
|
+
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, ht).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, O).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, K).unobserve(), t(this, A).unobserve(), t(this, C).unobserve(), t(this, ot).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, vt).unobserve(), t(this, k).unobserve(), t(this, ut).unobserve(), t(this, _).unobserve(), t(this, I).unobserve(), t(this, Z).unobserve(), t(this, B).unobserve(), t(this, j).unobserve(), t(this, dt).unobserve(), t(this, ft).unobserve(), t(this, J).unobserve(), d(this, o, Qt).call(this);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), D = new WeakMap(), H = new WeakMap(),
|
|
554
|
+
u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), D = new WeakMap(), H = new WeakMap(), K = new WeakMap(), A = new WeakMap(), C = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), vt = new WeakMap(), k = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), I = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), j = new WeakMap(), dt = new WeakMap(), ft = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), f = new WeakMap(), yt = new WeakMap(), l = new WeakMap(), Tt = new WeakMap(), Vt = new WeakMap(), y = new WeakMap(), g = new WeakMap(), L = new WeakMap(), M = new WeakMap(), X = new WeakMap(), W = new WeakMap(), E = new WeakMap(), S = new WeakMap(), Ct = new WeakMap(), Y = new WeakMap(), se = new WeakMap(), F = new WeakMap(), tt = new WeakMap(), pt = new WeakMap(), Et = new WeakMap(), $ = new WeakMap(), o = new WeakSet(), At = function() {
|
|
555
555
|
d(this, o, St).call(this), t(this, yt).assignedElements().forEach((e, i) => {
|
|
556
556
|
e instanceof HTMLElement && t(this, l).push(new Me(e, i, this));
|
|
557
|
-
}), t(this,
|
|
557
|
+
}), t(this, f).style.transform = "", Zt(this, "scrollSectionsChange", {
|
|
558
558
|
custom: !0,
|
|
559
559
|
composed: !0
|
|
560
|
-
}), t(this,
|
|
560
|
+
}), t(this, z).call(this), d(this, o, rt).call(this);
|
|
561
561
|
}, St = function() {
|
|
562
562
|
t(this, l).forEach((e) => {
|
|
563
563
|
e.destroy();
|
|
@@ -566,36 +566,36 @@ u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
|
|
|
566
566
|
composed: !0
|
|
567
567
|
});
|
|
568
568
|
}, Nt = function() {
|
|
569
|
-
t(this, tt) || (
|
|
569
|
+
t(this, tt) || (h(this, tt, !0), t(this, u).unsubscribe(t(this, wt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Et)), t(this, $).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, X).disconnect(), t(this, W).disconnect(), t(this, E).disconnect(), t(this, F) || this.sections.forEach((e) => {
|
|
570
570
|
e.unsetTransform();
|
|
571
571
|
}));
|
|
572
572
|
}, qt = function() {
|
|
573
|
-
t(this, tt) && (h(this, tt, !1), t(this, u).subscribe(t(this,
|
|
573
|
+
t(this, tt) && (h(this, tt, !1), t(this, u).subscribe(t(this, wt)), t(this, M).connect(), t(this, X).connect(), t(this, W).connect(), t(this, k).current && t(this, E).connect());
|
|
574
574
|
}, Qt = function() {
|
|
575
|
-
t(this,
|
|
575
|
+
t(this, pt) || (h(this, pt, !0), Ut.unsubscribe(t(this, z)), Gt.unsubscribe(t(this, z)), d(this, o, Nt).call(this), t(this, f).style.transform = "", t(this, l).length ? d(this, o, St).call(this) : (t(this, S).reset(), t(this, u).reset()), gt.unregister(this));
|
|
576
576
|
}, Xt = function() {
|
|
577
|
-
t(this,
|
|
578
|
-
},
|
|
577
|
+
t(this, pt) && (h(this, pt, !1), (t(this, C).current || t(this, O).current || t(this, C).current || t(this, H).current || t(this, D).current) && d(this, o, At).call(this), gt.register(this), d(this, o, qt).call(this), Ut.subscribe(t(this, z), ue.SCROLL), Gt.subscribe(this, t(this, z)));
|
|
578
|
+
}, z = new WeakMap(), wt = new WeakMap(), fe = function(e) {
|
|
579
579
|
t(this, C).current ? (t(this, S).current = e % t(this, l).length, t(this, S).current = t(this, S).current < 0 ? t(this, l).length + t(this, S).current : t(this, S).current) : t(this, S).current = ae(e, 0, this.limit);
|
|
580
580
|
}, xt = new WeakMap(), Rt = new WeakMap(), Yt = function(e = 1) {
|
|
581
|
-
t(this,
|
|
581
|
+
t(this, _).current && (t(this, E).direction = e), t(this, k).current && t(this, E).pauseAndContinue(
|
|
582
582
|
t(this, ut).current,
|
|
583
583
|
this.sectionalCSSProperty.current
|
|
584
584
|
);
|
|
585
585
|
}, te = function(e = "current") {
|
|
586
586
|
if (t(this, C).current && t(this, l).length) {
|
|
587
|
-
const i = t(this, u)[e] % (t(this, g) + t(this, y) + t(this,
|
|
588
|
-
return i < 0 ? t(this, g) + i + t(this, y) + t(this,
|
|
587
|
+
const i = t(this, u)[e] % (t(this, g) + t(this, y) + t(this, L));
|
|
588
|
+
return i < 0 ? t(this, g) + i + t(this, y) + t(this, L) : i;
|
|
589
589
|
} else
|
|
590
590
|
return t(this, u)[e];
|
|
591
591
|
}, rt = function() {
|
|
592
592
|
if (t(this, I).current && t(this, l).length) {
|
|
593
|
-
const e = t(this, S).current + t(this,
|
|
593
|
+
const e = t(this, S).current + t(this, Z).current;
|
|
594
594
|
e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
|
|
595
595
|
const i = t(this, A).current + t(this, B).current;
|
|
596
596
|
t(this, l).forEach((r, c) => {
|
|
597
|
-
const b = e - this.limit - 1 + t(this, B).current,
|
|
598
|
-
c >= e && c <
|
|
597
|
+
const b = e - this.limit - 1 + t(this, B).current, x = e + i, bt = this.sections.length - x;
|
|
598
|
+
c >= e && c < x || c <= b ? r.mark("current") : c >= x && c < x + bt / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
601
|
}, ee = function() {
|
|
@@ -606,7 +606,7 @@ u = new WeakMap(), ht = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
|
|
|
606
606
|
}
|
|
607
607
|
return e !== null ? t(this, l)[e] : null;
|
|
608
608
|
};
|
|
609
|
-
customElements.get("e-scroll") || customElements.define("e-scroll",
|
|
609
|
+
customElements.get("e-scroll") || customElements.define("e-scroll", It);
|
|
610
610
|
var Ot;
|
|
611
611
|
class ie extends HTMLElement {
|
|
612
612
|
constructor() {
|
|
@@ -617,28 +617,28 @@ class ie extends HTMLElement {
|
|
|
617
617
|
return t(this, Ot);
|
|
618
618
|
}
|
|
619
619
|
connectedCallback() {
|
|
620
|
-
const e = de(this,
|
|
621
|
-
e instanceof
|
|
620
|
+
const e = de(this, It);
|
|
621
|
+
e instanceof It ? h(this, Ot, e) : console.error(this, "e-scroll not found");
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
Ot = new WeakMap();
|
|
625
|
-
var et,
|
|
625
|
+
var et, w, N, q, Pt, Lt, mt, Ht, Bt, Wt;
|
|
626
626
|
class Ve extends ie {
|
|
627
627
|
constructor() {
|
|
628
628
|
super();
|
|
629
629
|
s(this, et, null);
|
|
630
|
-
s(this,
|
|
631
|
-
s(this,
|
|
632
|
-
s(this,
|
|
633
|
-
s(this, wt, 0);
|
|
630
|
+
s(this, w, null);
|
|
631
|
+
s(this, N, !1);
|
|
632
|
+
s(this, q, 0);
|
|
634
633
|
s(this, Pt, 0);
|
|
634
|
+
s(this, Lt, 0);
|
|
635
635
|
s(this, mt, () => {
|
|
636
|
-
h(this,
|
|
637
|
-
const e = t(this,
|
|
638
|
-
h(this,
|
|
636
|
+
h(this, N, this.offsetWidth > this.offsetHeight);
|
|
637
|
+
const e = t(this, N) ? this.offsetWidth : this.offsetHeight;
|
|
638
|
+
h(this, q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, q, Math.max(t(this, q), 30)), t(this, N) ? (t(this, w).style.width = t(this, q) + "px", t(this, w).style.height = "100%") : (t(this, w).style.width = "100%", t(this, w).style.height = t(this, q) + "px"), h(this, Pt, e - t(this, q)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
639
639
|
});
|
|
640
640
|
s(this, Ht, () => {
|
|
641
|
-
h(this,
|
|
641
|
+
h(this, Lt, this.scrollElement.currentProgress * t(this, Pt)), t(this, N) ? t(this, w).style.transform = `translate3d(${t(this, Lt)}px, 0px, 0px)` : t(this, w).style.transform = `translate3d(0px, ${t(this, Lt)}px, 0px)`;
|
|
642
642
|
});
|
|
643
643
|
s(this, Bt, () => {
|
|
644
644
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
@@ -646,14 +646,14 @@ class Ve extends ie {
|
|
|
646
646
|
s(this, Wt, (e) => {
|
|
647
647
|
document.documentElement.classList.add("grabbing"), De(
|
|
648
648
|
(c) => {
|
|
649
|
-
const b = t(this,
|
|
649
|
+
const b = t(this, N) ? c.x : c.y, x = this.scrollElement.distance / t(this, Pt), bt = (b - r) * x;
|
|
650
650
|
this.scrollElement.setPosition(i + bt);
|
|
651
651
|
},
|
|
652
652
|
() => {
|
|
653
653
|
document.documentElement.classList.remove("grabbing");
|
|
654
654
|
}
|
|
655
655
|
);
|
|
656
|
-
const i = this.scrollElement.damped.target, r = t(this,
|
|
656
|
+
const i = this.scrollElement.damped.target, r = t(this, N) ? e.x : e.y;
|
|
657
657
|
});
|
|
658
658
|
if (Kt) {
|
|
659
659
|
const e = this.attachShadow({ mode: "open" });
|
|
@@ -691,44 +691,44 @@ class Ve extends ie {
|
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
get thumbElement() {
|
|
694
|
-
return t(this,
|
|
694
|
+
return t(this, w);
|
|
695
695
|
}
|
|
696
696
|
connectedCallback() {
|
|
697
697
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
698
698
|
const e = t(this, et).assignedElements()[0] || t(this, et).firstElementChild;
|
|
699
|
-
h(this,
|
|
699
|
+
h(this, w, e), t(this, w).addEventListener("pointerdown", t(this, Wt)), Ut.subscribe(t(this, mt), ue.SCROLL), Gt.subscribe(this, t(this, mt)), this.scrollElement.onScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.subscribe(t(this, Bt));
|
|
700
700
|
}
|
|
701
701
|
disconnectedCallback() {
|
|
702
|
-
this.removeAttribute("drag-dead-zone"), t(this,
|
|
702
|
+
this.removeAttribute("drag-dead-zone"), t(this, w).removeEventListener("pointerdown", t(this, Wt)), Ut.unsubscribe(t(this, mt)), Gt.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Bt));
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
et = new WeakMap(),
|
|
705
|
+
et = new WeakMap(), w = new WeakMap(), N = new WeakMap(), q = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), mt = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), Wt = new WeakMap();
|
|
706
706
|
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ve);
|
|
707
|
-
class
|
|
707
|
+
class pe extends ie {
|
|
708
708
|
constructor() {
|
|
709
709
|
super(), Kt && this.addEventListener("click", () => {
|
|
710
710
|
this.handleClick();
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
class Re extends
|
|
714
|
+
class Re extends pe {
|
|
715
715
|
handleClick() {
|
|
716
716
|
const n = this.getAttribute("index"), e = this.getAttribute("behaviour");
|
|
717
717
|
this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: e });
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Re);
|
|
721
|
-
class Oe extends
|
|
721
|
+
class Oe extends pe {
|
|
722
722
|
handleClick() {
|
|
723
723
|
const n = this.getAttribute("step"), e = this.getAttribute("behaviour");
|
|
724
724
|
this.scrollElement.shiftSections(parseInt(n || "1"), { behaviour: e });
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Oe);
|
|
728
|
-
var
|
|
728
|
+
var U, st, zt, Ft, $t, kt;
|
|
729
729
|
class He {
|
|
730
730
|
constructor(n, e, i) {
|
|
731
|
-
s(this,
|
|
731
|
+
s(this, U, null);
|
|
732
732
|
s(this, st, null);
|
|
733
733
|
s(this, zt, null);
|
|
734
734
|
s(this, Ft, null);
|
|
@@ -737,28 +737,28 @@ class He {
|
|
|
737
737
|
behaviour: t(this, Ft)
|
|
738
738
|
});
|
|
739
739
|
});
|
|
740
|
-
s(this,
|
|
741
|
-
t(this,
|
|
740
|
+
s(this, kt, () => {
|
|
741
|
+
t(this, U).classList.toggle(
|
|
742
742
|
"current",
|
|
743
743
|
t(this, st).counter.current === t(this, zt)
|
|
744
744
|
);
|
|
745
745
|
});
|
|
746
|
-
Kt && (h(this,
|
|
746
|
+
Kt && (h(this, U, document.createElement("button")), h(this, st, n), h(this, Ft, i), h(this, zt, e), t(this, U).addEventListener("click", t(this, $t)), t(this, st).counter.subscribe(t(this, kt)), t(this, kt).call(this));
|
|
747
747
|
}
|
|
748
748
|
get element() {
|
|
749
|
-
return t(this,
|
|
749
|
+
return t(this, U);
|
|
750
750
|
}
|
|
751
751
|
destroy() {
|
|
752
|
-
t(this,
|
|
752
|
+
t(this, U).removeEventListener("click", t(this, $t)), t(this, st).counter.unsubscribe(t(this, kt)), t(this, U).remove();
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
|
|
756
|
-
var it,
|
|
755
|
+
U = new WeakMap(), st = new WeakMap(), zt = new WeakMap(), Ft = new WeakMap(), $t = new WeakMap(), kt = new WeakMap();
|
|
756
|
+
var it, Dt;
|
|
757
757
|
class Be extends ie {
|
|
758
758
|
constructor() {
|
|
759
759
|
super(...arguments);
|
|
760
760
|
s(this, it, []);
|
|
761
|
-
s(this,
|
|
761
|
+
s(this, Dt, Ae(() => {
|
|
762
762
|
t(this, it).forEach((e) => e.destroy()), h(this, it, []);
|
|
763
763
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
764
764
|
const i = new He(
|
|
@@ -773,22 +773,22 @@ class Be extends ie {
|
|
|
773
773
|
connectedCallback() {
|
|
774
774
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
775
775
|
"sectionsChange",
|
|
776
|
-
t(this,
|
|
777
|
-
), t(this,
|
|
776
|
+
t(this, Dt)
|
|
777
|
+
), t(this, Dt).call(this);
|
|
778
778
|
}
|
|
779
779
|
disconnectedCallback() {
|
|
780
780
|
this.scrollElement.removeEventListener(
|
|
781
781
|
"sectionsChange",
|
|
782
|
-
t(this,
|
|
782
|
+
t(this, Dt)
|
|
783
783
|
), t(this, it).forEach((e) => e.destroy()), h(this, it, []);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
it = new WeakMap(),
|
|
786
|
+
it = new WeakMap(), Dt = new WeakMap();
|
|
787
787
|
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Be);
|
|
788
788
|
class We extends Ie {
|
|
789
789
|
connectedCallback() {
|
|
790
|
-
const n = de(this,
|
|
791
|
-
n instanceof
|
|
790
|
+
const n = de(this, It);
|
|
791
|
+
n instanceof It ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
792
792
|
"scrollSectionsChange",
|
|
793
793
|
this.findAnotherScrollEntries
|
|
794
794
|
)) : console.error(this, "e-scroll not found");
|
|
@@ -797,7 +797,7 @@ class We extends Ie {
|
|
|
797
797
|
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", We);
|
|
798
798
|
export {
|
|
799
799
|
Be as ScrollBulletButtonsElement,
|
|
800
|
-
|
|
800
|
+
It as ScrollElement,
|
|
801
801
|
We as ScrollSegmentElement,
|
|
802
802
|
Re as ScrollSetButtonElement,
|
|
803
803
|
Oe as ScrollStepButtonElement,
|