aptechka 0.50.16 → 0.50.18
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/controls/index.cjs +1 -1
- package/lib/controls/index.js +36 -36
- package/lib/morph/Morph.d.ts +2 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +58 -57
- package/lib/pixel-perfect/index.cjs +8 -8
- package/lib/pixel-perfect/index.js +21 -21
- package/lib/scroll/ScrollSection.d.ts +6 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +432 -404
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var u=
|
|
1
|
+
"use strict";var u=e=>{throw TypeError(e)};var y=(e,s,t)=>s.has(e)||u("Cannot "+t);var i=(e,s,t)=>(y(e,s,"read from private field"),t?t.call(e):s.get(e)),r=(e,s,t)=>s.has(e)?u("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),a=(e,s,t,l)=>(y(e,s,"write to private field"),l?l.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../dom-JBOkFLTh.cjs"),x=require("../jss-CRBgdvJ3.cjs");require("../index-Cqw2NKev.cjs");const v=x.createStylesheet(`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
::slotted(img) {
|
|
17
|
-
display: block;
|
|
18
|
-
width: 100
|
|
19
|
-
height: max-content;
|
|
20
|
-
object-fit: cover;
|
|
17
|
+
display: block !important;
|
|
18
|
+
width: 100% !important;
|
|
19
|
+
height: max-content !important;
|
|
20
|
+
object-fit: cover !important;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
::slotted(picture) {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
input:hover {
|
|
46
46
|
opacity: 1
|
|
47
47
|
}
|
|
48
|
-
`);var o,n,c,h,p;class f extends HTMLElement{constructor(){super();r(this,o,null);r(this,n,null);r(this,c);r(this,h,()=>{if(!i(this,n))return;const
|
|
48
|
+
`);var o,n,c,h,p;class f extends HTMLElement{constructor(){super();r(this,o,null);r(this,n,null);r(this,c);r(this,h,()=>{if(!i(this,n))return;const t=i(this,o).scrollLeft*-1,l=i(this,o).scrollTop*-1;i(this,n).style.transform=`translate3d(${t}px, ${l}px, 0px)`});r(this,p,()=>{i(this,n)&&(i(this,n).style.opacity=i(this,c).value)});const t=this.attachShadow({mode:"open"});t.adoptedStyleSheets=[...t.adoptedStyleSheets,v],t.innerHTML=`
|
|
49
49
|
<slot></slot>
|
|
50
50
|
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity")||0}"/>
|
|
51
|
-
`,a(this,c,
|
|
51
|
+
`,a(this,c,t.querySelector("input")),i(this,c).addEventListener("input",i(this,p))}connectedCallback(){var l,m;a(this,o,g.findScrollParentElement(this)),(l=i(this,o))==null||l.addEventListener("scroll",i(this,h));const t=(m=this.shadowRoot.querySelector("slot"))==null?void 0:m.assignedElements()[0];if(t instanceof HTMLElement){a(this,n,t);const d=i(this,n).querySelector("img");d&&(a(this,n,d),d.style.cssText=`
|
|
52
52
|
display: block;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: max-content;
|
|
55
55
|
object-fit: cover;
|
|
56
|
-
`)}i(this,p).call(this)}disconnectedCallback(){var
|
|
56
|
+
`)}i(this,p).call(this)}disconnectedCallback(){var t;(t=i(this,o))==null||t.removeEventListener("scroll",i(this,h))}}o=new WeakMap,n=new WeakMap,c=new WeakMap,h=new WeakMap,p=new WeakMap;customElements.get("e-pixel-perfect")||customElements.define("e-pixel-perfect",f);exports.PixelPerfectElement=f;
|
|
@@ -2,7 +2,7 @@ var u = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var f = (e, s, t) => s.has(e) || u("Cannot " + t);
|
|
5
|
-
var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)),
|
|
5
|
+
var i = (e, s, t) => (f(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, l) => (f(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
|
|
6
6
|
import { f as y } from "../dom-CVWzyXPH.js";
|
|
7
7
|
import { c as x } from "../jss-DtnXPEnq.js";
|
|
8
8
|
import "../index-euf5anj6.js";
|
|
@@ -24,10 +24,10 @@ const g = x(
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
::slotted(img) {
|
|
27
|
-
display: block;
|
|
28
|
-
width: 100
|
|
29
|
-
height: max-content;
|
|
30
|
-
object-fit: cover;
|
|
27
|
+
display: block !important;
|
|
28
|
+
width: 100% !important;
|
|
29
|
+
height: max-content !important;
|
|
30
|
+
object-fit: cover !important;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
::slotted(picture) {
|
|
@@ -57,53 +57,53 @@ const g = x(
|
|
|
57
57
|
}
|
|
58
58
|
`
|
|
59
59
|
);
|
|
60
|
-
var o, n,
|
|
60
|
+
var o, n, c, p, h;
|
|
61
61
|
class v extends HTMLElement {
|
|
62
62
|
constructor() {
|
|
63
63
|
super();
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
r(this, o, null);
|
|
65
|
+
r(this, n, null);
|
|
66
|
+
r(this, c);
|
|
67
|
+
r(this, p, () => {
|
|
68
68
|
if (!i(this, n))
|
|
69
69
|
return;
|
|
70
70
|
const t = i(this, o).scrollLeft * -1, l = i(this, o).scrollTop * -1;
|
|
71
71
|
i(this, n).style.transform = `translate3d(${t}px, ${l}px, 0px)`;
|
|
72
72
|
});
|
|
73
|
-
|
|
74
|
-
i(this, n) && (i(this, n).style.opacity = i(this,
|
|
73
|
+
r(this, h, () => {
|
|
74
|
+
i(this, n) && (i(this, n).style.opacity = i(this, c).value);
|
|
75
75
|
});
|
|
76
76
|
const t = this.attachShadow({ mode: "open" });
|
|
77
77
|
t.adoptedStyleSheets = [...t.adoptedStyleSheets, g], t.innerHTML = `
|
|
78
78
|
<slot></slot>
|
|
79
79
|
<input type="range" min="0" max="1" step="0.01" value="${this.getAttribute("opacity") || 0}"/>
|
|
80
|
-
`, a(this,
|
|
80
|
+
`, a(this, c, t.querySelector("input")), i(this, c).addEventListener("input", i(this, h));
|
|
81
81
|
}
|
|
82
82
|
connectedCallback() {
|
|
83
|
-
var l,
|
|
84
|
-
a(this, o, y(this)), (l = i(this, o)) == null || l.addEventListener("scroll", i(this,
|
|
85
|
-
const t = (
|
|
83
|
+
var l, d;
|
|
84
|
+
a(this, o, y(this)), (l = i(this, o)) == null || l.addEventListener("scroll", i(this, p));
|
|
85
|
+
const t = (d = this.shadowRoot.querySelector("slot")) == null ? void 0 : d.assignedElements()[0];
|
|
86
86
|
if (t instanceof HTMLElement) {
|
|
87
87
|
a(this, n, t);
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const m = i(this, n).querySelector("img");
|
|
89
|
+
m && (a(this, n, m), m.style.cssText = `
|
|
90
90
|
display: block;
|
|
91
91
|
width: 100%;
|
|
92
92
|
height: max-content;
|
|
93
93
|
object-fit: cover;
|
|
94
94
|
`);
|
|
95
95
|
}
|
|
96
|
-
i(this,
|
|
96
|
+
i(this, h).call(this);
|
|
97
97
|
}
|
|
98
98
|
disconnectedCallback() {
|
|
99
99
|
var t;
|
|
100
100
|
(t = i(this, o)) == null || t.removeEventListener(
|
|
101
101
|
"scroll",
|
|
102
|
-
i(this,
|
|
102
|
+
i(this, p)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
o = new WeakMap(), n = new WeakMap(),
|
|
106
|
+
o = new WeakMap(), n = new WeakMap(), c = new WeakMap(), p = new WeakMap(), h = new WeakMap();
|
|
107
107
|
customElements.get("e-pixel-perfect") || customElements.define("e-pixel-perfect", v);
|
|
108
108
|
export {
|
|
109
109
|
v as PixelPerfectElement
|
|
@@ -10,15 +10,20 @@ export type ScrollSectionMarkChangeEvent = CustomEvent<ScrollSectionMarkChangeDe
|
|
|
10
10
|
export declare class ScrollSection {
|
|
11
11
|
#private;
|
|
12
12
|
constructor(element: HTMLElement, index: number, scrollElement: ScrollElement);
|
|
13
|
+
get element(): HTMLElement;
|
|
13
14
|
get index(): number;
|
|
14
15
|
get size(): number;
|
|
15
16
|
get position(): number;
|
|
17
|
+
get transformPosition(): number;
|
|
16
18
|
destroy(): void;
|
|
17
19
|
unsetTransform(): void;
|
|
18
20
|
setSize(value?: number): void;
|
|
19
21
|
resize(): void;
|
|
20
22
|
transform(): void;
|
|
21
|
-
|
|
23
|
+
setMark(mark: ScrollSectionMark): void;
|
|
24
|
+
setIndex(value: number | null): void;
|
|
25
|
+
setCurrentIndex(value: number | null): void;
|
|
26
|
+
setCurrentIndexArc(value: number | null): void;
|
|
22
27
|
}
|
|
23
28
|
declare global {
|
|
24
29
|
interface HTMLElementEventMap extends ScrollSectionEvents {
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _e=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var xe=u=>{throw TypeError(u)};var Ee=(u,h,e)=>h in u?_e(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Le=(u,h)=>{for(var e in h||(h={}))He.call(h,e)&&Ee(u,e,h[e]);if(Pe)for(var e of Pe(h))We.call(h,e)&&Ee(u,e,h[e]);return u};var fe=(u,h,e)=>h.has(u)||xe("Cannot "+e);var t=(u,h,e)=>(fe(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?xe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(fe(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(fe(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("../Store-DRp_K37w.cjs"),B=require("../index-Cqw2NKev.cjs"),$e=require("../easings-GegIwET5.cjs"),ue=require("../events-KVanG9sR.cjs"),ke=require("../jss-CRBgdvJ3.cjs"),Rt=require("../layout-Ctc2p3uz.cjs"),Re=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ae=require("../order/index.cjs"),Ue=require("../Damped-B1lXa9nb.cjs"),Ge=require("../Tweened-cJ36zq1A.cjs"),ce=require("../controls/index.cjs"),It=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ze=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),je=require("../gestures-C7gbKx11.cjs"),Ie=require("../dom-JBOkFLTh.cjs"),Ke=require("../function-MthRj-GJ.cjs"),Je=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,X;class Qe{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,X,null);n(this,f,h),n(this,Xt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,V,t(this,g).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),n(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=Re.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,X)!==h&&(t(this,X)&&t(this,f).classList.remove(t(this,X)),h&&t(this,f).classList.add(h),n(this,X,h),ue.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,X=new WeakMap;const Xe=ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,Y,_,H,W,T,tt,et,F,st,vt,q,v,Ct,wt,Pt,Et,Tt,I,xt,it,D,rt,$,nt,Lt,ht,ot,lt,p,qt,l,Yt,te,y,m,k,A,ct,M,w,P,Dt,ut,N,U,G,At,at,Z,Mt,O,E,ee,o,me,Jt,kt,de,Se,ge,ye,L,Ot,Te,Bt,se,ve,Ce,ft,pe,ie;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Tt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,qt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,ct,null);s(this,M,null);s(this,w,null);s(this,P,new Fe.Store(0));s(this,Dt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,At);s(this,at);s(this,Z,new Ge.Tweened);s(this,Mt,!1);s(this,O,null);s(this,E,!1);s(this,ee,null);s(this,L,()=>{if(t(this,ot).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,Yt,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),n(this,te,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,q).current,d=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){n(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],d=r.position+r.size-t(this,y),b=t(this,m)-d;n(this,ut,r.position+r.size+b)}else n(this,ut,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,Se).call(this):c(this,o,de).call(this),t(this,Ot).call(this)});s(this,Ot,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(n(this,Dt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,pe).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Bt,(e,i)=>{t(this,yt).current&&(c(this,o,ve).call(this,Math.sign(i)||1),t(this,se).call(this,e,i))});s(this,se,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,at)||t(this,Z).unlistenAnimationFrame(),!t(this,I).current&&t(this,nt).current&&(clearInterval(t(this,At)),n(this,At,setTimeout(()=>{const r=t(this,l)[c(this,o,pe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:$e.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Ze.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Mt)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Mt,e==="drag")}});s(this,ie,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ye).call(this)});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Xe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,qt,document.createElement("slot")),t(this,p).appendChild(t(this,qt)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),n(this,ee,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,Tt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,Ce).call(this,"current")}get targetScrollValue(){return c(this,o,Ce).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,v).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Dt)}get scrollLine(){return t(this,O)}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}tryResplit(){!t(this,G)&&(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Te).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let R=0;const be=c(this,o,pe).call(this),Kt=t(this,l)[be],Ve=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&r===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&r===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,a).current,{equalize:!0}),t(this,Z).set(e,Le({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):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(){mt.scrollEntries.register(this),n(this,a,new Ue.Damped(0,{damping:.01,min:0,order:ae.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,A,new ce.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Bt)),n(this,ct,new ce.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Bt)),n(this,M,new ce.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Bt)),n(this,w,new ce.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,se)),t(this,x).subscribe(()=>{c(this,o,me).call(this)}),t(this,Y).subscribe(()=>{c(this,o,me).call(this)}),t(this,st).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,kt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,Dt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,rt).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,de).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Se).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ye).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,Tt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,it).observe(),t(this,D).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,Lt).observe(),t(this,ht).observe(),t(this,ot).observe(),It.windowResizer.subscribe(t(this,ie),ae.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,it).unobserve(),t(this,D).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,Lt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),It.windowResizer.unsubscribe(t(this,ie)),c(this,o,ge).call(this),t(this,ee).disconnect()}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,I=new WeakMap,xt=new WeakMap,it=new WeakMap,D=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,Lt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,qt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,ct=new WeakMap,M=new WeakMap,w=new WeakMap,P=new WeakMap,Dt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,At=new WeakMap,at=new WeakMap,Z=new WeakMap,Mt=new WeakMap,O=new WeakMap,E=new WeakMap,ee=new WeakMap,o=new WeakSet,me=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,kt).call(this),t(this,qt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Qe(e,i,this))}),t(this,p).style.transform="",ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},kt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},de=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Ot)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,At)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ct).disconnect(),t(this,M).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Se=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Ot)),t(this,A).connect(),t(this,ct).connect(),t(this,M).connect(),t(this,I).current&&t(this,w).connect())},ge=function(){t(this,G)||(n(this,G,!0),It.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,de).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,kt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ye=function(){t(this,G)&&(n(this,G,!1),mt.scrollEntries.register(this),this.tryResplit(),c(this,o,Se).call(this),It.windowResizer.subscribe(t(this,L),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Ot=new WeakMap,Te=function(e){let i=t(this,P).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Re.clamp(e,0,this.limit),i},Bt=new WeakMap,se=new WeakMap,ve=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},Ce=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,rt).current;if(e===0?n(this,O,"start"):e===this.limit?n(this,O,"end"):n(this,O,null),ue.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,D).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+R/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,Mt)?C.size*d*-1*.4:0,be=C.position;const Kt=Math.abs(be+R-e);Kt<i&&(i=Kt,r=b)}return r},ie=new WeakMap;B.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var re;class we extends HTMLElement{constructor(){super(...arguments);s(this,re,null)}get scrollElement(){return t(this,re)}connectedCallback(){const e=Ie.findParentElement(this,jt);e instanceof jt?n(this,re,e):console.error(this,"e-scroll not found")}}re=new WeakMap;var dt,z,j,K,Vt,_t,St,Ht,ne,he;class qe extends we{constructor(){super();s(this,dt,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,Vt,0);s(this,_t,0);s(this,St,()=>{n(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;n(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),n(this,Vt,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ht).call(this)});s(this,Ht,()=>{n(this,_t,this.scrollElement.currentProgress*t(this,Vt)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,_t)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,_t)}px, 0px)`});s(this,ne,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,he,e=>{document.documentElement.classList.add("grabbing"),je.setupDrag(d=>{const b=t(this,j)?d.x:d.y,C=this.scrollElement.distance/t(this,Vt),R=(b-r)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ke.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,he)),It.windowResizer.subscribe(t(this,St),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.subscribe(t(this,ne))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,he)),It.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ne))}}dt=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,Vt=new WeakMap,_t=new WeakMap,St=new WeakMap,Ht=new WeakMap,ne=new WeakMap,he=new WeakMap;B.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",qe);var Wt,Ft,$t;class De extends we{constructor(){super();s(this,Wt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ft,new S.CSSProperty(this,"--tween-easing",!1));s(this,$t,new S.CSSProperty(this,"--tween-duration",0));B.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Wt).current,i=t(this,Ft).current,r=t(this,$t).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Wt).observe(),t(this,Ft).observe(),t(this,$t).observe()}disconnectedCallback(){t(this,Wt).close(),t(this,Ft).close(),t(this,$t).close()}}Wt=new WeakMap,Ft=new WeakMap,$t=new WeakMap;var Nt;class Ae extends De{constructor(){super(...arguments);s(this,Nt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Nt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Nt).close()}}Nt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ae);var J,Ut;class Me extends De{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Ut,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Ut).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ut)),t(this,Ut).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Ut=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Me);var Q,pt,Gt,oe,le,Zt;class Ye{constructor(h,e,i){s(this,Q,null);s(this,pt,null);s(this,Gt,null);s(this,oe,null);s(this,le,()=>{t(this,pt).scrollToSection(t(this,Gt),{behaviour:t(this,oe)})});s(this,Zt,()=>{t(this,Q).classList.toggle("current",t(this,pt).counter.current===t(this,Gt))});B.isBrowser&&(n(this,Q,document.createElement("button")),n(this,pt,h),n(this,oe,i),n(this,Gt,e),t(this,Q).addEventListener("click",t(this,le)),t(this,pt).counter.subscribe(t(this,Zt)),t(this,Zt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,le)),t(this,pt).counter.unsubscribe(t(this,Zt)),t(this,Q).remove()}}Q=new WeakMap,pt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,le=new WeakMap,Zt=new WeakMap;var bt,zt;class Oe extends we{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,Ke.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new Ye(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,bt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Oe);class Be extends Je.ScrollSegmentElement{connectedCallback(){const h=Ie.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}B.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Oe;exports.ScrollElement=jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=Ae;exports.ScrollStepButtonElement=Me;exports.ScrollbarElement=qe;
|
|
1
|
+
"use strict";var Fe=Object.defineProperty;var Le=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Ie=a=>{throw TypeError(a)};var ze=(a,r,e)=>r in a?Fe(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,ke=(a,r)=>{for(var e in r||(r={}))$e.call(r,e)&&ze(a,e,r[e]);if(Le)for(var e of Le(r))Ne.call(r,e)&&ze(a,e,r[e]);return a};var ye=(a,r,e)=>r.has(a)||Ie("Cannot "+e);var t=(a,r,e)=>(ye(a,r,"read from private field"),e?e.call(a):r.get(a)),s=(a,r,e)=>r.has(a)?Ie("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),h=(a,r,e,i)=>(ye(a,r,"write to private field"),i?i.call(a,e):r.set(a,e),e),c=(a,r,e)=>(ye(a,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ue=require("../Store-DRp_K37w.cjs"),B=require("../index-Cqw2NKev.cjs"),Ge=require("../easings-GegIwET5.cjs"),Se=require("../events-KVanG9sR.cjs"),Me=require("../jss-CRBgdvJ3.cjs"),At=require("../layout-Ctc2p3uz.cjs"),Ae=require("../math-GDWEqu7y.cjs"),Ze=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const pe=require("../order/index.cjs"),je=require("../Damped-B1lXa9nb.cjs"),Ke=require("../Tweened-cJ36zq1A.cjs"),de=require("../controls/index.cjs"),Tt=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),Re=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Je=require("../device/index.cjs"),te=require("../element-resizer/index.cjs"),Qe=require("../gestures-C7gbKx11.cjs"),Te=require("../dom-JBOkFLTh.cjs"),Xe=require("../function-MthRj-GJ.cjs"),Ye=require("../scroll-segment/index.cjs");var f,ee,y,vt,V,Y,Ct,qt,be;class ts{constructor(r,e,i){s(this,qt);s(this,f);s(this,ee);s(this,y);s(this,vt,0);s(this,V,0);s(this,Y,null);s(this,Ct,0);h(this,f,r),h(this,ee,e),h(this,y,i),yt.scrollEntries.register(t(this,f))}get element(){return t(this,f)}get index(){return t(this,ee)}get size(){return t(this,vt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){yt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setSize()}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,vt,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,V,t(this,y).vertical?At.getCumulativeOffsetTop(t(this,f)):At.getCumulativeOffsetLeft(t(this,f))),h(this,V,t(this,V)-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,V)+t(this,vt)<t(this,y).currentScrollValue&&(r=t(this,y).distance*-1-t(this,y).gap),yt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,r);const i=t(this,y).currentScrollValue+r,n=t(this,V)-t(this,y).viewportSize-e,b=t(this,V)+t(this,vt)+e,u=Ae.clamp(i,n,b);h(this,Ct,u*-1),t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,f).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(r){t(this,Y)!==r&&(t(this,Y)&&t(this,f).classList.remove(t(this,Y)),r&&t(this,f).classList.add(r),h(this,Y,r),Se.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Y)},custom:!0}))}setIndex(r){c(this,qt,be).call(this,"--index",r)}setCurrentIndex(r){c(this,qt,be).call(this,"--current-index",r)}setCurrentIndexArc(r){c(this,qt,be).call(this,"--current-index-arc",r)}}f=new WeakMap,ee=new WeakMap,y=new WeakMap,vt=new WeakMap,V=new WeakMap,Y=new WeakMap,Ct=new WeakMap,qt=new WeakSet,be=function(r,e){e?t(this,f).style.setProperty(r,e.toString()):t(this,f).style.removeProperty(r)};const es=Me.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,Pt,L,tt,_,H,W,M,et,st,F,it,wt,A,C,Et,xt,Lt,zt,Dt,R,It,rt,T,nt,$,ht,kt,ot,lt,ct,p,Ot,l,se,ie,v,g,k,q,ut,D,w,E,Bt,at,N,U,G,Vt,dt,Z,_t,O,x,re,o,ve,Yt,Mt,fe,me,Ce,Pe,z,Ht,qe,Wt,ne,we,Ee,gt,ge,he;class Xt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,Pt,new S.CSSProperty(this,"--controls",!0));s(this,L,new S.CSSProperty(this,"--axis","y"));s(this,tt,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,et,new S.CSSProperty(this,"--tween-easing",!1));s(this,st,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,it,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,A,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,Et,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Dt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,rt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,T,new S.CSSProperty(this,"--classes",!1));s(this,nt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,ht,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ot,new S.CSSProperty(this,"--disabled",!1));s(this,lt,new S.CSSProperty(this,"--hibernate",!1));s(this,ct,null);s(this,p,null);s(this,Ot,null);s(this,l,[]);s(this,se,0);s(this,ie,0);s(this,v,0);s(this,g,0);s(this,k,0);s(this,q,null);s(this,ut,null);s(this,D,null);s(this,w,null);s(this,E,new Ue.Store(0));s(this,Bt,0);s(this,at,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,Vt);s(this,dt);s(this,Z,new Ke.Tweened);s(this,_t,!1);s(this,O,null);s(this,x,!1);s(this,re,null);s(this,z,()=>{if(t(this,lt).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,g)||0,i=t(this,E).current;if(h(this,se,this.vertical?At.getCumulativeOffsetTop(this):At.getCumulativeOffsetLeft(this)),h(this,ie,this.vertical?At.getCumulativeOffsetTop(t(this,p)):At.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Re.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Re.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const n=t(this,A).current,b=(t(this,v)-t(this,k)*(n-1))/n;t(this,l).forEach(u=>{u.setSize(b)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,H).current){h(this,g,t(this,v)*t(this,H).current);const n=t(this,g)+t(this,v);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,g,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,g,t(this,p).offsetWidth-t(this,v)));if(!t(this,C).current){const n=getComputedStyle(this),b=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);h(this,g,t(this,g)+b),t(this,d).max=t(this,g)}if(t(this,C).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],b=n.position+n.size-t(this,v),u=t(this,g)-b;h(this,at,n.position+n.size+u)}else h(this,at,t(this,g));if(t(this,M).current&&t(this,l).length){const n=t(this,l)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,g),{equalize:!0});h(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ot).current||c(this,o,me).call(this):c(this,o,fe).call(this),t(this,Ht).call(this)});s(this,Ht,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(h(this,Bt,Math.max(0,e-t(this,g))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,E).current=c(this,o,ge).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;yt.scrollEntries.update(this,t(this,L).current,e)});s(this,Wt,(e,i)=>{t(this,Pt).current&&(c(this,o,we).call(this,Math.sign(i)||1),t(this,ne).call(this,e,i))});s(this,ne,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,Z).unlistenAnimationFrame(),!t(this,R).current&&t(this,ht).current&&(clearInterval(t(this,Vt)),h(this,Vt,setTimeout(()=>{const n=t(this,l)[c(this,o,ge).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,kt).current,easing:Ge.easeInOutExpo}})},t(this,ht).current))),!(e.includes("drag")&&!Je.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const b={tween:t(this,et).current||t(this,st).current?{easing:t(this,et).current||"easeInOutCubic",duration:t(this,st).current||500}:void 0};t(this,_t)?this.scrollToSection(t(this,E).current,b):this.shiftSections(n,b)}else t(this,d).shift(n*t(this,v))}else t(this,d).shift(i);h(this,_t,e==="drag")}});s(this,he,()=>{h(this,x,!0),this.hibernatedCSSProperty.current||c(this,o,Pe).call(this)});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[es];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ct,document.createElement("div")),t(this,ct).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ot,document.createElement("slot")),t(this,p).appendChild(t(this,Ot)),t(this,ct).appendChild(t(this,p)),e.appendChild(t(this,ct)),h(this,re,new MutationObserver(n=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Pt)}get axisCSSProperty(){return t(this,L)}get reverseCSSProperty(){return t(this,tt)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,et)}get durationCSSProperty(){return t(this,st)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,it)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,A)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,Et)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Dt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,rt)}get classesCSSProperty(){return t(this,T)}get currentIndexStartOffsetCSSProperty(){return t(this,nt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,ht)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ot)}get hibernatedCSSProperty(){return t(this,lt)}get currentScrollValue(){return c(this,o,Ee).call(this,"current")}get targetScrollValue(){return c(this,o,Ee).call(this,"target")}get contentWrapperElement(){return t(this,ct)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,se)}get contentPosition(){return t(this,ie)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,g)}get gap(){return t(this,k)}get counter(){return t(this,E)}get limit(){return Math.ceil(t(this,l).length-t(this,A).current)}get distance(){return t(this,at)}get loopDistance(){return t(this,C).current?t(this,at)+t(this,k):t(this,at)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Bt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,L).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,L).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,L).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,C).current||t(this,W).current||t(this,C).current||t(this,F).current||t(this,M).current)&&c(this,o,Yt).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const b=e-n,u=b+i+n*2;return this.currentProgress<b?0:this.currentProgress>u?1:(this.currentProgress-b)/(u-b)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const b=e-n,u=b+i+n*2;return this.currentProgress>=b&&this.currentProgress<=u}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,E).current,b=c(this,o,qe).call(this,e),u=t(this,l)[n],m=t(this,l)[b];if(u&&m){let P=0;const X=c(this,o,ge).call(this),mt=t(this,l)[X],We=mt?this.targetScrollValue-mt.position:0;t(this,C).current?b===0&&n===t(this,l).length-1?P=t(this,g)+t(this,v)-u.position+t(this,k):b===t(this,l).length-1&&n===0?P=m.position-(t(this,g)+t(this,v)+t(this,k)):P=m.position-u.position:P=m.position-u.position,this.shiftPosition(P-We,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,E).current+e,i)}setPosition(e,i){c(this,o,we).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,Z).set(t(this,d).current,{equalize:!0}),t(this,Z).set(e,ke({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){yt.scrollEntries.register(this),h(this,d,new je.Damped(0,{damping:.01,min:0,order:pe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new de.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Wt)),h(this,ut,new de.KeyboardControls({element:this})),t(this,ut).changeEvent.subscribe(t(this,Wt)),h(this,D,new de.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Wt)),h(this,w,new de.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ne)),t(this,L).subscribe(()=>{c(this,o,ve).call(this)}),t(this,tt).subscribe(()=>{c(this,o,ve).call(this)}),t(this,it).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,L).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,x)&&t(this,z).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,x)&&(e?c(this,o,Yt).call(this):c(this,o,Mt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,x)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Yt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,F).subscribe(e=>{t(this,x)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Yt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,A).subscribe(e=>{t(this,x)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,C).subscribe(e=>{e.current?(t(this,x)&&(t(this,l).length||(t(this,W).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Bt,0),t(this,d).max=t(this,g),t(this,d).min=0)}),t(this,Et).subscribe(e=>{t(this,d).damping=e.current}),t(this,xt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,rt).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,T).subscribe(e=>{t(this,x)&&c(this,o,gt).call(this)}),t(this,nt).subscribe(e=>{t(this,x)&&t(this,T).current&&c(this,o,gt).call(this)}),t(this,$).subscribe(e=>{t(this,x)&&t(this,T).current&&c(this,o,gt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,E).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,fe).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,me).call(this))}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Pe).call(this))}),t(this,Pt).observe(),t(this,L).observe(),t(this,tt).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,M).observe(),t(this,et).observe(),t(this,st).observe(),t(this,F).observe(),t(this,it).observe(),t(this,wt).observe(),t(this,A).observe(),t(this,C).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Dt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,It).observe(),t(this,rt).observe(),t(this,T).observe(),t(this,nt).observe(),t(this,$).observe(),t(this,ht).observe(),t(this,kt).observe(),t(this,ot).observe(),t(this,lt).observe(),Tt.windowResizer.subscribe(t(this,he),pe.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Pt).unobserve(),t(this,L).unobserve(),t(this,tt).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,M).unobserve(),t(this,et).unobserve(),t(this,st).unobserve(),t(this,F).unobserve(),t(this,it).unobserve(),t(this,wt).unobserve(),t(this,A).unobserve(),t(this,C).unobserve(),t(this,Et).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Dt).unobserve(),t(this,R).unobserve(),t(this,It).unobserve(),t(this,rt).unobserve(),t(this,T).unobserve(),t(this,nt).unobserve(),t(this,$).unobserve(),t(this,ht).unobserve(),t(this,kt).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),Tt.windowResizer.unsubscribe(t(this,he)),c(this,o,Ce).call(this),t(this,re).disconnect()}}d=new WeakMap,Pt=new WeakMap,L=new WeakMap,tt=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,M=new WeakMap,et=new WeakMap,st=new WeakMap,F=new WeakMap,it=new WeakMap,wt=new WeakMap,A=new WeakMap,C=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Dt=new WeakMap,R=new WeakMap,It=new WeakMap,rt=new WeakMap,T=new WeakMap,nt=new WeakMap,$=new WeakMap,ht=new WeakMap,kt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,p=new WeakMap,Ot=new WeakMap,l=new WeakMap,se=new WeakMap,ie=new WeakMap,v=new WeakMap,g=new WeakMap,k=new WeakMap,q=new WeakMap,ut=new WeakMap,D=new WeakMap,w=new WeakMap,E=new WeakMap,Bt=new WeakMap,at=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Vt=new WeakMap,dt=new WeakMap,Z=new WeakMap,_t=new WeakMap,O=new WeakMap,x=new WeakMap,re=new WeakMap,o=new WeakSet,ve=function(){const e=t(this,L).current,i=t(this,tt).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,it).current?"max":e,t(this,ut).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,x)&&t(this,z).call(this)},Yt=function(){c(this,o,Mt).call(this),t(this,Ot).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new ts(e,i,this))}),t(this,p).style.transform="",Se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Mt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,E).reset(),t(this,d).reset(),Se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},fe=function(){t(this,U)||(h(this,U,!0),t(this,d).unsubscribe(t(this,Ht)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Vt)),clearInterval(t(this,dt)),t(this,Z).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ut).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},me=function(){t(this,U)&&(h(this,U,!1),t(this,d).subscribe(t(this,Ht)),t(this,q).connect(),t(this,ut).connect(),t(this,D).connect(),t(this,R).current&&t(this,w).connect())},Ce=function(){t(this,G)||(h(this,G,!0),Tt.windowResizer.unsubscribe(t(this,z)),te.elementResizer.unsubscribe(t(this,z)),c(this,o,fe).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Mt).call(this):(t(this,E).reset(),t(this,d).reset()),yt.scrollEntries.unregister(this))},Pe=function(){t(this,G)&&(h(this,G,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,me).call(this),Tt.windowResizer.subscribe(t(this,z),pe.RESIZE_ORDER.SCROLL),te.elementResizer.subscribe(this,t(this,z)))},z=new WeakMap,Ht=new WeakMap,qe=function(e){let i=t(this,E).current;return t(this,C).current?i=Ze.loopNumber(e,t(this,l).length):i=Ae.clamp(e,0,this.limit),i},Wt=new WeakMap,ne=new WeakMap,we=function(e=1){t(this,rt).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},Ee=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,d)[e]%(t(this,g)+t(this,v)+t(this,k));return i<0?t(this,g)+i+t(this,v)+t(this,k):i}else return t(this,d)[e]},gt=function(){if(t(this,l).length){const e=t(this,E).current+t(this,nt).current;if(e===0?h(this,O,"start"):e===this.limit?h(this,O,"end"):h(this,O,null),Se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,T).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,A).current+t(this,$).current,n=[];t(this,l).forEach((u,m)=>{u.setCurrentIndex(null),u.setCurrentIndexArc(null),u.setIndex(u.index);const P=e-this.limit-1+t(this,$).current,X=e+i,mt=this.sections.length-X;m>=e&&m<X||m<=P?(u.setMark("current"),n.push(u)):m>=X&&m<X+mt/2||m<=P+i?u.setMark("next"):u.setMark("previous")});const b=Math.floor(n.length/2);n.sort((u,m)=>u.transformPosition-m.transformPosition),n.forEach((u,m)=>{const P=Math.abs(m-b);u.setCurrentIndex(m),u.setCurrentIndexArc(P)})}}else t(this,l).forEach((e,i)=>{e.element.style.removeProperty("--current-index"),e.element.style.removeProperty("--current-index-arc"),e.element.style.removeProperty("--index")})},ge=function(){let e=this.targetScrollValue,i=1/0,n=0;const b=t(this,d).direction;for(let u=0;u<t(this,l).length;u++){const m=t(this,l)[u];let P=t(this,_t)?m.size*b*-1*.4:0,X=m.position;const mt=Math.abs(X+P-e);mt<i&&(i=mt,n=u)}return n},he=new WeakMap;B.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Xt);var oe;class xe extends HTMLElement{constructor(){super(...arguments);s(this,oe,null)}get scrollElement(){return t(this,oe)}connectedCallback(){const e=Te.findParentElement(this,Xt);e instanceof Xt?h(this,oe,e):console.error(this,"e-scroll not found")}}oe=new WeakMap;var St,I,j,K,Ft,$t,pt,Nt,le,ce;class De extends xe{constructor(){super();s(this,St,null);s(this,I,null);s(this,j,!1);s(this,K,0);s(this,Ft,0);s(this,$t,0);s(this,pt,()=>{h(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;h(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,I).style.width=t(this,K)+"px",t(this,I).style.height="100%"):(t(this,I).style.width="100%",t(this,I).style.height=t(this,K)+"px"),h(this,Ft,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Nt).call(this)});s(this,Nt,()=>{h(this,$t,this.scrollElement.currentProgress*t(this,Ft)),t(this,j)?t(this,I).style.transform=`translate3d(${t(this,$t)}px, 0px, 0px)`:t(this,I).style.transform=`translate3d(0px, ${t(this,$t)}px, 0px)`});s(this,le,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ce,e=>{document.documentElement.classList.add("grabbing"),Qe.setupDrag(b=>{const u=t(this,j)?b.x:b.y,m=this.scrollElement.distance/t(this,Ft),P=(u-n)*m;this.scrollElement.setPosition(i+P)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,j)?e.x:e.y});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Me.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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,I)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,I,e),t(this,I).addEventListener("pointerdown",t(this,ce)),Tt.windowResizer.subscribe(t(this,pt),pe.RESIZE_ORDER.SCROLL),te.elementResizer.subscribe(this,t(this,pt)),te.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Nt)),this.scrollElement.axisCSSProperty.subscribe(t(this,le))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,I).removeEventListener("pointerdown",t(this,ce)),Tt.windowResizer.unsubscribe(t(this,pt)),te.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Nt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,le))}}St=new WeakMap,I=new WeakMap,j=new WeakMap,K=new WeakMap,Ft=new WeakMap,$t=new WeakMap,pt=new WeakMap,Nt=new WeakMap,le=new WeakMap,ce=new WeakMap;B.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",De);var Ut,Gt,Zt;class Oe extends xe{constructor(){super();s(this,Ut,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Gt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Zt,new S.CSSProperty(this,"--tween-duration",0));B.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ut).current,i=t(this,Gt).current,n=t(this,Zt).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Ut).observe(),t(this,Gt).observe(),t(this,Zt).observe()}disconnectedCallback(){t(this,Ut).close(),t(this,Gt).close(),t(this,Zt).close()}}Ut=new WeakMap,Gt=new WeakMap,Zt=new WeakMap;var jt;class Be extends Oe{constructor(){super(...arguments);s(this,jt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,jt).current,e)}connectedCallback(){super.connectedCallback(),t(this,jt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,jt).close()}}jt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Be);var J,Kt;class Ve extends Oe{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Kt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Kt).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Kt)),t(this,Kt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Kt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ve);var Q,bt,Jt,ue,ae,Qt;class ss{constructor(r,e,i){s(this,Q,null);s(this,bt,null);s(this,Jt,null);s(this,ue,null);s(this,ae,()=>{t(this,bt).scrollToSection(t(this,Jt),{behaviour:t(this,ue)})});s(this,Qt,()=>{t(this,Q).classList.toggle("current",t(this,bt).counter.current===t(this,Jt))});B.isBrowser&&(h(this,Q,document.createElement("button")),h(this,bt,r),h(this,ue,i),h(this,Jt,e),t(this,Q).addEventListener("click",t(this,ae)),t(this,bt).counter.subscribe(t(this,Qt)),t(this,Qt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,ae)),t(this,bt).counter.unsubscribe(t(this,Qt)),t(this,Q).remove()}}Q=new WeakMap,bt=new WeakMap,Jt=new WeakMap,ue=new WeakMap,ae=new WeakMap,Qt=new WeakMap;var ft,Rt;class _e extends xe{constructor(){super(...arguments);s(this,ft,[]);s(this,Rt,Xe.debounce(()=>{t(this,ft).forEach(i=>i.destroy()),h(this,ft,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const n=new ss(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(n.element),t(this,ft).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Rt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Rt)),t(this,ft).forEach(e=>e.destroy()),h(this,ft,[])}}ft=new WeakMap,Rt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",_e);class He extends Ye.ScrollSegmentElement{connectedCallback(){const r=Te.findParentElement(this,Xt);r instanceof Xt?(this.scrollContainer=r,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}B.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",He);exports.ScrollBulletButtonsElement=_e;exports.ScrollElement=Xt;exports.ScrollSegmentElement=He;exports.ScrollSetButtonElement=Be;exports.ScrollStepButtonElement=Ve;exports.ScrollbarElement=De;
|