aptechka 0.32.2 → 0.32.4
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/PopoverElement.d.ts +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +106 -95
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +175 -168
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export declare class PopoverElement extends HTMLElement {
|
|
|
16
16
|
private static __opened;
|
|
17
17
|
get history(): Attribute<false>;
|
|
18
18
|
get restore(): Attribute<false>;
|
|
19
|
-
get
|
|
19
|
+
get dominance(): Attribute<number>;
|
|
20
20
|
get opened(): Store<boolean>;
|
|
21
21
|
get lastTrigger(): any;
|
|
22
22
|
open: (options?: {
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var N=o=>{throw TypeError(o)};var H=(o,n,t)=>n.has(o)||N("Cannot "+t);var e=(o,n,t)=>(H(o,n,"read from private field"),t?t.call(o):n.get(o)),s=(o,n,t)=>n.has(o)?N("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(o):n.set(o,t),i=(o,n,t,l)=>(H(o,n,"write to private field"),l?l.call(o,t):n.set(o,t),t),k=(o,n,t)=>(H(o,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../attribute/index.cjs"),W=require("../Store-CDb6RMce.cjs"),P=require("../events-KVanG9sR.cjs"),F=require("../function-MthRj-GJ.cjs"),G=require("../style-At6aDoqG.cjs"),j=require("../window-resizer/vanilla/index.cjs"),J=require("../browser-CpzFX2xg.cjs");var y,a,_,d,u,g,v,m,p,D,E,z,b,$,f,w,S,T;const c=class c extends HTMLElement{constructor(){super(...arguments);s(this,p);s(this,y);s(this,a);s(this,_);s(this,d);s(this,u);s(this,g);s(this,v);s(this,m);s(this,E);s(this,b);s(this,f);s(this,w);s(this,S);s(this,T);i(this,y,-1),i(this,a,new W.Store(!1)),i(this,d,new O.Attribute(this,"history",!1)),i(this,u,new O.Attribute(this,"restore",!1)),i(this,g,new O.Attribute(this,"dominance",0)),i(this,v,!1),this.open=t=>{if(e(this,a).current)return;i(this,m,t==null?void 0:t.trigger),e(this,a).current=!0,e(this,g).current&&(c.__opened=c.__opened.filter(h=>this.dominance.current>=h.dominance.current?(h.close(),!1):!0)),c.__opened.push(this),i(this,y,c.__opened.length-1),e(this,d).current&&e(this,v)&&history.pushState("","",e(this,p,D)),clearTimeout(e(this,_)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",P.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,m)}});const l=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,b)),e(this,T).call(this),this.style.opacity="1",this.classList.add("opened"),P.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,m)}})};t!=null&&t.skipTransition?l():setTimeout(l,10)},this.close=()=>{e(this,a).current&&(e(this,a).current=!1,c.__opened=c.__opened.filter(t=>t!==this),k(this,p,z).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",P.dispatchEvent(this,"popoverClosing",{custom:!0}),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,b)),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",P.dispatchEvent(this,"popoverClosed",{custom:!0})},G.getElementTransitionDurationMS(this)+10))},i(this,E,t=>{k(this,p,$).call(this,()=>{var I;const l=t.composedPath();if(l.find(B=>B instanceof HTMLElement&&B.hasAttribute("data-popover-content")))return;const h=l[0],M=h instanceof HTMLElement&&(this.contains(h)||((I=this.shadowRoot)==null?void 0:I.contains(h))),L=h instanceof HTMLElement&&h.hasAttribute("data-outside");(!M||L)&&this.close()})}),i(this,b,t=>{k(this,p,$).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,f,()=>{i(this,v,!1),e(this,a).current&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,a).current&&e(this,d).current&&location.search.includes(this.id)&&this.open(),i(this,v,!0)}),i(this,w,()=>{this.style.width="0px",this.style.height="0px",e(this,S).call(this)}),i(this,S,F.debounce(()=>{e(this,T).call(this),this.style.width="",this.style.height=""},20)),i(this,T,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,d)}get restore(){return e(this,u)}get dominance(){return e(this,g)}get opened(){return e(this,a)}get lastTrigger(){return e(this,m)}connectedCallback(){e(this,d).observe(),e(this,u).observe(),e(this,g).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,f)),setTimeout(()=>{e(this,u).current?e(this,f).call(this):(k(this,p,z).call(this),i(this,v,!0))},0),j.windowResizer.subscribe(e(this,w))}disconnectedCallback(){j.windowResizer.unsubscribe(e(this,w)),e(this,d).unobserve(),e(this,u).unobserve(),e(this,g).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,_)),removeEventListener("popstate",e(this,f)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};y=new WeakMap,a=new WeakMap,_=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakMap,v=new WeakMap,m=new WeakMap,p=new WeakSet,D=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,z=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},b=new WeakMap,$=function(t){(c.__opened[e(this,y)-1]||c.__opened.length===1)&&t()},f=new WeakMap,w=new WeakMap,S=new WeakMap,T=new WeakMap,c.__opened=[];let R=c;customElements.get("e-popover")||customElements.define("e-popover",R);var r,C,x,A,q;class U extends HTMLElement{constructor(){super();s(this,r);s(this,C,()=>{this.classList.add("triggered")});s(this,x,()=>{this.classList.add("opened")});s(this,A,()=>{this.classList.remove("opened")});s(this,q,()=>{this.classList.remove("triggered")});J.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,r)}connectedCallback(){var l;this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let h=null;if(t==="parent"){const M=this.closest("[popover-target]");if(M)h=M;else{const L=this.getRootNode();L instanceof ShadowRoot?h=L.host.closest("[popover-target]"):L instanceof HTMLElement&&(h=L.closest("[popover-target]"))}}else t==="sibling"?h=(l=this.parentElement)==null?void 0:l.querySelector("[popover-target]"):h=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);h instanceof HTMLElement?(i(this,r,h),e(this,r).addEventListener("popoverTriggered",e(this,C)),e(this,r).addEventListener("popoverOpened",e(this,x)),e(this,r).addEventListener("popoverClosing",e(this,A)),e(this,r).addEventListener("popoverClosed",e(this,q))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,C)),e(this,r).removeEventListener("popoverOpened",e(this,x)),e(this,r).removeEventListener("popoverClosing",e(this,A)),e(this,r).removeEventListener("popoverClosed",e(this,q)))}}r=new WeakMap,C=new WeakMap,x=new WeakMap,A=new WeakMap,q=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",U);exports.PopoverButtonElement=U;exports.PopoverElement=R;
|
package/lib/popover/index.js
CHANGED
|
@@ -1,72 +1,83 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var B = (o) => {
|
|
2
|
+
throw TypeError(o);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (
|
|
6
|
-
import { Attribute as
|
|
7
|
-
import { S as
|
|
8
|
-
import { d as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
4
|
+
var O = (o, n, t) => n.has(o) || B("Cannot " + t);
|
|
5
|
+
var e = (o, n, t) => (O(o, n, "read from private field"), t ? t.call(o) : n.get(o)), s = (o, n, t) => n.has(o) ? B("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(o) : n.set(o, t), i = (o, n, t, l) => (O(o, n, "write to private field"), l ? l.call(o, t) : n.set(o, t), t), k = (o, n, t) => (O(o, n, "access private method"), t);
|
|
6
|
+
import { Attribute as P } from "../attribute/index.js";
|
|
7
|
+
import { S as W } from "../Store-OTdcl6SX.js";
|
|
8
|
+
import { d as R } from "../events-CsVF98U6.js";
|
|
9
|
+
import { d as j } from "../function-C10DGppn.js";
|
|
10
|
+
import { g as F } from "../style-j2TwriJ_.js";
|
|
11
|
+
import { windowResizer as D } from "../window-resizer/vanilla/index.js";
|
|
12
|
+
import { i as G } from "../browser-0zX67oeU.js";
|
|
13
|
+
var y, a, C, d, u, g, m, v, p, U, E, z, b, I, f, T, S, w;
|
|
12
14
|
const c = class c extends HTMLElement {
|
|
13
15
|
constructor() {
|
|
14
16
|
super(...arguments);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
s(this, p);
|
|
18
|
+
s(this, y);
|
|
19
|
+
s(this, a);
|
|
20
|
+
s(this, C);
|
|
21
|
+
s(this, d);
|
|
22
|
+
s(this, u);
|
|
23
|
+
s(this, g);
|
|
24
|
+
s(this, m);
|
|
25
|
+
s(this, v);
|
|
26
|
+
s(this, E);
|
|
27
|
+
s(this, b);
|
|
28
|
+
s(this, f);
|
|
29
|
+
s(this, T);
|
|
30
|
+
s(this, S);
|
|
31
|
+
s(this, w);
|
|
32
|
+
i(this, y, -1), i(this, a, new W(!1)), i(this, d, new P(this, "history", !1)), i(this, u, new P(this, "restore", !1)), i(this, g, new P(this, "dominance", 0)), i(this, m, !1), this.open = (t) => {
|
|
33
|
+
if (e(this, a).current)
|
|
29
34
|
return;
|
|
30
|
-
|
|
35
|
+
i(this, v, t == null ? void 0 : t.trigger), e(this, a).current = !0, e(this, g).current && (c.__opened = c.__opened.filter((h) => this.dominance.current >= h.dominance.current ? (h.close(), !1) : !0)), c.__opened.push(this), i(this, y, c.__opened.length - 1), e(this, d).current && e(this, m) && history.pushState("", "", e(this, p, U)), clearTimeout(e(this, C)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", R(this, "popoverTriggered", {
|
|
31
36
|
custom: !0,
|
|
32
37
|
detail: {
|
|
33
|
-
trigger: e(this,
|
|
38
|
+
trigger: e(this, v)
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
|
-
const
|
|
37
|
-
addEventListener("click", e(this,
|
|
41
|
+
const l = () => {
|
|
42
|
+
addEventListener("click", e(this, E)), addEventListener("keydown", e(this, b)), e(this, w).call(this), this.style.opacity = "1", this.classList.add("opened"), R(this, "popoverOpened", {
|
|
38
43
|
custom: !0,
|
|
39
44
|
detail: {
|
|
40
|
-
trigger: e(this,
|
|
45
|
+
trigger: e(this, v)
|
|
41
46
|
}
|
|
42
47
|
});
|
|
43
48
|
};
|
|
44
|
-
t != null && t.skipTransition ?
|
|
49
|
+
t != null && t.skipTransition ? l() : setTimeout(l, 10);
|
|
45
50
|
}, this.close = () => {
|
|
46
|
-
e(this,
|
|
51
|
+
e(this, a).current && (e(this, a).current = !1, c.__opened = c.__opened.filter((t) => t !== this), k(this, p, z).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", R(this, "popoverClosing", {
|
|
47
52
|
custom: !0
|
|
48
|
-
}), removeEventListener("click", e(this,
|
|
49
|
-
this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none",
|
|
53
|
+
}), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, b)), setTimeout(() => {
|
|
54
|
+
this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", R(this, "popoverClosed", {
|
|
50
55
|
custom: !0
|
|
51
56
|
});
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
(
|
|
57
|
+
}, F(this) + 10));
|
|
58
|
+
}, i(this, E, (t) => {
|
|
59
|
+
k(this, p, I).call(this, () => {
|
|
60
|
+
var q;
|
|
61
|
+
const l = t.composedPath();
|
|
62
|
+
if (l.find(
|
|
63
|
+
(N) => N instanceof HTMLElement && N.hasAttribute("data-popover-content")
|
|
59
64
|
))
|
|
60
65
|
return;
|
|
61
|
-
const h =
|
|
62
|
-
(!
|
|
66
|
+
const h = l[0], M = h instanceof HTMLElement && (this.contains(h) || ((q = this.shadowRoot) == null ? void 0 : q.contains(h))), L = h instanceof HTMLElement && h.hasAttribute("data-outside");
|
|
67
|
+
(!M || L) && this.close();
|
|
63
68
|
});
|
|
64
|
-
}),
|
|
65
|
-
|
|
69
|
+
}), i(this, b, (t) => {
|
|
70
|
+
k(this, p, I).call(this, () => {
|
|
66
71
|
t.code === "Escape" && this.close();
|
|
67
72
|
});
|
|
68
|
-
}),
|
|
69
|
-
|
|
73
|
+
}), i(this, f, () => {
|
|
74
|
+
i(this, m, !1), e(this, a).current && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, a).current && e(this, d).current && location.search.includes(this.id) && this.open(), i(this, m, !0);
|
|
75
|
+
}), i(this, T, () => {
|
|
76
|
+
this.style.width = "0px", this.style.height = "0px", e(this, S).call(this);
|
|
77
|
+
}), i(this, S, j(() => {
|
|
78
|
+
e(this, w).call(this), this.style.width = "", this.style.height = "";
|
|
79
|
+
}, 20)), i(this, w, () => {
|
|
80
|
+
this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
|
|
70
81
|
});
|
|
71
82
|
}
|
|
72
83
|
get history() {
|
|
@@ -75,114 +86,114 @@ const c = class c extends HTMLElement {
|
|
|
75
86
|
get restore() {
|
|
76
87
|
return e(this, u);
|
|
77
88
|
}
|
|
78
|
-
get
|
|
89
|
+
get dominance() {
|
|
79
90
|
return e(this, g);
|
|
80
91
|
}
|
|
81
92
|
get opened() {
|
|
82
|
-
return e(this,
|
|
93
|
+
return e(this, a);
|
|
83
94
|
}
|
|
84
95
|
get lastTrigger() {
|
|
85
|
-
return e(this,
|
|
96
|
+
return e(this, v);
|
|
86
97
|
}
|
|
87
98
|
connectedCallback() {
|
|
88
99
|
e(this, d).observe(), e(this, u).observe(), e(this, g).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, f)), setTimeout(() => {
|
|
89
|
-
e(this, u).current ? e(this, f).call(this) : (
|
|
90
|
-
}, 0);
|
|
100
|
+
e(this, u).current ? e(this, f).call(this) : (k(this, p, z).call(this), i(this, m, !0));
|
|
101
|
+
}, 0), D.subscribe(e(this, T));
|
|
91
102
|
}
|
|
92
103
|
disconnectedCallback() {
|
|
93
|
-
e(this, d).unobserve(), e(this, u).unobserve(), e(this, g).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this,
|
|
104
|
+
D.unsubscribe(e(this, T)), e(this, d).unobserve(), e(this, u).unobserve(), e(this, g).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, C)), removeEventListener("popstate", e(this, f)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
|
|
94
105
|
}
|
|
95
106
|
};
|
|
96
|
-
|
|
107
|
+
y = new WeakMap(), a = new WeakMap(), C = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakMap(), m = new WeakMap(), v = new WeakMap(), p = new WeakSet(), U = function() {
|
|
97
108
|
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
98
|
-
},
|
|
109
|
+
}, E = new WeakMap(), z = function() {
|
|
99
110
|
if (e(this, d).current) {
|
|
100
111
|
const t = new URL(location.href);
|
|
101
112
|
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
102
113
|
}
|
|
103
|
-
},
|
|
104
|
-
(c.__opened[e(this,
|
|
105
|
-
}, f = new WeakMap(), c.__opened = [];
|
|
106
|
-
let
|
|
107
|
-
customElements.get("e-popover") || customElements.define("e-popover",
|
|
108
|
-
var
|
|
109
|
-
class
|
|
114
|
+
}, b = new WeakMap(), I = function(t) {
|
|
115
|
+
(c.__opened[e(this, y) - 1] || c.__opened.length === 1) && t();
|
|
116
|
+
}, f = new WeakMap(), T = new WeakMap(), S = new WeakMap(), w = new WeakMap(), c.__opened = [];
|
|
117
|
+
let $ = c;
|
|
118
|
+
customElements.get("e-popover") || customElements.define("e-popover", $);
|
|
119
|
+
var r, _, x, A, H;
|
|
120
|
+
class J extends HTMLElement {
|
|
110
121
|
constructor() {
|
|
111
122
|
super();
|
|
112
|
-
|
|
113
|
-
|
|
123
|
+
s(this, r);
|
|
124
|
+
s(this, _, () => {
|
|
114
125
|
this.classList.add("triggered");
|
|
115
126
|
});
|
|
116
|
-
|
|
127
|
+
s(this, x, () => {
|
|
117
128
|
this.classList.add("opened");
|
|
118
129
|
});
|
|
119
|
-
|
|
130
|
+
s(this, A, () => {
|
|
120
131
|
this.classList.remove("opened");
|
|
121
132
|
});
|
|
122
|
-
|
|
133
|
+
s(this, H, () => {
|
|
123
134
|
this.classList.remove("triggered");
|
|
124
135
|
});
|
|
125
|
-
|
|
126
|
-
if (e(this,
|
|
136
|
+
G && (this.addEventListener("click", () => {
|
|
137
|
+
if (e(this, r)) {
|
|
127
138
|
const t = this.getAttribute("type") || "open";
|
|
128
|
-
t === "open" || t === "toggle" && !e(this,
|
|
139
|
+
t === "open" || t === "toggle" && !e(this, r).opened.current ? e(this, r).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, r).opened.current) && e(this, r).close();
|
|
129
140
|
}
|
|
130
141
|
}), this.addEventListener("keydown", (t) => {
|
|
131
142
|
t.code === "Space" && t.currentTarget.click();
|
|
132
143
|
}));
|
|
133
144
|
}
|
|
134
145
|
get popoverElement() {
|
|
135
|
-
return e(this,
|
|
146
|
+
return e(this, r);
|
|
136
147
|
}
|
|
137
148
|
connectedCallback() {
|
|
138
|
-
var
|
|
149
|
+
var l;
|
|
139
150
|
this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
140
151
|
const t = this.getAttribute("target");
|
|
141
152
|
if (t) {
|
|
142
153
|
let h = null;
|
|
143
154
|
if (t === "parent") {
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
h =
|
|
155
|
+
const M = this.closest("[popover-target]");
|
|
156
|
+
if (M)
|
|
157
|
+
h = M;
|
|
147
158
|
else {
|
|
148
159
|
const L = this.getRootNode();
|
|
149
160
|
L instanceof ShadowRoot ? h = L.host.closest("[popover-target]") : L instanceof HTMLElement && (h = L.closest("[popover-target]"));
|
|
150
161
|
}
|
|
151
|
-
} else t === "sibling" ? h = (
|
|
152
|
-
h instanceof HTMLElement ? (
|
|
162
|
+
} else t === "sibling" ? h = (l = this.parentElement) == null ? void 0 : l.querySelector("[popover-target]") : h = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
163
|
+
h instanceof HTMLElement ? (i(this, r, h), e(this, r).addEventListener(
|
|
153
164
|
"popoverTriggered",
|
|
154
|
-
e(this,
|
|
155
|
-
), e(this,
|
|
165
|
+
e(this, _)
|
|
166
|
+
), e(this, r).addEventListener(
|
|
156
167
|
"popoverOpened",
|
|
157
|
-
e(this,
|
|
158
|
-
), e(this,
|
|
168
|
+
e(this, x)
|
|
169
|
+
), e(this, r).addEventListener(
|
|
159
170
|
"popoverClosing",
|
|
160
|
-
e(this,
|
|
161
|
-
), e(this,
|
|
171
|
+
e(this, A)
|
|
172
|
+
), e(this, r).addEventListener(
|
|
162
173
|
"popoverClosed",
|
|
163
|
-
e(this,
|
|
174
|
+
e(this, H)
|
|
164
175
|
)) : console.warn(this, `target ${t} not found`);
|
|
165
176
|
}
|
|
166
177
|
}
|
|
167
178
|
disconnectedCallback() {
|
|
168
|
-
e(this,
|
|
179
|
+
e(this, r) && (e(this, r).removeEventListener(
|
|
169
180
|
"popoverTriggered",
|
|
170
|
-
e(this,
|
|
171
|
-
), e(this,
|
|
181
|
+
e(this, _)
|
|
182
|
+
), e(this, r).removeEventListener(
|
|
172
183
|
"popoverOpened",
|
|
173
|
-
e(this,
|
|
174
|
-
), e(this,
|
|
184
|
+
e(this, x)
|
|
185
|
+
), e(this, r).removeEventListener(
|
|
175
186
|
"popoverClosing",
|
|
176
|
-
e(this,
|
|
177
|
-
), e(this,
|
|
187
|
+
e(this, A)
|
|
188
|
+
), e(this, r).removeEventListener(
|
|
178
189
|
"popoverClosed",
|
|
179
|
-
e(this,
|
|
190
|
+
e(this, H)
|
|
180
191
|
));
|
|
181
192
|
}
|
|
182
193
|
}
|
|
183
|
-
|
|
184
|
-
customElements.get("e-popover-button") || customElements.define("e-popover-button",
|
|
194
|
+
r = new WeakMap(), _ = new WeakMap(), x = new WeakMap(), A = new WeakMap(), H = new WeakMap();
|
|
195
|
+
customElements.get("e-popover-button") || customElements.define("e-popover-button", J);
|
|
185
196
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
197
|
+
J as PopoverButtonElement,
|
|
198
|
+
$ as PopoverElement
|
|
188
199
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var we=Object.defineProperty;var le=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var ue=u=>{throw TypeError(u)};var ce=(u,r,e)=>r in u?we(u,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[r]=e,ae=(u,r)=>{for(var e in r||(r={}))xe.call(r,e)&&ce(u,e,r[e]);if(le)for(var e of le(r))ze.call(r,e)&&ce(u,e,r[e]);return u};var Yt=(u,r,e)=>r.has(u)||ue("Cannot "+e);var t=(u,r,e)=>(Yt(u,r,"read from private field"),e?e.call(u):r.get(u)),s=(u,r,e)=>r.has(u)?ue("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(u):r.set(u,e),h=(u,r,e,i)=>(Yt(u,r,"write to private field"),i?i.call(u,e):r.set(u,e),e),d=(u,r,e)=>(Yt(u,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Le=require("../../Store-CDb6RMce.cjs"),Xt=require("../../browser-CpzFX2xg.cjs"),ke=require("../../easings-GegIwET5.cjs"),te=require("../../events-KVanG9sR.cjs"),Se=require("../../jss-GJLvaNfT.cjs"),Et=require("../../layout-8ryRAMGJ.cjs"),pe=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const ee=require("../../order/index.cjs"),Ie=require("../../Damped-CTsV8tl_.cjs"),qe=require("../../Tweened-C0-UzxN-.cjs"),Gt=require("../../controls/index.cjs"),Jt=require("../../window-resizer/vanilla/index.cjs"),lt=require("../../scroll-entries/index.cjs"),de=require("../../css-unit-parser/index.cjs"),p=require("../../css-property/index.cjs"),De=require("../../device/index.cjs"),Qt=require("../../element-resizer/vanilla/index.cjs"),Te=require("../../gestures-DHLrn6Q8.cjs"),fe=require("../../dom-JBOkFLTh.cjs"),Ae=require("../../function-MthRj-GJ.cjs"),Re=require("../../scroll-segment/index.cjs");var f,Vt,y,ct,R,N;class Me{constructor(r,e,i){s(this,f);s(this,Vt);s(this,y);s(this,ct,0);s(this,R,0);s(this,N,null);h(this,f,r),h(this,Vt,e),h(this,y,i),lt.scrollEntries.register(t(this,f))}get index(){return t(this,Vt)}get size(){return t(this,ct)}get position(){return t(this,R)}destroy(){lt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(r){r?(t(this,f).style.setProperty("--size",r+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=r+"px",t(this,f).style.height=""):(t(this,f).style.height=r+"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,ct,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,R,t(this,y).vertical?Et.getCumulativeOffsetTop(t(this,f)):Et.getCumulativeOffsetLeft(t(this,f))),h(this,R,t(this,R)-t(this,y).contentPosition)}transform(){let r=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,R)+t(this,ct)<t(this,y).currentScrollValue&&(r=t(this,y).distance*-1-t(this,y).gap),lt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,r);const i=t(this,y).currentScrollValue+r,n=t(this,R)-t(this,y).viewportSize-e,c=t(this,R)+t(this,ct)+e,m=pe.clamp(i,n,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(r){t(this,N)!==r&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),r&&t(this,f).classList.add(r),h(this,N,r),te.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,Vt=new WeakMap,y=new WeakMap,ct=new WeakMap,R=new WeakMap,N=new WeakMap;const Oe=Se.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,ut,x,M,O,V,I,j,G,B,K,at,q,C,dt,St,pt,ft,wt,k,mt,Z,D,J,_,Q,gt,bt,X,Y,S,xt,l,Bt,_t,v,b,z,T,tt,A,P,g,zt,et,H,st,yt,Lt,it,F,o,Ot,Pt,Kt,Zt,se,ie,L,kt,me,It,Ht,re,ne,ot,he;class Mt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ut,new p.CSSProperty(this,"--controls",!0));s(this,x,new p.CSSProperty(this,"--axis","y"));s(this,M,new p.CSSProperty(this,"--direction",0));s(this,O,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,V,new p.CSSProperty(this,"--split",!1));s(this,I,new p.CSSProperty(this,"--sectional",!1));s(this,j,new p.CSSProperty(this,"--easing",!1));s(this,G,new p.CSSProperty(this,"--duration",!1));s(this,B,new p.CSSProperty(this,"--auto-size",!1));s(this,K,new p.CSSProperty(this,"--wheel-max-delta",!1));s(this,at,new p.CSSProperty(this,"--drag-inertion",1));s(this,q,new p.CSSProperty(this,"--sections-in-view",1));s(this,C,new p.CSSProperty(this,"--loop",!1));s(this,dt,new p.CSSProperty(this,"--damping",20));s(this,St,new p.CSSProperty(this,"--mass",0));s(this,pt,new p.CSSProperty(this,"--stiffness",0));s(this,ft,new p.CSSProperty(this,"--mouse-drag",!1));s(this,wt,new p.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new p.CSSProperty(this,"--autoplay",0));s(this,mt,new p.CSSProperty(this,"--autoplay-pause-duration",0));s(this,Z,new p.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new p.CSSProperty(this,"--classes",!1));s(this,J,new p.CSSProperty(this,"--current-index-start-offset",0));s(this,_,new p.CSSProperty(this,"--current-index-end-offset",0));s(this,Q,new p.CSSProperty(this,"--focus-delay",0));s(this,gt,new p.CSSProperty(this,"--focus-duration",3e3));s(this,bt,new p.CSSProperty(this,"--disabled",!1));s(this,X,new p.CSSProperty(this,"--hibernated",!1));s(this,Y,null);s(this,S,null);s(this,xt,null);s(this,l,[]);s(this,Bt,0);s(this,_t,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,T,null);s(this,tt,null);s(this,A,null);s(this,P,null);s(this,g,new Le.Store(0));s(this,zt,0);s(this,et,0);s(this,H,!1);s(this,st,!0);s(this,yt,!0);s(this,Lt);s(this,it);s(this,F,new qe.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,Bt,this.vertical?Et.getCumulativeOffsetTop(this):Et.getCumulativeOffsetLeft(this)),h(this,_t,this.vertical?Et.getCumulativeOffsetTop(t(this,S)):Et.getCumulativeOffsetLeft(t(this,S))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,de.cssUnitParser.parse(getComputedStyle(t(this,S)).rowGap)):h(this,z,de.cssUnitParser.parse(getComputedStyle(t(this,S)).columnGap)),t(this,B).current&&t(this,l).length){const n=t(this,q).current,c=(t(this,v)-t(this,z)*(n-1))/n;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,O).current){h(this,b,t(this,v)*t(this,O).current);const n=t(this,b)+t(this,v);this.vertical?(t(this,S).style.width=n+"px",t(this,S).style.height="100%"):(t(this,S).style.height=n+"px",t(this,S).style.width="100%")}else this.vertical?(t(this,S).style.width="100%",t(this,S).style.height="max-content",h(this,b,t(this,S).offsetHeight-t(this,v))):(t(this,S).style.width="max-content",t(this,S).style.height="100%",h(this,b,t(this,S).offsetWidth-t(this,v)));if(!t(this,C).current){const n=getComputedStyle(this),c=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,C).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],c=n.position+n.size-t(this,v),m=t(this,b)-c;h(this,et,n.position+n.size+m)}else h(this,et,t(this,b));if(t(this,I).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,b),{equalize:!0});h(this,H,(this.vertical?t(this,S).offsetHeight:t(this,S).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Zt).call(this):d(this,o,Kt).call(this),t(this,kt).call(this)});s(this,kt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,zt,Math.max(0,e-t(this,b))),t(this,l).length){let i=0;for(let n=0;n<t(this,l).length;n++){const c=t(this,l)[n];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=n)}t(this,g).current=i}else this.vertical?t(this,S).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,S).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;lt.scrollEntries.update(this,t(this,x).current,e)});s(this,It,(e,i)=>{t(this,ut).current&&(d(this,o,re).call(this,Math.sign(i)||1),t(this,Ht).call(this,e,i))});s(this,Ht,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,it)||t(this,F).unlistenAnimationFrame(),!t(this,k).current&&t(this,Q).current&&(clearInterval(t(this,Lt)),h(this,Lt,setTimeout(()=>{const n=d(this,o,he).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,gt).current,easing:ke.easeInOutExpo}})},t(this,Q).current))),!(e.includes("drag")&&!De.device.isMobile&&!t(this,ft).current))if(t(this,I).current&&e!=="drag"){const n=Math.sign(i);t(this,l).length?this.shiftSections(n,{tween:t(this,j).current||t(this,G).current?{easing:t(this,j).current||"easeInOutCubic",duration:t(this,G).current||500}:void 0}):t(this,a).shift(n*t(this,v))}else t(this,a).shift(i)});if(Xt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Oe);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Y,document.createElement("div")),t(this,Y).className="content-wrapper",h(this,S,document.createElement("div")),t(this,S).className="content",h(this,xt,document.createElement("slot")),t(this,S).appendChild(t(this,xt)),t(this,Y).appendChild(t(this,S)),e.appendChild(t(this,Y))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ut)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,O)}get splitCSSProperty(){return t(this,V)}get sectionalCSSProperty(){return t(this,I)}get easingCSSProperty(){return t(this,j)}get durationCSSProperty(){return t(this,G)}get autoSizeCSSProperty(){return t(this,B)}get wheelMaxDeltaCSSProperty(){return t(this,K)}get dragInertionCSSProperty(){return t(this,at)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,dt)}get massCSSProperty(){return t(this,St)}get stiffnessCSSProperty(){return t(this,pt)}get mouseDragCSSProperty(){return t(this,ft)}get sectionDistanceScaleCSSProperty(){return t(this,wt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,mt)}get autoplayUserDirectionCSSProperty(){return t(this,Z)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,J)}get currentIndexEndOffsetCSSProperty(){return t(this,_)}get focusDelayCSSProperty(){return t(this,Q)}get focusDurationCSSProperty(){return t(this,gt)}get disabledCSSProperty(){return t(this,bt)}get hibernatedCSSProperty(){return t(this,X)}get currentScrollValue(){return d(this,o,ne).call(this,"current")}get targetScrollValue(){return d(this,o,ne).call(this,"target")}get contentWrapperElement(){return t(this,Y)}get contentElement(){return t(this,S)}get sections(){return t(this,l)}get position(){return t(this,Bt)}get contentPosition(){return t(this,_t)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,et)}get loopDistance(){return t(this,C).current?t(this,et)+t(this,z):t(this,et)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,zt)}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,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const c=e-n,m=c+i+n*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,g).current;d(this,o,me).call(this,e);const c=t(this,l)[n],m=t(this,l)[t(this,g).current];if(c&&m){let w=0;const Ct=d(this,o,he).call(this),Ee=Ct?this.targetScrollValue-Ct.position:0;t(this,C).current?t(this,g).current===0&&n===t(this,l).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,l).length-1&&n===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-Ee,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){d(this,o,re).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,it)||(t(this,F).set(t(this,a).current,{equalize:!0}),t(this,F).set(e,ae({},i.tween)),h(this,it,setTimeout(()=>{h(this,it,void 0)},i.tween.duration))):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(){lt.scrollEntries.register(this),h(this,a,new Ie.Damped(0,{damping:.01,min:0,order:ee.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,T,new Gt.WheelControls({element:t(this,S)})),t(this,T).changeEvent.subscribe(t(this,It)),h(this,tt,new Gt.KeyboardControls({element:this})),t(this,tt).changeEvent.subscribe(t(this,It)),h(this,A,new Gt.DragControls({element:t(this,S)})),t(this,A).changeEvent.subscribe(t(this,It)),h(this,P,new Gt.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,Ht)),t(this,x).subscribe(({current:e})=>{t(this,S).style.flexDirection=e==="x"?"row":"column",t(this,T).axis=t(this,K).current?"max":e,t(this,tt).dimension=e==="x"?"width":"height",t(this,A).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,K).subscribe(e=>{t(this,T).axis=e.current?"max":t(this,x).current}),t(this,at).subscribe(e=>{t(this,A).inertion=typeof e.current=="number"?e.current:1}),t(this,O).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,V).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Ot).call(this):d(this,o,Pt).call(this))}),t(this,I).subscribe(e=>{t(this,T).debounce=e.current,t(this,A).swipe=e.current,t(this,P).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Ot).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,B).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Ot).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,ot).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,V).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,zt,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,dt).subscribe(e=>{t(this,a).damping=e.current}),t(this,St).subscribe(e=>{t(this,a).mass=e.current}),t(this,pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,P).speed=e.current,!t(this,st)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,Z).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,D).subscribe(e=>{this.isConnected&&d(this,o,ot).call(this)}),t(this,J).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,ot).call(this)}),t(this,_).subscribe(e=>{this.isConnected&&t(this,D).current&&d(this,o,ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&d(this,o,ot).call(this)}),t(this,F).subscribe(e=>{t(this,F).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,bt).subscribe(e=>{e.current&&!e.previous?d(this,o,Kt).call(this):!e.current&&e.previous&&d(this,o,Zt).call(this)}),t(this,X).subscribe(e=>{e.current&&!e.previous?d(this,o,se).call(this):!e.current&&e.previous&&d(this,o,ie).call(this)}),t(this,ut).observe(),t(this,x).observe(),t(this,M).observe(),t(this,O).observe(),t(this,V).observe(),t(this,I).observe(),t(this,j).observe(),t(this,G).observe(),t(this,B).observe(),t(this,K).observe(),t(this,at).observe(),t(this,q).observe(),t(this,C).observe(),t(this,dt).observe(),t(this,St).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,wt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,mt).observe(),t(this,Z).observe(),t(this,D).observe(),t(this,J).observe(),t(this,_).observe(),t(this,Q).observe(),t(this,gt).observe(),t(this,bt).observe(),t(this,X).observe(),t(this,X).current||d(this,o,ie).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,ut).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,V).unobserve(),t(this,I).unobserve(),t(this,j).unobserve(),t(this,G).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,at).unobserve(),t(this,q).unobserve(),t(this,C).unobserve(),t(this,dt).unobserve(),t(this,St).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,wt).unobserve(),t(this,k).unobserve(),t(this,mt).unobserve(),t(this,Z).unobserve(),t(this,D).unobserve(),t(this,J).unobserve(),t(this,_).unobserve(),t(this,Q).unobserve(),t(this,gt).unobserve(),t(this,bt).unobserve(),t(this,X).unobserve(),d(this,o,se).call(this)}}a=new WeakMap,ut=new WeakMap,x=new WeakMap,M=new WeakMap,O=new WeakMap,V=new WeakMap,I=new WeakMap,j=new WeakMap,G=new WeakMap,B=new WeakMap,K=new WeakMap,at=new WeakMap,q=new WeakMap,C=new WeakMap,dt=new WeakMap,St=new WeakMap,pt=new WeakMap,ft=new WeakMap,wt=new WeakMap,k=new WeakMap,mt=new WeakMap,Z=new WeakMap,D=new WeakMap,J=new WeakMap,_=new WeakMap,Q=new WeakMap,gt=new WeakMap,bt=new WeakMap,X=new WeakMap,Y=new WeakMap,S=new WeakMap,xt=new WeakMap,l=new WeakMap,Bt=new WeakMap,_t=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,T=new WeakMap,tt=new WeakMap,A=new WeakMap,P=new WeakMap,g=new WeakMap,zt=new WeakMap,et=new WeakMap,H=new WeakMap,st=new WeakMap,yt=new WeakMap,Lt=new WeakMap,it=new WeakMap,F=new WeakMap,o=new WeakSet,Ot=function(){d(this,o,Pt).call(this),t(this,xt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Me(e,i,this))}),t(this,S).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,ot).call(this)},Pt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,g).reset(),t(this,a).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Kt=function(){t(this,st)||(h(this,st,!0),t(this,a).unsubscribe(t(this,kt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Lt)),clearInterval(t(this,it)),t(this,F).unlistenAnimationFrame(),t(this,T).disconnect(),t(this,tt).disconnect(),t(this,A).disconnect(),t(this,P).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Zt=function(){t(this,st)&&(h(this,st,!1),t(this,a).subscribe(t(this,kt)),t(this,T).connect(),t(this,tt).connect(),t(this,A).connect(),t(this,k).current&&t(this,P).connect())},se=function(){t(this,yt)||(h(this,yt,!0),Jt.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),d(this,o,Kt).call(this),t(this,S).style.transform="",t(this,l).length?d(this,o,Pt).call(this):(t(this,g).reset(),t(this,a).reset()),lt.scrollEntries.unregister(this))},ie=function(){t(this,yt)&&(h(this,yt,!1),lt.scrollEntries.register(this),(t(this,C).current||t(this,V).current||t(this,C).current||t(this,B).current||t(this,I).current)&&d(this,o,Ot).call(this),d(this,o,Zt).call(this),Jt.windowResizer.subscribe(t(this,L),ee.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,kt=new WeakMap,me=function(e){t(this,C).current?(t(this,g).current=e%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=pe.clamp(e,0,this.limit)},It=new WeakMap,Ht=new WeakMap,re=function(e=1){t(this,Z).current&&(t(this,P).direction=e),t(this,k).current&&t(this,P).pauseAndContinue(t(this,mt).current,this.sectionalCSSProperty.current)},ne=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},ot=function(){if(t(this,D).current&&t(this,l).length){const e=t(this,g).current+t(this,J).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,_).current;t(this,l).forEach((n,c)=>{const m=e-this.limit-1+t(this,_).current,w=e+i,Ct=this.sections.length-w;c>=e&&c<w||c<=m?n.mark("current"):c>=w&&c<w+Ct/2||c<=m+i?n.mark("next"):n.mark("previous")})}},he=function(e=this.targetScrollValue){let i=null,n=1/0;for(let c=0;c<t(this,l).length;c++){const m=Math.abs(t(this,l)[c].position-e);m<n&&(n=m,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Mt);var Ft;class oe extends HTMLElement{constructor(){super(...arguments);s(this,Ft,null)}get scrollElement(){return t(this,Ft)}connectedCallback(){const e=fe.findParentElement(this,Mt);e instanceof Mt?h(this,Ft,e):console.error(this,"e-scroll not found")}}Ft=new WeakMap;var rt,E,W,U,qt,Dt,vt,Wt,Ut,$t;class ge extends oe{constructor(){super();s(this,rt,null);s(this,E,null);s(this,W,!1);s(this,U,0);s(this,qt,0);s(this,Dt,0);s(this,vt,()=>{h(this,W,this.offsetWidth>this.offsetHeight);const e=t(this,W)?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,W)?(t(this,E).style.width=t(this,U)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,U)+"px"),h(this,qt,e-t(this,U)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Wt,()=>{h(this,Dt,this.scrollElement.currentProgress*t(this,qt)),t(this,W)?t(this,E).style.transform=`translate3d(${t(this,Dt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,Dt)}px, 0px)`});s(this,Ut,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,$t,e=>{document.documentElement.classList.add("grabbing"),Te.setupDrag(c=>{const m=t(this,W)?c.x:c.y,w=this.scrollElement.distance/t(this,qt),Ct=(m-n)*w;this.scrollElement.setPosition(i+Ct)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,W)?e.x:e.y});if(Xt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Se.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,rt,document.createElement("slot")),t(this,rt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,rt))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,rt).assignedElements()[0]||t(this,rt).firstElementChild;h(this,E,e),t(this,E).addEventListener("pointerdown",t(this,$t)),Jt.windowResizer.subscribe(t(this,vt),ee.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,vt)),this.scrollElement.onScroll(t(this,Wt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Ut))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,E).removeEventListener("pointerdown",t(this,$t)),Jt.windowResizer.unsubscribe(t(this,vt)),Qt.elementResizer.unsubscribe(t(this,vt)),this.scrollElement.offScroll(t(this,Wt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Ut))}}rt=new WeakMap,E=new WeakMap,W=new WeakMap,U=new WeakMap,qt=new WeakMap,Dt=new WeakMap,vt=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,$t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ge);class be extends oe{constructor(){super(),Xt.isBrowser&&this.addEventListener("click",()=>{const r=this.getAttribute("behaviour"),e=this.getAttribute("easing")||void 0,i=e?parseFloat(this.getAttribute("duration")||"0"):void 0;this.handleClick({behaviour:r,tween:e?{easing:e,duration:i}:void 0})})}}class ye extends be{handleClick(r){const e=this.getAttribute("index");this.scrollElement.scrollToSection(parseInt(e||"0"),r)}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ye);class ve extends be{handleClick(r){const e=this.getAttribute("step");this.scrollElement.shiftSections(parseInt(e||"1"),r)}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ve);var $,nt,Tt,Nt,jt,At;class Ve{constructor(r,e,i){s(this,$,null);s(this,nt,null);s(this,Tt,null);s(this,Nt,null);s(this,jt,()=>{t(this,nt).scrollToSection(t(this,Tt),{behaviour:t(this,Nt)})});s(this,At,()=>{t(this,$).classList.toggle("current",t(this,nt).counter.current===t(this,Tt))});Xt.isBrowser&&(h(this,$,document.createElement("button")),h(this,nt,r),h(this,Nt,i),h(this,Tt,e),t(this,$).addEventListener("click",t(this,jt)),t(this,nt).counter.subscribe(t(this,At)),t(this,At).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,jt)),t(this,nt).counter.unsubscribe(t(this,At)),t(this,$).remove()}}$=new WeakMap,nt=new WeakMap,Tt=new WeakMap,Nt=new WeakMap,jt=new WeakMap,At=new WeakMap;var ht,Rt;class Ce extends oe{constructor(){super(...arguments);s(this,ht,[]);s(this,Rt,Ae.debounce(()=>{t(this,ht).forEach(e=>e.destroy()),h(this,ht,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ve(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ht).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Rt)),t(this,Rt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Rt)),t(this,ht).forEach(e=>e.destroy()),h(this,ht,[])}}ht=new WeakMap,Rt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Ce);class Pe extends Re.ScrollSegmentElement{connectedCallback(){const r=fe.findParentElement(this,Mt);r instanceof Mt?(this.scrollContainer=r,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Pe);exports.ScrollBulletButtonsElement=Ce;exports.ScrollElement=Mt;exports.ScrollSegmentElement=Pe;exports.ScrollSetButtonElement=ye;exports.ScrollStepButtonElement=ve;exports.ScrollbarElement=ge;
|
|
1
|
+
"use strict";var xe=Object.defineProperty;var ce=Object.getOwnPropertySymbols;var ze=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var ae=u=>{throw TypeError(u)};var ue=(u,r,e)=>r in u?xe(u,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[r]=e,de=(u,r)=>{for(var e in r||(r={}))ze.call(r,e)&&ue(u,e,r[e]);if(ce)for(var e of ce(r))Le.call(r,e)&&ue(u,e,r[e]);return u};var te=(u,r,e)=>r.has(u)||ae("Cannot "+e);var t=(u,r,e)=>(te(u,r,"read from private field"),e?e.call(u):r.get(u)),s=(u,r,e)=>r.has(u)?ae("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(u):r.set(u,e),h=(u,r,e,i)=>(te(u,r,"write to private field"),i?i.call(u,e):r.set(u,e),e),d=(u,r,e)=>(te(u,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("../../Store-CDb6RMce.cjs"),Yt=require("../../browser-CpzFX2xg.cjs"),Ie=require("../../easings-GegIwET5.cjs"),ee=require("../../events-KVanG9sR.cjs"),pe=require("../../jss-GJLvaNfT.cjs"),Et=require("../../layout-8ryRAMGJ.cjs"),fe=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const se=require("../../order/index.cjs"),Te=require("../../Damped-CTsV8tl_.cjs"),qe=require("../../Tweened-C0-UzxN-.cjs"),Kt=require("../../controls/index.cjs"),Qt=require("../../window-resizer/vanilla/index.cjs"),lt=require("../../scroll-entries/index.cjs"),Se=require("../../css-unit-parser/index.cjs"),p=require("../../css-property/index.cjs"),De=require("../../device/index.cjs"),Xt=require("../../element-resizer/vanilla/index.cjs"),Ae=require("../../gestures-DHLrn6Q8.cjs"),ge=require("../../dom-JBOkFLTh.cjs"),Re=require("../../function-MthRj-GJ.cjs"),Me=require("../../scroll-segment/index.cjs");var f,Vt,y,ct,R,N;class Oe{constructor(r,e,i){s(this,f);s(this,Vt);s(this,y);s(this,ct,0);s(this,R,0);s(this,N,null);h(this,f,r),h(this,Vt,e),h(this,y,i),lt.scrollEntries.register(t(this,f))}get index(){return t(this,Vt)}get size(){return t(this,ct)}get position(){return t(this,R)}destroy(){lt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null)}setSize(r){r?(t(this,f).style.setProperty("--size",r+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=r+"px",t(this,f).style.height=""):(t(this,f).style.height=r+"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,ct,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,R,t(this,y).vertical?Et.getCumulativeOffsetTop(t(this,f)):Et.getCumulativeOffsetLeft(t(this,f))),h(this,R,t(this,R)-t(this,y).contentPosition)}transform(){let r=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,R)+t(this,ct)<t(this,y).currentScrollValue&&(r=t(this,y).distance*-1-t(this,y).gap),lt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,r);const i=t(this,y).currentScrollValue+r,n=t(this,R)-t(this,y).viewportSize-e,c=t(this,R)+t(this,ct)+e,g=fe.clamp(i,n,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(r){t(this,N)!==r&&(t(this,N)&&t(this,f).classList.remove(t(this,N)),r&&t(this,f).classList.add(r),h(this,N,r),ee.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,N)},custom:!0}))}}f=new WeakMap,Vt=new WeakMap,y=new WeakMap,ct=new WeakMap,R=new WeakMap,N=new WeakMap;const Ve=pe.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,ut,x,M,O,V,I,G,j,B,K,at,T,C,dt,St,pt,ft,wt,k,gt,Z,q,J,_,Q,mt,bt,X,Y,S,xt,l,Bt,_t,v,b,z,D,tt,A,P,m,zt,et,H,st,yt,Lt,it,F,Ht,o,Ot,Pt,Zt,Jt,ie,re,L,kt,me,It,Ft,ne,he,ot,oe;class Mt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,ut,new p.CSSProperty(this,"--controls",!0));s(this,x,new p.CSSProperty(this,"--axis","y"));s(this,M,new p.CSSProperty(this,"--direction",0));s(this,O,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,V,new p.CSSProperty(this,"--split",!1));s(this,I,new p.CSSProperty(this,"--sectional",!1));s(this,G,new p.CSSProperty(this,"--easing",!1));s(this,j,new p.CSSProperty(this,"--duration",!1));s(this,B,new p.CSSProperty(this,"--auto-size",!1));s(this,K,new p.CSSProperty(this,"--wheel-max-delta",!1));s(this,at,new p.CSSProperty(this,"--drag-inertion",1));s(this,T,new p.CSSProperty(this,"--sections-in-view",1));s(this,C,new p.CSSProperty(this,"--loop",!1));s(this,dt,new p.CSSProperty(this,"--damping",20));s(this,St,new p.CSSProperty(this,"--mass",0));s(this,pt,new p.CSSProperty(this,"--stiffness",0));s(this,ft,new p.CSSProperty(this,"--mouse-drag",!1));s(this,wt,new p.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new p.CSSProperty(this,"--autoplay",0));s(this,gt,new p.CSSProperty(this,"--autoplay-pause-duration",0));s(this,Z,new p.CSSProperty(this,"--autoplay-user-direction",!1));s(this,q,new p.CSSProperty(this,"--classes",!1));s(this,J,new p.CSSProperty(this,"--current-index-start-offset",0));s(this,_,new p.CSSProperty(this,"--current-index-end-offset",0));s(this,Q,new p.CSSProperty(this,"--focus-delay",0));s(this,mt,new p.CSSProperty(this,"--focus-duration",3e3));s(this,bt,new p.CSSProperty(this,"--disabled",!1));s(this,X,new p.CSSProperty(this,"--hibernated",!1));s(this,Y,null);s(this,S,null);s(this,xt,null);s(this,l,[]);s(this,Bt,0);s(this,_t,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,D,null);s(this,tt,null);s(this,A,null);s(this,P,null);s(this,m,new ke.Store(0));s(this,zt,0);s(this,et,0);s(this,H,!1);s(this,st,!0);s(this,yt,!0);s(this,Lt);s(this,it);s(this,F,new qe.Tweened);s(this,Ht,!1);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,m).current;if(h(this,Bt,this.vertical?Et.getCumulativeOffsetTop(this):Et.getCumulativeOffsetLeft(this)),h(this,_t,this.vertical?Et.getCumulativeOffsetTop(t(this,S)):Et.getCumulativeOffsetLeft(t(this,S))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).rowGap)):h(this,z,Se.cssUnitParser.parse(getComputedStyle(t(this,S)).columnGap)),t(this,B).current&&t(this,l).length){const n=t(this,T).current,c=(t(this,v)-t(this,z)*(n-1))/n;t(this,l).forEach(g=>{g.setSize(c)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,O).current){h(this,b,t(this,v)*t(this,O).current);const n=t(this,b)+t(this,v);this.vertical?(t(this,S).style.width=n+"px",t(this,S).style.height="100%"):(t(this,S).style.height=n+"px",t(this,S).style.width="100%")}else this.vertical?(t(this,S).style.width="100%",t(this,S).style.height="max-content",h(this,b,t(this,S).offsetHeight-t(this,v))):(t(this,S).style.width="max-content",t(this,S).style.height="100%",h(this,b,t(this,S).offsetWidth-t(this,v)));if(!t(this,C).current){const n=getComputedStyle(this),c=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,C).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],c=n.position+n.size-t(this,v),g=t(this,b)-c;h(this,et,n.position+n.size+g)}else h(this,et,t(this,b));if(t(this,I).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,b),{equalize:!0});h(this,H,(this.vertical?t(this,S).offsetHeight:t(this,S).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,H)),t(this,H)?d(this,o,Jt).call(this):d(this,o,Zt).call(this),t(this,kt).call(this)});s(this,kt,()=>{if(!t(this,H))return;const e=this.currentScrollValue;if(h(this,zt,Math.max(0,e-t(this,b))),t(this,l).length){let i=0;for(let n=0;n<t(this,l).length;n++){const c=t(this,l)[n];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=n)}t(this,m).current=i,console.log(t(this,m).current)}else this.vertical?t(this,S).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,S).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;lt.scrollEntries.update(this,t(this,x).current,e)});s(this,It,(e,i)=>{t(this,ut).current&&(d(this,o,ne).call(this,Math.sign(i)||1),t(this,Ft).call(this,e,i))});s(this,Ft,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,it)||t(this,F).unlistenAnimationFrame(),!t(this,k).current&&t(this,Q).current&&(clearInterval(t(this,Lt)),h(this,Lt,setTimeout(()=>{const n=d(this,o,oe).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,mt).current,easing:Ie.easeInOutExpo}})},t(this,Q).current))),!(e.includes("drag")&&!De.device.isMobile&&!t(this,ft).current)){if(t(this,I).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const c={tween:t(this,G).current||t(this,j).current?{easing:t(this,G).current||"easeInOutCubic",duration:t(this,j).current||500}:void 0};t(this,Ht)?this.scrollToSection(t(this,m).current,c):this.shiftSections(n,c)}else t(this,a).shift(n*t(this,v))}else t(this,a).shift(i);h(this,Ht,e==="drag")}});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Ve);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Y,document.createElement("div")),t(this,Y).className="content-wrapper",h(this,S,document.createElement("div")),t(this,S).className="content",h(this,xt,document.createElement("slot")),t(this,S).appendChild(t(this,xt)),t(this,Y).appendChild(t(this,S)),e.appendChild(t(this,Y))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,ut)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,O)}get splitCSSProperty(){return t(this,V)}get sectionalCSSProperty(){return t(this,I)}get easingCSSProperty(){return t(this,G)}get durationCSSProperty(){return t(this,j)}get autoSizeCSSProperty(){return t(this,B)}get wheelMaxDeltaCSSProperty(){return t(this,K)}get dragInertionCSSProperty(){return t(this,at)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,dt)}get massCSSProperty(){return t(this,St)}get stiffnessCSSProperty(){return t(this,pt)}get mouseDragCSSProperty(){return t(this,ft)}get sectionDistanceScaleCSSProperty(){return t(this,wt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,gt)}get autoplayUserDirectionCSSProperty(){return t(this,Z)}get classesCSSProperty(){return t(this,q)}get currentIndexStartOffsetCSSProperty(){return t(this,J)}get currentIndexEndOffsetCSSProperty(){return t(this,_)}get focusDelayCSSProperty(){return t(this,Q)}get focusDurationCSSProperty(){return t(this,mt)}get disabledCSSProperty(){return t(this,bt)}get hibernatedCSSProperty(){return t(this,X)}get currentScrollValue(){return d(this,o,he).call(this,"current")}get targetScrollValue(){return d(this,o,he).call(this,"target")}get contentWrapperElement(){return t(this,Y)}get contentElement(){return t(this,S)}get sections(){return t(this,l)}get position(){return t(this,Bt)}get contentPosition(){return t(this,_t)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,m)}get limit(){return t(this,l).length-t(this,T).current}get distance(){return t(this,et)}get loopDistance(){return t(this,C).current?t(this,et)+t(this,z):t(this,et)}get hasOverflow(){return t(this,H)}get overscroll(){return t(this,zt)}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,n=0){const c=e-n,g=c+i+n*2;return this.currentProgress<c?0:this.currentProgress>g?1:(this.currentProgress-c)/(g-c)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const c=e-n,g=c+i+n*2;return this.currentProgress>=c&&this.currentProgress<=g}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,m).current;d(this,o,me).call(this,e);const c=t(this,l)[n],g=t(this,l)[t(this,m).current];if(c&&g){let w=0;const Ct=d(this,o,oe).call(this),we=Ct?this.targetScrollValue-Ct.position:0;t(this,C).current?t(this,m).current===0&&n===t(this,l).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,m).current===t(this,l).length-1&&n===0?w=g.position-(t(this,b)+t(this,v)+t(this,z)):w=g.position-c.position:w=g.position-c.position,this.shiftPosition(w-we,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,m).current+e,i)}setPosition(e,i){d(this,o,ne).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,it)||(t(this,F).set(t(this,a).current,{equalize:!0}),t(this,F).set(e,de({},i.tween)),h(this,it,setTimeout(()=>{h(this,it,void 0)},i.tween.duration))):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(){lt.scrollEntries.register(this),h(this,a,new Te.Damped(0,{damping:.01,min:0,order:se.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new Kt.WheelControls({element:t(this,S)})),t(this,D).changeEvent.subscribe(t(this,It)),h(this,tt,new Kt.KeyboardControls({element:this})),t(this,tt).changeEvent.subscribe(t(this,It)),h(this,A,new Kt.DragControls({element:t(this,S)})),t(this,A).changeEvent.subscribe(t(this,It)),h(this,P,new Kt.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,Ft)),t(this,x).subscribe(({current:e})=>{t(this,S).style.flexDirection=e==="x"?"row":"column",t(this,D).axis=t(this,K).current?"max":e,t(this,tt).dimension=e==="x"?"width":"height",t(this,A).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,K).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,at).subscribe(e=>{t(this,A).inertion=typeof e.current=="number"?e.current:1}),t(this,O).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,V).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,Ot).call(this):d(this,o,Pt).call(this))}),t(this,I).subscribe(e=>{t(this,D).debounce=e.current,t(this,A).swipe=e.current,t(this,P).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,Ot).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,B).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,Ot).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,Pt).call(this))}),t(this,T).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,ot).call(this))}),t(this,C).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,V).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,zt,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,dt).subscribe(e=>{t(this,a).damping=e.current}),t(this,St).subscribe(e=>{t(this,a).mass=e.current}),t(this,pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,k).subscribe(e=>{t(this,P).speed=e.current,!t(this,st)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,Z).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,q).subscribe(e=>{this.isConnected&&d(this,o,ot).call(this)}),t(this,J).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,ot).call(this)}),t(this,_).subscribe(e=>{this.isConnected&&t(this,q).current&&d(this,o,ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,m).subscribe(e=>{t(this,l).length&&d(this,o,ot).call(this)}),t(this,F).subscribe(e=>{t(this,F).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,bt).subscribe(e=>{e.current&&!e.previous?d(this,o,Zt).call(this):!e.current&&e.previous&&d(this,o,Jt).call(this)}),t(this,X).subscribe(e=>{e.current&&!e.previous?d(this,o,ie).call(this):!e.current&&e.previous&&d(this,o,re).call(this)}),t(this,ut).observe(),t(this,x).observe(),t(this,M).observe(),t(this,O).observe(),t(this,V).observe(),t(this,I).observe(),t(this,G).observe(),t(this,j).observe(),t(this,B).observe(),t(this,K).observe(),t(this,at).observe(),t(this,T).observe(),t(this,C).observe(),t(this,dt).observe(),t(this,St).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,wt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,gt).observe(),t(this,Z).observe(),t(this,q).observe(),t(this,J).observe(),t(this,_).observe(),t(this,Q).observe(),t(this,mt).observe(),t(this,bt).observe(),t(this,X).observe(),t(this,X).current||d(this,o,re).call(this)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("has-overflow"),t(this,ut).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,O).unobserve(),t(this,V).unobserve(),t(this,I).unobserve(),t(this,G).unobserve(),t(this,j).unobserve(),t(this,B).unobserve(),t(this,K).unobserve(),t(this,at).unobserve(),t(this,T).unobserve(),t(this,C).unobserve(),t(this,dt).unobserve(),t(this,St).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,wt).unobserve(),t(this,k).unobserve(),t(this,gt).unobserve(),t(this,Z).unobserve(),t(this,q).unobserve(),t(this,J).unobserve(),t(this,_).unobserve(),t(this,Q).unobserve(),t(this,mt).unobserve(),t(this,bt).unobserve(),t(this,X).unobserve(),d(this,o,ie).call(this)}}a=new WeakMap,ut=new WeakMap,x=new WeakMap,M=new WeakMap,O=new WeakMap,V=new WeakMap,I=new WeakMap,G=new WeakMap,j=new WeakMap,B=new WeakMap,K=new WeakMap,at=new WeakMap,T=new WeakMap,C=new WeakMap,dt=new WeakMap,St=new WeakMap,pt=new WeakMap,ft=new WeakMap,wt=new WeakMap,k=new WeakMap,gt=new WeakMap,Z=new WeakMap,q=new WeakMap,J=new WeakMap,_=new WeakMap,Q=new WeakMap,mt=new WeakMap,bt=new WeakMap,X=new WeakMap,Y=new WeakMap,S=new WeakMap,xt=new WeakMap,l=new WeakMap,Bt=new WeakMap,_t=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,D=new WeakMap,tt=new WeakMap,A=new WeakMap,P=new WeakMap,m=new WeakMap,zt=new WeakMap,et=new WeakMap,H=new WeakMap,st=new WeakMap,yt=new WeakMap,Lt=new WeakMap,it=new WeakMap,F=new WeakMap,Ht=new WeakMap,o=new WeakSet,Ot=function(){d(this,o,Pt).call(this),t(this,xt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Oe(e,i,this))}),t(this,S).style.transform="",ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,ot).call(this)},Pt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,m).reset(),t(this,a).reset(),ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,st)||(h(this,st,!0),t(this,a).unsubscribe(t(this,kt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Lt)),clearInterval(t(this,it)),t(this,F).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,tt).disconnect(),t(this,A).disconnect(),t(this,P).disconnect(),t(this,H)||this.sections.forEach(e=>{e.unsetTransform()}))},Jt=function(){t(this,st)&&(h(this,st,!1),t(this,a).subscribe(t(this,kt)),t(this,D).connect(),t(this,tt).connect(),t(this,A).connect(),t(this,k).current&&t(this,P).connect())},ie=function(){t(this,yt)||(h(this,yt,!0),Qt.windowResizer.unsubscribe(t(this,L)),Xt.elementResizer.unsubscribe(t(this,L)),d(this,o,Zt).call(this),t(this,S).style.transform="",t(this,l).length?d(this,o,Pt).call(this):(t(this,m).reset(),t(this,a).reset()),lt.scrollEntries.unregister(this))},re=function(){t(this,yt)&&(h(this,yt,!1),lt.scrollEntries.register(this),(t(this,C).current||t(this,V).current||t(this,C).current||t(this,B).current||t(this,I).current)&&d(this,o,Ot).call(this),d(this,o,Jt).call(this),Qt.windowResizer.subscribe(t(this,L),se.RESIZE_ORDER.SCROLL),Xt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,kt=new WeakMap,me=function(e){t(this,C).current?(t(this,m).current=e%t(this,l).length,t(this,m).current=t(this,m).current<0?t(this,l).length+t(this,m).current:t(this,m).current):t(this,m).current=fe.clamp(e,0,this.limit)},It=new WeakMap,Ft=new WeakMap,ne=function(e=1){t(this,Z).current&&(t(this,P).direction=e),t(this,k).current&&t(this,P).pauseAndContinue(t(this,gt).current,this.sectionalCSSProperty.current)},he=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},ot=function(){if(t(this,q).current&&t(this,l).length){const e=t(this,m).current+t(this,J).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,T).current+t(this,_).current;t(this,l).forEach((n,c)=>{const g=e-this.limit-1+t(this,_).current,w=e+i,Ct=this.sections.length-w;c>=e&&c<w||c<=g?n.mark("current"):c>=w&&c<w+Ct/2||c<=g+i?n.mark("next"):n.mark("previous")})}},oe=function(e=this.targetScrollValue){let i=null,n=1/0;for(let c=0;c<t(this,l).length;c++){const g=Math.abs(t(this,l)[c].position-e);g<n&&(n=g,i=c)}return i!==null?t(this,l)[i]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Mt);var Wt;class le extends HTMLElement{constructor(){super(...arguments);s(this,Wt,null)}get scrollElement(){return t(this,Wt)}connectedCallback(){const e=ge.findParentElement(this,Mt);e instanceof Mt?h(this,Wt,e):console.error(this,"e-scroll not found")}}Wt=new WeakMap;var rt,E,W,U,Tt,qt,vt,Ut,$t,Nt;class be extends le{constructor(){super();s(this,rt,null);s(this,E,null);s(this,W,!1);s(this,U,0);s(this,Tt,0);s(this,qt,0);s(this,vt,()=>{h(this,W,this.offsetWidth>this.offsetHeight);const e=t(this,W)?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,W)?(t(this,E).style.width=t(this,U)+"px",t(this,E).style.height="100%"):(t(this,E).style.width="100%",t(this,E).style.height=t(this,U)+"px"),h(this,Tt,e-t(this,U)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Ut,()=>{h(this,qt,this.scrollElement.currentProgress*t(this,Tt)),t(this,W)?t(this,E).style.transform=`translate3d(${t(this,qt)}px, 0px, 0px)`:t(this,E).style.transform=`translate3d(0px, ${t(this,qt)}px, 0px)`});s(this,$t,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Nt,e=>{document.documentElement.classList.add("grabbing"),Ae.setupDrag(c=>{const g=t(this,W)?c.x:c.y,w=this.scrollElement.distance/t(this,Tt),Ct=(g-n)*w;this.scrollElement.setPosition(i+Ct)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,W)?e.x:e.y});if(Yt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(pe.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,rt,document.createElement("slot")),t(this,rt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,rt))}}get thumbElement(){return t(this,E)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,rt).assignedElements()[0]||t(this,rt).firstElementChild;h(this,E,e),t(this,E).addEventListener("pointerdown",t(this,Nt)),Qt.windowResizer.subscribe(t(this,vt),se.RESIZE_ORDER.SCROLL),Xt.elementResizer.subscribe(this,t(this,vt)),this.scrollElement.onScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.subscribe(t(this,$t))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,E).removeEventListener("pointerdown",t(this,Nt)),Qt.windowResizer.unsubscribe(t(this,vt)),Xt.elementResizer.unsubscribe(t(this,vt)),this.scrollElement.offScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,$t))}}rt=new WeakMap,E=new WeakMap,W=new WeakMap,U=new WeakMap,Tt=new WeakMap,qt=new WeakMap,vt=new WeakMap,Ut=new WeakMap,$t=new WeakMap,Nt=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",be);class ye extends le{constructor(){super(),Yt.isBrowser&&this.addEventListener("click",()=>{const r=this.getAttribute("behaviour"),e=this.getAttribute("easing")||void 0,i=e?parseFloat(this.getAttribute("duration")||"0"):void 0;this.handleClick({behaviour:r,tween:e?{easing:e,duration:i}:void 0})})}}class ve extends ye{handleClick(r){const e=this.getAttribute("index");this.scrollElement.scrollToSection(parseInt(e||"0"),r)}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",ve);class Ce extends ye{handleClick(r){const e=this.getAttribute("step");this.scrollElement.shiftSections(parseInt(e||"1"),r)}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Ce);var $,nt,Dt,Gt,jt,At;class Be{constructor(r,e,i){s(this,$,null);s(this,nt,null);s(this,Dt,null);s(this,Gt,null);s(this,jt,()=>{t(this,nt).scrollToSection(t(this,Dt),{behaviour:t(this,Gt)})});s(this,At,()=>{t(this,$).classList.toggle("current",t(this,nt).counter.current===t(this,Dt))});Yt.isBrowser&&(h(this,$,document.createElement("button")),h(this,nt,r),h(this,Gt,i),h(this,Dt,e),t(this,$).addEventListener("click",t(this,jt)),t(this,nt).counter.subscribe(t(this,At)),t(this,At).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,jt)),t(this,nt).counter.unsubscribe(t(this,At)),t(this,$).remove()}}$=new WeakMap,nt=new WeakMap,Dt=new WeakMap,Gt=new WeakMap,jt=new WeakMap,At=new WeakMap;var ht,Rt;class Pe extends le{constructor(){super(...arguments);s(this,ht,[]);s(this,Rt,Re.debounce(()=>{t(this,ht).forEach(e=>e.destroy()),h(this,ht,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Be(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,ht).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Rt)),t(this,Rt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Rt)),t(this,ht).forEach(e=>e.destroy()),h(this,ht,[])}}ht=new WeakMap,Rt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Pe);class Ee extends Me.ScrollSegmentElement{connectedCallback(){const r=ge.findParentElement(this,Mt);r instanceof Mt?(this.scrollContainer=r,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",Ee);exports.ScrollBulletButtonsElement=Pe;exports.ScrollElement=Mt;exports.ScrollSegmentElement=Ee;exports.ScrollSetButtonElement=ve;exports.ScrollStepButtonElement=Ce;exports.ScrollbarElement=be;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var le = Object.getOwnPropertySymbols;
|
|
3
|
+
var Ce = Object.prototype.hasOwnProperty, Ee = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ae = (a) => {
|
|
5
5
|
throw TypeError(a);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var ce = (a, r, e) => r in a ? ye(a, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[r] = e, ue = (a, r) => {
|
|
8
8
|
for (var e in r || (r = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
9
|
+
Ce.call(r, e) && ce(a, e, r[e]);
|
|
10
|
+
if (le)
|
|
11
|
+
for (var e of le(r))
|
|
12
|
+
Ee.call(r, e) && ce(a, e, r[e]);
|
|
13
13
|
return a;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (a, r, e) => (
|
|
17
|
-
import { S as
|
|
18
|
-
import { i as
|
|
19
|
-
import { q as
|
|
20
|
-
import { d as
|
|
21
|
-
import { c as
|
|
22
|
-
import { a as
|
|
15
|
+
var Xt = (a, r, e) => r.has(a) || ae("Cannot " + e);
|
|
16
|
+
var t = (a, r, e) => (Xt(a, r, "read from private field"), e ? e.call(a) : r.get(a)), s = (a, r, e) => r.has(a) ? ae("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), h = (a, r, e, i) => (Xt(a, r, "write to private field"), i ? i.call(a, e) : r.set(a, e), e), d = (a, r, e) => (Xt(a, r, "access private method"), e);
|
|
17
|
+
import { S as we } from "../../Store-OTdcl6SX.js";
|
|
18
|
+
import { i as Qt } from "../../browser-0zX67oeU.js";
|
|
19
|
+
import { q as xe } from "../../easings-BEmRlrDd.js";
|
|
20
|
+
import { d as Yt } from "../../events-CsVF98U6.js";
|
|
21
|
+
import { c as fe } from "../../jss-CjccJC-K.js";
|
|
22
|
+
import { a as te, g as ee } from "../../layout-HoBT_Da2.js";
|
|
23
23
|
import { c as pe } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
|
-
import { TICK_ORDER as
|
|
26
|
-
import { D as
|
|
27
|
-
import { T as
|
|
28
|
-
import { WheelControls as
|
|
29
|
-
import { windowResizer as
|
|
25
|
+
import { TICK_ORDER as Pe, RESIZE_ORDER as me } from "../../order/index.js";
|
|
26
|
+
import { D as Le } from "../../Damped-Chu29wn-.js";
|
|
27
|
+
import { T as ze } from "../../Tweened-B_ZFQKGQ.js";
|
|
28
|
+
import { WheelControls as ke, KeyboardControls as Ie, DragControls as De, AutoplayControls as Ae } from "../../controls/index.js";
|
|
29
|
+
import { windowResizer as jt } from "../../window-resizer/vanilla/index.js";
|
|
30
30
|
import { scrollEntries as lt } from "../../scroll-entries/index.js";
|
|
31
|
-
import { cssUnitParser as
|
|
32
|
-
import { CSSProperty as
|
|
33
|
-
import { device as
|
|
34
|
-
import { elementResizer as
|
|
35
|
-
import { s as
|
|
36
|
-
import { f as
|
|
37
|
-
import { d as
|
|
38
|
-
import { ScrollSegmentElement as
|
|
31
|
+
import { cssUnitParser as de } from "../../css-unit-parser/index.js";
|
|
32
|
+
import { CSSProperty as p } from "../../css-property/index.js";
|
|
33
|
+
import { device as Te } from "../../device/index.js";
|
|
34
|
+
import { elementResizer as Jt } from "../../element-resizer/vanilla/index.js";
|
|
35
|
+
import { s as Me } from "../../gestures-D2Fdra_G.js";
|
|
36
|
+
import { f as be } from "../../dom-0S_WDL4g.js";
|
|
37
|
+
import { d as Ve } from "../../function-C10DGppn.js";
|
|
38
|
+
import { ScrollSegmentElement as Oe } from "../../scroll-segment/index.js";
|
|
39
39
|
var m, Rt, v, ct, V, G;
|
|
40
|
-
class
|
|
40
|
+
class Re {
|
|
41
41
|
constructor(r, e, i) {
|
|
42
42
|
s(this, m);
|
|
43
43
|
s(this, Rt);
|
|
@@ -66,7 +66,7 @@ class Oe {
|
|
|
66
66
|
r ? (t(this, m).style.setProperty("--size", r + "px"), t(this, v).axisCSSProperty.current === "x" ? (t(this, m).style.width = r + "px", t(this, m).style.height = "") : (t(this, m).style.height = r + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
|
|
67
67
|
}
|
|
68
68
|
resize() {
|
|
69
|
-
h(this, ct, t(this, v).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, V, t(this, v).vertical ?
|
|
69
|
+
h(this, ct, t(this, v).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), h(this, V, t(this, v).vertical ? te(t(this, m)) : ee(t(this, m))), h(this, V, t(this, V) - t(this, v).contentPosition);
|
|
70
70
|
}
|
|
71
71
|
transform() {
|
|
72
72
|
let r = 0;
|
|
@@ -80,7 +80,7 @@ class Oe {
|
|
|
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(r) {
|
|
83
|
-
t(this, G) !== r && (t(this, G) && t(this, m).classList.remove(t(this, G)), r && t(this, m).classList.add(r), h(this, G, r),
|
|
83
|
+
t(this, G) !== r && (t(this, G) && t(this, m).classList.remove(t(this, G)), r && t(this, m).classList.add(r), h(this, G, r), Yt(t(this, m), "scrollSectionMarkChange", {
|
|
84
84
|
composed: !0,
|
|
85
85
|
detail: {
|
|
86
86
|
mark: t(this, G)
|
|
@@ -90,7 +90,7 @@ class Oe {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
m = new WeakMap(), Rt = new WeakMap(), v = new WeakMap(), ct = new WeakMap(), V = new WeakMap(), G = new WeakMap();
|
|
93
|
-
const
|
|
93
|
+
const He = fe({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
96
96
|
width: "100%",
|
|
@@ -128,84 +128,84 @@ const Re = de({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u, at, P, O, R, H, I, K, _, B, Z, ut, D, C, dt,
|
|
131
|
+
var u, at, P, O, R, H, I, K, _, B, Z, ut, D, C, dt, ft, pt, mt, wt, k, bt, j, A, J, F, Q, gt, St, X, Y, f, xt, l, Ht, Bt, y, S, L, T, tt, M, E, g, Pt, et, W, st, vt, Lt, it, $, Ft, o, Vt, Et, _t, Zt, se, ie, z, zt, ge, kt, Wt, re, ne, ot, he;
|
|
132
132
|
class Ot extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this, at, new
|
|
138
|
-
s(this, P, new
|
|
139
|
-
s(this, O, new
|
|
140
|
-
s(this, R, new
|
|
137
|
+
s(this, at, new p(this, "--controls", !0));
|
|
138
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
139
|
+
s(this, O, 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, H, new
|
|
144
|
-
s(this, I, new
|
|
145
|
-
s(this, K, new
|
|
143
|
+
s(this, H, new p(this, "--split", !1));
|
|
144
|
+
s(this, I, new p(this, "--sectional", !1));
|
|
145
|
+
s(this, K, new p(
|
|
146
146
|
this,
|
|
147
147
|
"--easing",
|
|
148
148
|
!1
|
|
149
149
|
));
|
|
150
|
-
s(this, _, new
|
|
150
|
+
s(this, _, new p(
|
|
151
151
|
this,
|
|
152
152
|
"--duration",
|
|
153
153
|
!1
|
|
154
154
|
));
|
|
155
|
-
s(this, B, new
|
|
156
|
-
s(this, Z, new
|
|
155
|
+
s(this, B, new p(this, "--auto-size", !1));
|
|
156
|
+
s(this, Z, new p(
|
|
157
157
|
this,
|
|
158
158
|
"--wheel-max-delta",
|
|
159
159
|
!1
|
|
160
160
|
));
|
|
161
|
-
s(this, ut, new
|
|
162
|
-
s(this, D, new
|
|
161
|
+
s(this, ut, new p(this, "--drag-inertion", 1));
|
|
162
|
+
s(this, D, new p(
|
|
163
163
|
this,
|
|
164
164
|
"--sections-in-view",
|
|
165
165
|
1
|
|
166
166
|
));
|
|
167
|
-
s(this, C, new
|
|
168
|
-
s(this, dt, new
|
|
169
|
-
s(this,
|
|
170
|
-
s(this,
|
|
171
|
-
s(this, mt, new
|
|
172
|
-
s(this, wt, new
|
|
167
|
+
s(this, C, new p(this, "--loop", !1));
|
|
168
|
+
s(this, dt, new p(this, "--damping", 20));
|
|
169
|
+
s(this, ft, new p(this, "--mass", 0));
|
|
170
|
+
s(this, pt, new p(this, "--stiffness", 0));
|
|
171
|
+
s(this, mt, new p(this, "--mouse-drag", !1));
|
|
172
|
+
s(this, wt, new p(
|
|
173
173
|
this,
|
|
174
174
|
"--section-distance-scale",
|
|
175
175
|
0.5
|
|
176
176
|
));
|
|
177
|
-
s(this, k, new
|
|
178
|
-
s(this, bt, new
|
|
177
|
+
s(this, k, new p(this, "--autoplay", 0));
|
|
178
|
+
s(this, bt, new p(
|
|
179
179
|
this,
|
|
180
180
|
"--autoplay-pause-duration",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this, j, new
|
|
183
|
+
s(this, j, new p(
|
|
184
184
|
this,
|
|
185
185
|
"--autoplay-user-direction",
|
|
186
186
|
!1
|
|
187
187
|
));
|
|
188
|
-
s(this, A, new
|
|
189
|
-
s(this, J, new
|
|
188
|
+
s(this, A, new p(this, "--classes", !1));
|
|
189
|
+
s(this, J, new p(
|
|
190
190
|
this,
|
|
191
191
|
"--current-index-start-offset",
|
|
192
192
|
0
|
|
193
193
|
));
|
|
194
|
-
s(this, F, new
|
|
194
|
+
s(this, F, new p(
|
|
195
195
|
this,
|
|
196
196
|
"--current-index-end-offset",
|
|
197
197
|
0
|
|
198
198
|
));
|
|
199
|
-
s(this, Q, new
|
|
200
|
-
s(this, gt, new
|
|
199
|
+
s(this, Q, new p(this, "--focus-delay", 0));
|
|
200
|
+
s(this, gt, new p(
|
|
201
201
|
this,
|
|
202
202
|
"--focus-duration",
|
|
203
203
|
3e3
|
|
204
204
|
));
|
|
205
|
-
s(this, St, new
|
|
206
|
-
s(this, X, new
|
|
205
|
+
s(this, St, new p(this, "--disabled", !1));
|
|
206
|
+
s(this, X, new p(this, "--hibernated", !1));
|
|
207
207
|
s(this, Y, null);
|
|
208
|
-
s(this,
|
|
208
|
+
s(this, f, null);
|
|
209
209
|
s(this, xt, null);
|
|
210
210
|
s(this, l, []);
|
|
211
211
|
s(this, Ht, 0);
|
|
@@ -217,7 +217,7 @@ class Ot extends HTMLElement {
|
|
|
217
217
|
s(this, tt, null);
|
|
218
218
|
s(this, M, null);
|
|
219
219
|
s(this, E, null);
|
|
220
|
-
s(this, g, new
|
|
220
|
+
s(this, g, new we(0));
|
|
221
221
|
s(this, Pt, 0);
|
|
222
222
|
s(this, et, 0);
|
|
223
223
|
s(this, W, !1);
|
|
@@ -225,14 +225,15 @@ class Ot extends HTMLElement {
|
|
|
225
225
|
s(this, vt, !0);
|
|
226
226
|
s(this, Lt);
|
|
227
227
|
s(this, it);
|
|
228
|
-
s(this, $, new
|
|
228
|
+
s(this, $, new ze());
|
|
229
|
+
s(this, Ft, !1);
|
|
229
230
|
s(this, z, () => {
|
|
230
231
|
t(this, u).unlistenAnimationFrame();
|
|
231
232
|
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
|
|
232
|
-
if (h(this, Ht, this.vertical ?
|
|
233
|
-
getComputedStyle(t(this,
|
|
234
|
-
)) : h(this, L,
|
|
235
|
-
getComputedStyle(t(this,
|
|
233
|
+
if (h(this, Ht, this.vertical ? te(this) : ee(this)), h(this, Bt, this.vertical ? te(t(this, f)) : ee(t(this, f))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, de.parse(
|
|
234
|
+
getComputedStyle(t(this, f)).rowGap
|
|
235
|
+
)) : h(this, L, de.parse(
|
|
236
|
+
getComputedStyle(t(this, f)).columnGap
|
|
236
237
|
)), t(this, B).current && t(this, l).length) {
|
|
237
238
|
const n = t(this, D).current, c = (t(this, y) - t(this, L) * (n - 1)) / n;
|
|
238
239
|
t(this, l).forEach((b) => {
|
|
@@ -247,9 +248,9 @@ class Ot extends HTMLElement {
|
|
|
247
248
|
}), t(this, R).current) {
|
|
248
249
|
h(this, S, t(this, y) * t(this, R).current);
|
|
249
250
|
const n = t(this, S) + t(this, y);
|
|
250
|
-
this.vertical ? (t(this,
|
|
251
|
+
this.vertical ? (t(this, f).style.width = n + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = n + "px", t(this, f).style.width = "100%");
|
|
251
252
|
} else
|
|
252
|
-
this.vertical ? (t(this,
|
|
253
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, S, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, S, t(this, f).offsetWidth - t(this, y)));
|
|
253
254
|
if (!t(this, C).current) {
|
|
254
255
|
const n = getComputedStyle(this), c = this.vertical ? parseFloat(n.paddingBlockStart) + parseFloat(n.paddingBlockEnd) : parseFloat(n.paddingInlineStart) + parseFloat(n.paddingInlineEnd);
|
|
255
256
|
h(this, S, t(this, S) + c), t(this, u).max = t(this, S);
|
|
@@ -268,7 +269,7 @@ class Ot extends HTMLElement {
|
|
|
268
269
|
t(this, u).set(e * t(this, S), {
|
|
269
270
|
equalize: !0
|
|
270
271
|
});
|
|
271
|
-
h(this, W, (this.vertical ? t(this,
|
|
272
|
+
h(this, W, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, W)), t(this, W) ? d(this, o, Zt).call(this) : d(this, o, _t).call(this), t(this, zt).call(this);
|
|
272
273
|
});
|
|
273
274
|
s(this, zt, () => {
|
|
274
275
|
if (!t(this, W))
|
|
@@ -280,9 +281,9 @@ class Ot extends HTMLElement {
|
|
|
280
281
|
const c = t(this, l)[n];
|
|
281
282
|
c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i = n);
|
|
282
283
|
}
|
|
283
|
-
t(this, g).current = i;
|
|
284
|
+
t(this, g).current = i, console.log(t(this, g).current);
|
|
284
285
|
} else
|
|
285
|
-
this.vertical ? t(this,
|
|
286
|
+
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
286
287
|
lt.update(
|
|
287
288
|
this,
|
|
288
289
|
t(this, P).current,
|
|
@@ -290,9 +291,9 @@ class Ot extends HTMLElement {
|
|
|
290
291
|
);
|
|
291
292
|
});
|
|
292
293
|
s(this, kt, (e, i) => {
|
|
293
|
-
t(this, at).current && (d(this, o,
|
|
294
|
+
t(this, at).current && (d(this, o, re).call(this, Math.sign(i) || 1), t(this, Wt).call(this, e, i));
|
|
294
295
|
});
|
|
295
|
-
s(this,
|
|
296
|
+
s(this, Wt, (e, i) => {
|
|
296
297
|
if (t(this, O).current) {
|
|
297
298
|
if (t(this, O).current < 0 && i > 0)
|
|
298
299
|
return;
|
|
@@ -300,30 +301,36 @@ class Ot extends HTMLElement {
|
|
|
300
301
|
return;
|
|
301
302
|
}
|
|
302
303
|
if (t(this, it) || t(this, $).unlistenAnimationFrame(), !t(this, k).current && t(this, Q).current && (clearInterval(t(this, Lt)), h(this, Lt, setTimeout(() => {
|
|
303
|
-
const n = d(this, o,
|
|
304
|
+
const n = d(this, o, he).call(this);
|
|
304
305
|
n && this.scrollToSection(n.index, {
|
|
305
306
|
tween: {
|
|
306
307
|
duration: t(this, gt).current,
|
|
307
|
-
easing:
|
|
308
|
+
easing: xe
|
|
308
309
|
}
|
|
309
310
|
});
|
|
310
|
-
}, t(this, Q).current))), !(e.includes("drag") && !
|
|
311
|
+
}, t(this, Q).current))), !(e.includes("drag") && !Te.isMobile && !t(this, mt).current)) {
|
|
311
312
|
if (t(this, I).current && e !== "drag") {
|
|
312
313
|
const n = Math.sign(i);
|
|
313
|
-
t(this, l).length
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
if (t(this, l).length) {
|
|
315
|
+
const c = {
|
|
316
|
+
tween: t(this, K).current || t(this, _).current ? {
|
|
317
|
+
easing: t(this, K).current || "easeInOutCubic",
|
|
318
|
+
duration: t(this, _).current || 500
|
|
319
|
+
} : void 0
|
|
320
|
+
};
|
|
321
|
+
t(this, Ft) ? this.scrollToSection(t(this, g).current, c) : this.shiftSections(n, c);
|
|
322
|
+
} else
|
|
323
|
+
t(this, u).shift(n * t(this, y));
|
|
319
324
|
} else
|
|
320
325
|
t(this, u).shift(i);
|
|
326
|
+
h(this, Ft, e === "drag");
|
|
327
|
+
}
|
|
321
328
|
});
|
|
322
|
-
if (
|
|
329
|
+
if (Qt) {
|
|
323
330
|
const e = this.attachShadow({ mode: "open" });
|
|
324
|
-
e.adoptedStyleSheets.push(
|
|
331
|
+
e.adoptedStyleSheets.push(He);
|
|
325
332
|
const i = document.createElement("div");
|
|
326
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Y, document.createElement("div")), t(this, Y).className = "content-wrapper", h(this,
|
|
333
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, Y, document.createElement("div")), t(this, Y).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, xt, document.createElement("slot")), t(this, f).appendChild(t(this, xt)), t(this, Y).appendChild(t(this, f)), e.appendChild(t(this, Y));
|
|
327
334
|
}
|
|
328
335
|
}
|
|
329
336
|
get damped() {
|
|
@@ -372,10 +379,10 @@ class Ot extends HTMLElement {
|
|
|
372
379
|
return t(this, dt);
|
|
373
380
|
}
|
|
374
381
|
get massCSSProperty() {
|
|
375
|
-
return t(this,
|
|
382
|
+
return t(this, ft);
|
|
376
383
|
}
|
|
377
384
|
get stiffnessCSSProperty() {
|
|
378
|
-
return t(this,
|
|
385
|
+
return t(this, pt);
|
|
379
386
|
}
|
|
380
387
|
get mouseDragCSSProperty() {
|
|
381
388
|
return t(this, mt);
|
|
@@ -414,16 +421,16 @@ class Ot extends HTMLElement {
|
|
|
414
421
|
return t(this, X);
|
|
415
422
|
}
|
|
416
423
|
get currentScrollValue() {
|
|
417
|
-
return d(this, o,
|
|
424
|
+
return d(this, o, ne).call(this, "current");
|
|
418
425
|
}
|
|
419
426
|
get targetScrollValue() {
|
|
420
|
-
return d(this, o,
|
|
427
|
+
return d(this, o, ne).call(this, "target");
|
|
421
428
|
}
|
|
422
429
|
get contentWrapperElement() {
|
|
423
430
|
return t(this, Y);
|
|
424
431
|
}
|
|
425
432
|
get contentElement() {
|
|
426
|
-
return t(this,
|
|
433
|
+
return t(this, f);
|
|
427
434
|
}
|
|
428
435
|
get sections() {
|
|
429
436
|
return t(this, l);
|
|
@@ -498,19 +505,19 @@ class Ot extends HTMLElement {
|
|
|
498
505
|
if (!t(this, l).length)
|
|
499
506
|
return;
|
|
500
507
|
const n = t(this, g).current;
|
|
501
|
-
d(this, o,
|
|
508
|
+
d(this, o, ge).call(this, e);
|
|
502
509
|
const c = t(this, l)[n], b = t(this, l)[t(this, g).current];
|
|
503
510
|
if (c && b) {
|
|
504
511
|
let x = 0;
|
|
505
|
-
const Ct = d(this, o,
|
|
506
|
-
t(this, C).current ? t(this, g).current === 0 && n === t(this, l).length - 1 ? x = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, l).length - 1 && n === 0 ? x = b.position - (t(this, S) + t(this, y) + t(this, L)) : x = b.position - c.position : x = b.position - c.position, this.shiftPosition(x -
|
|
512
|
+
const Ct = d(this, o, he).call(this), ve = Ct ? this.targetScrollValue - Ct.position : 0;
|
|
513
|
+
t(this, C).current ? t(this, g).current === 0 && n === t(this, l).length - 1 ? x = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, l).length - 1 && n === 0 ? x = b.position - (t(this, S) + t(this, y) + t(this, L)) : x = b.position - c.position : x = b.position - c.position, this.shiftPosition(x - ve, i);
|
|
507
514
|
}
|
|
508
515
|
}
|
|
509
516
|
shiftSections(e, i) {
|
|
510
517
|
t(this, l).length && this.scrollToSection(t(this, g).current + e, i);
|
|
511
518
|
}
|
|
512
519
|
setPosition(e, i) {
|
|
513
|
-
d(this, o,
|
|
520
|
+
d(this, o, re).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, it) || (t(this, $).set(t(this, u).current, { equalize: !0 }), t(this, $).set(e, ue({}, i.tween)), h(this, it, setTimeout(() => {
|
|
514
521
|
h(this, it, void 0);
|
|
515
522
|
}, i.tween.duration))) : t(this, u).set(e, {
|
|
516
523
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
@@ -520,18 +527,18 @@ class Ot extends HTMLElement {
|
|
|
520
527
|
this.setPosition(t(this, u).target + e, i);
|
|
521
528
|
}
|
|
522
529
|
connectedCallback() {
|
|
523
|
-
lt.register(this), h(this, u, new
|
|
530
|
+
lt.register(this), h(this, u, new Le(0, {
|
|
524
531
|
damping: 0.01,
|
|
525
532
|
min: 0,
|
|
526
|
-
order:
|
|
527
|
-
})), this.setAttribute("tabindex", "0"), h(this, T, new
|
|
533
|
+
order: Pe.SCROLL
|
|
534
|
+
})), this.setAttribute("tabindex", "0"), h(this, T, new ke({ element: t(this, f) })), t(this, T).changeEvent.subscribe(t(this, kt)), h(this, tt, new Ie({
|
|
528
535
|
element: this
|
|
529
536
|
})), t(this, tt).changeEvent.subscribe(
|
|
530
537
|
t(this, kt)
|
|
531
|
-
), h(this, M, new
|
|
538
|
+
), h(this, M, new De({ element: t(this, f) })), t(this, M).changeEvent.subscribe(t(this, kt)), h(this, E, new Ae({
|
|
532
539
|
culling: this
|
|
533
|
-
})), t(this, E).changeEvent.subscribe(t(this,
|
|
534
|
-
t(this,
|
|
540
|
+
})), t(this, E).changeEvent.subscribe(t(this, Wt)), t(this, P).subscribe(({ current: e }) => {
|
|
541
|
+
t(this, f).style.flexDirection = e === "x" ? "row" : "column", t(this, T).axis = t(this, Z).current ? "max" : e, t(this, tt).dimension = e === "x" ? "width" : "height", t(this, M).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
|
|
535
542
|
}), t(this, Z).subscribe((e) => {
|
|
536
543
|
t(this, T).axis = e.current ? "max" : t(this, P).current;
|
|
537
544
|
}), t(this, ut).subscribe((e) => {
|
|
@@ -550,9 +557,9 @@ class Ot extends HTMLElement {
|
|
|
550
557
|
e.current ? (this.isConnected && (t(this, l).length || (t(this, H).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, Pt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
551
558
|
}), t(this, dt).subscribe((e) => {
|
|
552
559
|
t(this, u).damping = e.current;
|
|
553
|
-
}), t(this, pt).subscribe((e) => {
|
|
554
|
-
t(this, u).mass = e.current;
|
|
555
560
|
}), t(this, ft).subscribe((e) => {
|
|
561
|
+
t(this, u).mass = e.current;
|
|
562
|
+
}), t(this, pt).subscribe((e) => {
|
|
556
563
|
t(this, u).stiffness = e.current;
|
|
557
564
|
}), t(this, k).subscribe((e) => {
|
|
558
565
|
t(this, E).speed = e.current, !t(this, st) && e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
|
|
@@ -571,47 +578,47 @@ class Ot extends HTMLElement {
|
|
|
571
578
|
}), t(this, $).subscribe((e) => {
|
|
572
579
|
t(this, $).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
|
|
573
580
|
}), t(this, St).subscribe((e) => {
|
|
574
|
-
e.current && !e.previous ? d(this, o,
|
|
581
|
+
e.current && !e.previous ? d(this, o, _t).call(this) : !e.current && e.previous && d(this, o, Zt).call(this);
|
|
575
582
|
}), t(this, X).subscribe((e) => {
|
|
576
|
-
e.current && !e.previous ? d(this, o,
|
|
577
|
-
}), t(this, at).observe(), t(this, P).observe(), t(this, O).observe(), t(this, R).observe(), t(this, H).observe(), t(this, I).observe(), t(this, K).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, ut).observe(), t(this, D).observe(), t(this, C).observe(), t(this, dt).observe(), t(this,
|
|
583
|
+
e.current && !e.previous ? d(this, o, se).call(this) : !e.current && e.previous && d(this, o, ie).call(this);
|
|
584
|
+
}), t(this, at).observe(), t(this, P).observe(), t(this, O).observe(), t(this, R).observe(), t(this, H).observe(), t(this, I).observe(), t(this, K).observe(), t(this, _).observe(), t(this, B).observe(), t(this, Z).observe(), t(this, ut).observe(), t(this, D).observe(), t(this, C).observe(), t(this, dt).observe(), t(this, ft).observe(), t(this, pt).observe(), t(this, mt).observe(), t(this, wt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, bt).observe(), t(this, j).observe(), t(this, A).observe(), t(this, J).observe(), t(this, F).observe(), t(this, Q).observe(), t(this, gt).observe(), t(this, St).observe(), t(this, X).observe(), t(this, X).current || d(this, o, ie).call(this);
|
|
578
585
|
}
|
|
579
586
|
disconnectedCallback() {
|
|
580
|
-
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, at).unobserve(), t(this, P).unobserve(), t(this, O).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, I).unobserve(), t(this, K).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, ut).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, dt).unobserve(), t(this,
|
|
587
|
+
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, at).unobserve(), t(this, P).unobserve(), t(this, O).unobserve(), t(this, R).unobserve(), t(this, H).unobserve(), t(this, I).unobserve(), t(this, K).unobserve(), t(this, _).unobserve(), t(this, B).unobserve(), t(this, Z).unobserve(), t(this, ut).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, dt).unobserve(), t(this, ft).unobserve(), t(this, pt).unobserve(), t(this, mt).unobserve(), t(this, wt).unobserve(), t(this, k).unobserve(), t(this, bt).unobserve(), t(this, j).unobserve(), t(this, A).unobserve(), t(this, J).unobserve(), t(this, F).unobserve(), t(this, Q).unobserve(), t(this, gt).unobserve(), t(this, St).unobserve(), t(this, X).unobserve(), d(this, o, se).call(this);
|
|
581
588
|
}
|
|
582
589
|
}
|
|
583
|
-
u = new WeakMap(), at = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R = new WeakMap(), H = new WeakMap(), I = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), ut = new WeakMap(), D = new WeakMap(), C = new WeakMap(), dt = new WeakMap(),
|
|
590
|
+
u = new WeakMap(), at = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R = new WeakMap(), H = new WeakMap(), I = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), ut = new WeakMap(), D = new WeakMap(), C = new WeakMap(), dt = new WeakMap(), ft = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), wt = new WeakMap(), k = new WeakMap(), bt = new WeakMap(), j = new WeakMap(), A = new WeakMap(), J = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), f = new WeakMap(), xt = new WeakMap(), l = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), M = new WeakMap(), E = new WeakMap(), g = new WeakMap(), Pt = new WeakMap(), et = new WeakMap(), W = new WeakMap(), st = new WeakMap(), vt = new WeakMap(), Lt = new WeakMap(), it = new WeakMap(), $ = new WeakMap(), Ft = new WeakMap(), o = new WeakSet(), Vt = function() {
|
|
584
591
|
d(this, o, Et).call(this), t(this, xt).assignedElements().forEach((e, i) => {
|
|
585
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
586
|
-
}), t(this,
|
|
592
|
+
e instanceof HTMLElement && t(this, l).push(new Re(e, i, this));
|
|
593
|
+
}), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
|
|
587
594
|
custom: !0,
|
|
588
595
|
composed: !0
|
|
589
596
|
}), t(this, z).call(this), d(this, o, ot).call(this);
|
|
590
597
|
}, Et = function() {
|
|
591
598
|
t(this, l).forEach((e) => {
|
|
592
599
|
e.destroy();
|
|
593
|
-
}), h(this, l, []), t(this, g).reset(), t(this, u).reset(),
|
|
600
|
+
}), h(this, l, []), t(this, g).reset(), t(this, u).reset(), Yt(this, "scrollSectionsChange", {
|
|
594
601
|
custom: !0,
|
|
595
602
|
composed: !0
|
|
596
603
|
});
|
|
597
|
-
},
|
|
604
|
+
}, _t = function() {
|
|
598
605
|
t(this, st) || (h(this, st, !0), t(this, u).unsubscribe(t(this, zt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Lt)), clearInterval(t(this, it)), t(this, $).unlistenAnimationFrame(), t(this, T).disconnect(), t(this, tt).disconnect(), t(this, M).disconnect(), t(this, E).disconnect(), t(this, W) || this.sections.forEach((e) => {
|
|
599
606
|
e.unsetTransform();
|
|
600
607
|
}));
|
|
601
|
-
},
|
|
608
|
+
}, Zt = function() {
|
|
602
609
|
t(this, st) && (h(this, st, !1), t(this, u).subscribe(t(this, zt)), t(this, T).connect(), t(this, tt).connect(), t(this, M).connect(), t(this, k).current && t(this, E).connect());
|
|
603
|
-
}, ee = function() {
|
|
604
|
-
t(this, vt) || (h(this, vt, !0), Zt.unsubscribe(t(this, z)), jt.unsubscribe(t(this, z)), d(this, o, Kt).call(this), t(this, p).style.transform = "", t(this, l).length ? d(this, o, Et).call(this) : (t(this, g).reset(), t(this, u).reset()), lt.unregister(this));
|
|
605
610
|
}, se = function() {
|
|
606
|
-
t(this, vt)
|
|
607
|
-
},
|
|
611
|
+
t(this, vt) || (h(this, vt, !0), jt.unsubscribe(t(this, z)), Jt.unsubscribe(t(this, z)), d(this, o, _t).call(this), t(this, f).style.transform = "", t(this, l).length ? d(this, o, Et).call(this) : (t(this, g).reset(), t(this, u).reset()), lt.unregister(this));
|
|
612
|
+
}, ie = function() {
|
|
613
|
+
t(this, vt) && (h(this, vt, !1), lt.register(this), (t(this, C).current || t(this, H).current || t(this, C).current || t(this, B).current || t(this, I).current) && d(this, o, Vt).call(this), d(this, o, Zt).call(this), jt.subscribe(t(this, z), me.SCROLL), Jt.subscribe(this, t(this, z)));
|
|
614
|
+
}, z = new WeakMap(), zt = new WeakMap(), ge = function(e) {
|
|
608
615
|
t(this, C).current ? (t(this, g).current = e % t(this, l).length, t(this, g).current = t(this, g).current < 0 ? t(this, l).length + t(this, g).current : t(this, g).current) : t(this, g).current = pe(e, 0, this.limit);
|
|
609
|
-
}, kt = new WeakMap(),
|
|
616
|
+
}, kt = new WeakMap(), Wt = new WeakMap(), re = function(e = 1) {
|
|
610
617
|
t(this, j).current && (t(this, E).direction = e), t(this, k).current && t(this, E).pauseAndContinue(
|
|
611
618
|
t(this, bt).current,
|
|
612
619
|
this.sectionalCSSProperty.current
|
|
613
620
|
);
|
|
614
|
-
},
|
|
621
|
+
}, ne = function(e = "current") {
|
|
615
622
|
if (t(this, C).current && t(this, l).length) {
|
|
616
623
|
const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, L));
|
|
617
624
|
return i < 0 ? t(this, S) + i + t(this, y) + t(this, L) : i;
|
|
@@ -627,7 +634,7 @@ u = new WeakMap(), at = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R =
|
|
|
627
634
|
c >= e && c < x || c <= b ? n.mark("current") : c >= x && c < x + Ct / 2 || c <= b + i ? n.mark("next") : n.mark("previous");
|
|
628
635
|
});
|
|
629
636
|
}
|
|
630
|
-
},
|
|
637
|
+
}, he = function(e = this.targetScrollValue) {
|
|
631
638
|
let i = null, n = 1 / 0;
|
|
632
639
|
for (let c = 0; c < t(this, l).length; c++) {
|
|
633
640
|
const b = Math.abs(t(this, l)[c].position - e);
|
|
@@ -636,23 +643,23 @@ u = new WeakMap(), at = new WeakMap(), P = new WeakMap(), O = new WeakMap(), R =
|
|
|
636
643
|
return i !== null ? t(this, l)[i] : null;
|
|
637
644
|
};
|
|
638
645
|
customElements.get("e-scroll") || customElements.define("e-scroll", Ot);
|
|
639
|
-
var
|
|
640
|
-
class
|
|
646
|
+
var $t;
|
|
647
|
+
class oe extends HTMLElement {
|
|
641
648
|
constructor() {
|
|
642
649
|
super(...arguments);
|
|
643
|
-
s(this,
|
|
650
|
+
s(this, $t, null);
|
|
644
651
|
}
|
|
645
652
|
get scrollElement() {
|
|
646
|
-
return t(this,
|
|
653
|
+
return t(this, $t);
|
|
647
654
|
}
|
|
648
655
|
connectedCallback() {
|
|
649
|
-
const e =
|
|
650
|
-
e instanceof Ot ? h(this,
|
|
656
|
+
const e = be(this, Ot);
|
|
657
|
+
e instanceof Ot ? h(this, $t, e) : console.error(this, "e-scroll not found");
|
|
651
658
|
}
|
|
652
659
|
}
|
|
653
|
-
|
|
654
|
-
var rt, w, q, N, It, Dt, yt,
|
|
655
|
-
class
|
|
660
|
+
$t = new WeakMap();
|
|
661
|
+
var rt, w, q, N, It, Dt, yt, qt, Nt, Ut;
|
|
662
|
+
class Be extends oe {
|
|
656
663
|
constructor() {
|
|
657
664
|
super();
|
|
658
665
|
s(this, rt, null);
|
|
@@ -666,14 +673,14 @@ class He extends he {
|
|
|
666
673
|
const e = t(this, q) ? this.offsetWidth : this.offsetHeight;
|
|
667
674
|
h(this, N, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, N, Math.max(t(this, N), 30)), t(this, q) ? (t(this, w).style.width = t(this, N) + "px", t(this, w).style.height = "100%") : (t(this, w).style.width = "100%", t(this, w).style.height = t(this, N) + "px"), h(this, It, e - t(this, N)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
668
675
|
});
|
|
669
|
-
s(this,
|
|
676
|
+
s(this, qt, () => {
|
|
670
677
|
h(this, Dt, this.scrollElement.currentProgress * t(this, It)), t(this, q) ? t(this, w).style.transform = `translate3d(${t(this, Dt)}px, 0px, 0px)` : t(this, w).style.transform = `translate3d(0px, ${t(this, Dt)}px, 0px)`;
|
|
671
678
|
});
|
|
672
|
-
s(this,
|
|
679
|
+
s(this, Nt, () => {
|
|
673
680
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
674
681
|
});
|
|
675
|
-
s(this,
|
|
676
|
-
document.documentElement.classList.add("grabbing"),
|
|
682
|
+
s(this, Ut, (e) => {
|
|
683
|
+
document.documentElement.classList.add("grabbing"), Me(
|
|
677
684
|
(c) => {
|
|
678
685
|
const b = t(this, q) ? c.x : c.y, x = this.scrollElement.distance / t(this, It), Ct = (b - n) * x;
|
|
679
686
|
this.scrollElement.setPosition(i + Ct);
|
|
@@ -684,10 +691,10 @@ class He extends he {
|
|
|
684
691
|
);
|
|
685
692
|
const i = this.scrollElement.damped.target, n = t(this, q) ? e.x : e.y;
|
|
686
693
|
});
|
|
687
|
-
if (
|
|
694
|
+
if (Qt) {
|
|
688
695
|
const e = this.attachShadow({ mode: "open" });
|
|
689
696
|
e.adoptedStyleSheets.push(
|
|
690
|
-
|
|
697
|
+
fe({
|
|
691
698
|
":host": {
|
|
692
699
|
display: "inline-block",
|
|
693
700
|
zIndex: "1",
|
|
@@ -725,17 +732,17 @@ class He extends he {
|
|
|
725
732
|
connectedCallback() {
|
|
726
733
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
727
734
|
const e = t(this, rt).assignedElements()[0] || t(this, rt).firstElementChild;
|
|
728
|
-
h(this, w, e), t(this, w).addEventListener("pointerdown", t(this,
|
|
735
|
+
h(this, w, e), t(this, w).addEventListener("pointerdown", t(this, Ut)), jt.subscribe(t(this, yt), me.SCROLL), Jt.subscribe(this, t(this, yt)), this.scrollElement.onScroll(t(this, qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Nt));
|
|
729
736
|
}
|
|
730
737
|
disconnectedCallback() {
|
|
731
|
-
this.removeAttribute("drag-dead-zone"), t(this, w).removeEventListener("pointerdown", t(this,
|
|
738
|
+
this.removeAttribute("drag-dead-zone"), t(this, w).removeEventListener("pointerdown", t(this, Ut)), jt.unsubscribe(t(this, yt)), Jt.unsubscribe(t(this, yt)), this.scrollElement.offScroll(t(this, qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Nt));
|
|
732
739
|
}
|
|
733
740
|
}
|
|
734
|
-
rt = new WeakMap(), w = new WeakMap(), q = new WeakMap(), N = new WeakMap(), It = new WeakMap(), Dt = new WeakMap(), yt = new WeakMap(),
|
|
735
|
-
customElements.get("e-scrollbar") || customElements.define("e-scrollbar",
|
|
736
|
-
class
|
|
741
|
+
rt = new WeakMap(), w = new WeakMap(), q = new WeakMap(), N = new WeakMap(), It = new WeakMap(), Dt = new WeakMap(), yt = new WeakMap(), qt = new WeakMap(), Nt = new WeakMap(), Ut = new WeakMap();
|
|
742
|
+
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Be);
|
|
743
|
+
class Se extends oe {
|
|
737
744
|
constructor() {
|
|
738
|
-
super(),
|
|
745
|
+
super(), Qt && this.addEventListener("click", () => {
|
|
739
746
|
const r = this.getAttribute("behaviour"), e = this.getAttribute("easing") || void 0, i = e ? parseFloat(this.getAttribute("duration") || "0") : void 0;
|
|
740
747
|
this.handleClick({
|
|
741
748
|
behaviour: r,
|
|
@@ -744,30 +751,30 @@ class ge extends he {
|
|
|
744
751
|
});
|
|
745
752
|
}
|
|
746
753
|
}
|
|
747
|
-
class
|
|
754
|
+
class Fe extends Se {
|
|
748
755
|
handleClick(r) {
|
|
749
756
|
const e = this.getAttribute("index");
|
|
750
757
|
this.scrollElement.scrollToSection(parseInt(e || "0"), r);
|
|
751
758
|
}
|
|
752
759
|
}
|
|
753
|
-
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button",
|
|
754
|
-
class
|
|
760
|
+
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Fe);
|
|
761
|
+
class We extends Se {
|
|
755
762
|
handleClick(r) {
|
|
756
763
|
const e = this.getAttribute("step");
|
|
757
764
|
this.scrollElement.shiftSections(parseInt(e || "1"), r);
|
|
758
765
|
}
|
|
759
766
|
}
|
|
760
|
-
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button",
|
|
761
|
-
var U, nt, At,
|
|
762
|
-
class
|
|
767
|
+
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", We);
|
|
768
|
+
var U, nt, At, Gt, Kt, Tt;
|
|
769
|
+
class $e {
|
|
763
770
|
constructor(r, e, i) {
|
|
764
771
|
s(this, U, null);
|
|
765
772
|
s(this, nt, null);
|
|
766
773
|
s(this, At, null);
|
|
767
|
-
s(this,
|
|
768
|
-
s(this,
|
|
774
|
+
s(this, Gt, null);
|
|
775
|
+
s(this, Kt, () => {
|
|
769
776
|
t(this, nt).scrollToSection(t(this, At), {
|
|
770
|
-
behaviour: t(this,
|
|
777
|
+
behaviour: t(this, Gt)
|
|
771
778
|
});
|
|
772
779
|
});
|
|
773
780
|
s(this, Tt, () => {
|
|
@@ -776,25 +783,25 @@ class We {
|
|
|
776
783
|
t(this, nt).counter.current === t(this, At)
|
|
777
784
|
);
|
|
778
785
|
});
|
|
779
|
-
|
|
786
|
+
Qt && (h(this, U, document.createElement("button")), h(this, nt, r), h(this, Gt, i), h(this, At, e), t(this, U).addEventListener("click", t(this, Kt)), t(this, nt).counter.subscribe(t(this, Tt)), t(this, Tt).call(this));
|
|
780
787
|
}
|
|
781
788
|
get element() {
|
|
782
789
|
return t(this, U);
|
|
783
790
|
}
|
|
784
791
|
destroy() {
|
|
785
|
-
t(this, U).removeEventListener("click", t(this,
|
|
792
|
+
t(this, U).removeEventListener("click", t(this, Kt)), t(this, nt).counter.unsubscribe(t(this, Tt)), t(this, U).remove();
|
|
786
793
|
}
|
|
787
794
|
}
|
|
788
|
-
U = new WeakMap(), nt = new WeakMap(), At = new WeakMap(),
|
|
795
|
+
U = new WeakMap(), nt = new WeakMap(), At = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), Tt = new WeakMap();
|
|
789
796
|
var ht, Mt;
|
|
790
|
-
class
|
|
797
|
+
class qe extends oe {
|
|
791
798
|
constructor() {
|
|
792
799
|
super(...arguments);
|
|
793
800
|
s(this, ht, []);
|
|
794
|
-
s(this, Mt,
|
|
801
|
+
s(this, Mt, Ve(() => {
|
|
795
802
|
t(this, ht).forEach((e) => e.destroy()), h(this, ht, []);
|
|
796
803
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
797
|
-
const i = new
|
|
804
|
+
const i = new $e(
|
|
798
805
|
this.scrollElement,
|
|
799
806
|
e,
|
|
800
807
|
this.getAttribute("behaviour") || "smooth"
|
|
@@ -817,22 +824,22 @@ class $e extends he {
|
|
|
817
824
|
}
|
|
818
825
|
}
|
|
819
826
|
ht = new WeakMap(), Mt = new WeakMap();
|
|
820
|
-
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons",
|
|
821
|
-
class
|
|
827
|
+
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", qe);
|
|
828
|
+
class Ne extends Oe {
|
|
822
829
|
connectedCallback() {
|
|
823
|
-
const r =
|
|
830
|
+
const r = be(this, Ot);
|
|
824
831
|
r instanceof Ot ? (this.scrollContainer = r, this.scrollContainer.addEventListener(
|
|
825
832
|
"scrollSectionsChange",
|
|
826
833
|
this.findAnotherScrollEntries
|
|
827
834
|
)) : console.error(this, "e-scroll not found");
|
|
828
835
|
}
|
|
829
836
|
}
|
|
830
|
-
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment",
|
|
837
|
+
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Ne);
|
|
831
838
|
export {
|
|
832
|
-
|
|
839
|
+
qe as ScrollBulletButtonsElement,
|
|
833
840
|
Ot as ScrollElement,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
841
|
+
Ne as ScrollSegmentElement,
|
|
842
|
+
Fe as ScrollSetButtonElement,
|
|
843
|
+
We as ScrollStepButtonElement,
|
|
844
|
+
Be as ScrollbarElement
|
|
838
845
|
};
|