aptechka 0.13.0 → 0.14.0
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/{Animation-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
- package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
- package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
- package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
- package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
- package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
- package/lib/Derived-BIBU-y7Z.cjs +1 -0
- package/lib/Derived-Vo_RsJfi.js +23 -0
- package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
- package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
- package/lib/Store-C46i0nvr.js +137 -0
- package/lib/Store-npaZHvX4.cjs +1 -0
- package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
- package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
- package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
- package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +13 -13
- package/lib/canvas/index.cjs +7 -1
- package/lib/canvas/index.js +54 -58
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/{createStylesheet-DO5t5q-m.js → createStylesheet-C68ja-RS.js} +3 -3
- package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -4
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +133 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +4 -4
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/utils/index.js +2 -2
- package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/intersector/index.js +7 -7
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.js +14 -14
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1343 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +60 -62
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +105 -106
- package/lib/scroll-entries/index.js +15 -15
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +38 -112
- package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
- package/lib/{tags-4AoxVUe3.js → tags-zft1DGBz.js} +93 -93
- package/lib/ticker/index.js +1 -1
- package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +56 -57
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +7 -55
- package/lib/Derived-B-2UXnVE.cjs +0 -1
- package/lib/Derived-CDGpSMKu.js +0 -56
- package/lib/Store-BnA-dJsE.cjs +0 -1
- package/lib/Store-DGtldlBH.js +0 -147
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BhbT9PrL.js +0 -261
- package/lib/index-BpsQqM-8.cjs +0 -9
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/svg-path-data/index.cjs +0 -3
- package/lib/svg-path-data/index.js +0 -490
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -992
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var T=i=>{throw TypeError(i)};var M=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,_=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&M(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&M(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||T("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?T("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-npaZHvX4.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const R=require("../Damped-DYJ6Z0xo.cjs"),j=require("../element-resizer/index.cjs"),B=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,d,y,u,b,x,f,w,C,p;class O{constructor(s){n(this,o);n(this,a);n(this,l);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,m);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,m);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,u)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,_({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,g,v,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,g,new P.CSSProperty(this,"--damping",20));n(this,v,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,g).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,v).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,g).observe(),e(this,v).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,g=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -14,12 +14,12 @@ var D = (i, s, e) => s in i ? q(i, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var T = (i, s, e) => s.has(i) || H("Cannot " + e);
|
|
16
16
|
var t = (i, s, e) => (T(i, s, "read from private field"), e ? e.call(i) : s.get(i)), n = (i, s, e) => s.has(i) ? H("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), c = (i, s, e, m) => (T(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e);
|
|
17
|
-
import "../Store-
|
|
17
|
+
import "../Store-C46i0nvr.js";
|
|
18
18
|
import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
|
|
19
|
-
import {
|
|
19
|
+
import { g as K } from "../dom-0S_WDL4g.js";
|
|
20
20
|
import { c as B } from "../math-BOBiC4TN.js";
|
|
21
21
|
import "../ticker/index.js";
|
|
22
|
-
import { D as R } from "../Damped-
|
|
22
|
+
import { D as R } from "../Damped-DbJKrUIf.js";
|
|
23
23
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
24
24
|
import { windowResizer as j } from "../window-resizer/index.js";
|
|
25
25
|
import { CSSProperty as P } from "../css-property/index.js";
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var O=i=>{throw TypeError(i)};var _=(i,o,t)=>o.has(i)||O("Cannot "+t);var e=(i,o,t)=>(_(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?O("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,a)=>(_(i,o,"write to private field"),a?a.call(i,t):o.set(i,t),t),q=(i,o,t)=>(_(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),R=require("../Store-npaZHvX4.cjs"),P=require("../style-At6aDoqG.cjs"),B=require("../browser-CpzFX2xg.cjs");require("../ticker/index.cjs");const I=require("../tags-6_ETuR75.cjs");var f,l,y,p,d,u,g,H,E,L,A,v;const c=class c extends HTMLElement{constructor(){super();n(this,g);n(this,f);n(this,l);n(this,y);n(this,p);n(this,d);n(this,u);n(this,E);n(this,L);n(this,v);h(this,f,-1),h(this,l,new R.Store(!1)),h(this,p,new x.Attribute(this,"history",!1)),h(this,d,new x.Attribute(this,"single",!1)),h(this,u,!1),this.open=(t=!0)=>{if(e(this,l).current)return;e(this,l).current=!0,e(this,d).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,f,c.__opened.length-1),e(this,p).current&&e(this,u)&&history.pushState("","",e(this,g,H)),clearTimeout(e(this,y)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const a=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(a):a()},this.close=()=>{if(e(this,l).current){if(e(this,l).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},P.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{q(this,g,A).call(this,()=>{var M;const r=t.composedPath()[0],k=r instanceof HTMLElement&&(this.contains(r)||((M=this.shadowRoot)==null?void 0:M.contains(r))),m=r instanceof HTMLElement&&r.hasAttribute("outside");(!k||m)&&this.close()})}),h(this,L,t=>{q(this,g,A).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,v,()=>{h(this,u,!1),e(this,l).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),h(this,u,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,p)}get single(){return e(this,d)}get opened(){return e(this,l)}connectedCallback(){e(this,p).observe(),e(this,d).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,v)),setTimeout(()=>{e(this,v).call(this)},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,d).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,y)),removeEventListener("popstate",e(this,v))}};f=new WeakMap,l=new WeakMap,y=new WeakMap,p=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakSet,H=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,L=new WeakMap,A=function(t){(c.__opened[e(this,f)-1]||c.__opened.length===1)&&t()},v=new WeakMap,c.__opened=[];let S=c;customElements.get("e-popover")||customElements.define("e-popover",S);var s,b,T,w,C;class $ extends HTMLElement{constructor(){super();n(this,s);n(this,b,()=>{this.classList.add("triggered")});n(this,T,()=>{this.classList.add("opened")});n(this,w,()=>{this.classList.remove("opened")});n(this,C,()=>{this.classList.remove("triggered")});B.isBrowser&&I.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}},onKeydown:t=>{t.code==="Space"&&t.currentTarget.click()}})}get popoverElement(){return e(this,s)}connectedCallback(){var a;const t=this.getAttribute("target");if(t){let r=null;if(t==="parent"){const k=this.closest("[popover-target]");if(k)r=k;else{const m=this.getRootNode();m instanceof ShadowRoot?r=m.host.closest("[popover-target]"):m instanceof HTMLElement&&(r=m.closest("[popover-target]"))}}else t==="sibling"?r=(a=this.parentElement)==null?void 0:a.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,b)),e(this,s).addEventListener("popoverOpened",e(this,T)),e(this,s).addEventListener("popoverClosing",e(this,w)),e(this,s).addEventListener("popoverClosed",e(this,C))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,b)),e(this,s).removeEventListener("popoverOpened",e(this,T)),e(this,s).removeEventListener("popoverClosing",e(this,w)),e(this,s).removeEventListener("popoverClosed",e(this,C)))}}s=new WeakMap,b=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",$);exports.PopoverButtonElement=$;exports.PopoverElement=S;
|
package/lib/popover/index.js
CHANGED
|
@@ -1,105 +1,103 @@
|
|
|
1
1
|
var H = (i) => {
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (i, o, t) => (
|
|
4
|
+
var S = (i, o, t) => o.has(i) || H("Cannot " + t);
|
|
5
|
+
var e = (i, o, t) => (S(i, o, "read from private field"), t ? t.call(i) : o.get(i)), n = (i, o, t) => o.has(i) ? H("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, a) => (S(i, o, "write to private field"), a ? a.call(i, t) : o.set(i, t), t), _ = (i, o, t) => (S(i, o, "access private method"), t);
|
|
6
6
|
import { Attribute as O } from "../attribute/index.js";
|
|
7
|
-
import { S as
|
|
7
|
+
import { S as R } from "../Store-C46i0nvr.js";
|
|
8
8
|
import { g as q } from "../style-j2TwriJ_.js";
|
|
9
9
|
import { i as I } from "../browser-0zX67oeU.js";
|
|
10
10
|
import "../ticker/index.js";
|
|
11
|
-
import { e as
|
|
12
|
-
var f,
|
|
11
|
+
import { e as N } from "../tags-zft1DGBz.js";
|
|
12
|
+
var f, c, y, l, d, u, g, $, E, L, M, v;
|
|
13
13
|
const p = class p extends HTMLElement {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
|
-
n(this,
|
|
16
|
+
n(this, g);
|
|
17
17
|
n(this, f);
|
|
18
|
+
n(this, c);
|
|
19
|
+
n(this, y);
|
|
18
20
|
n(this, l);
|
|
19
|
-
n(this,
|
|
20
|
-
n(this, a);
|
|
21
|
+
n(this, d);
|
|
21
22
|
n(this, u);
|
|
22
|
-
n(this, v);
|
|
23
23
|
n(this, E);
|
|
24
24
|
n(this, L);
|
|
25
|
-
n(this,
|
|
26
|
-
h(this, f, -1), h(this,
|
|
27
|
-
if (e(this,
|
|
25
|
+
n(this, v);
|
|
26
|
+
h(this, f, -1), h(this, c, new R(!1)), h(this, l, new O(this, "history", !1)), h(this, d, new O(this, "single", !1)), h(this, u, !1), this.open = (t = !0) => {
|
|
27
|
+
if (e(this, c).current)
|
|
28
28
|
return;
|
|
29
|
-
e(this,
|
|
30
|
-
const
|
|
29
|
+
e(this, c).current = !0, e(this, d).current && (p.__opened.forEach((r) => r.close()), p.__opened = []), p.__opened.push(this), h(this, f, p.__opened.length - 1), e(this, l).current && e(this, u) && history.pushState("", "", e(this, g, $)), clearTimeout(e(this, y)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
|
|
30
|
+
const a = () => {
|
|
31
31
|
addEventListener("click", e(this, E)), addEventListener("keydown", e(this, L)), this.style.opacity = "1", this.classList.add("opened"), this.dispatchEvent(new CustomEvent("popoverOpened"));
|
|
32
32
|
};
|
|
33
|
-
t ? setTimeout(
|
|
33
|
+
t ? setTimeout(a) : a();
|
|
34
34
|
}, this.close = () => {
|
|
35
|
-
if (e(this,
|
|
36
|
-
if (e(this,
|
|
35
|
+
if (e(this, c).current) {
|
|
36
|
+
if (e(this, c).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, l).current) {
|
|
37
37
|
const t = new URL(location.href);
|
|
38
|
-
t.searchParams.delete(
|
|
38
|
+
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
39
39
|
}
|
|
40
40
|
this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, L)), setTimeout(() => {
|
|
41
41
|
this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
|
|
42
42
|
}, q(this) + 10);
|
|
43
43
|
}
|
|
44
44
|
}, h(this, E, (t) => {
|
|
45
|
-
|
|
45
|
+
_(this, g, M).call(this, () => {
|
|
46
46
|
var x;
|
|
47
|
-
const r = t.composedPath()[0],
|
|
48
|
-
(!
|
|
47
|
+
const r = t.composedPath()[0], k = r instanceof HTMLElement && (this.contains(r) || ((x = this.shadowRoot) == null ? void 0 : x.contains(r))), m = r instanceof HTMLElement && r.hasAttribute("outside");
|
|
48
|
+
(!k || m) && this.close();
|
|
49
49
|
});
|
|
50
50
|
}), h(this, L, (t) => {
|
|
51
|
-
|
|
51
|
+
_(this, g, M).call(this, () => {
|
|
52
52
|
t.code === "Escape" && this.close();
|
|
53
53
|
});
|
|
54
|
-
}), h(this,
|
|
55
|
-
h(this,
|
|
54
|
+
}), h(this, v, () => {
|
|
55
|
+
h(this, u, !1), e(this, c).current && e(this, l).current && !location.search.includes(this.id) ? this.close() : !e(this, c).current && e(this, l).current && location.search.includes(this.id) && this.open(), h(this, u, !0);
|
|
56
56
|
}), this.setAttribute("popover-target", "");
|
|
57
57
|
}
|
|
58
58
|
get history() {
|
|
59
|
-
return e(this,
|
|
59
|
+
return e(this, l);
|
|
60
60
|
}
|
|
61
61
|
get single() {
|
|
62
|
-
return e(this,
|
|
62
|
+
return e(this, d);
|
|
63
63
|
}
|
|
64
64
|
get opened() {
|
|
65
|
-
return e(this,
|
|
65
|
+
return e(this, c);
|
|
66
66
|
}
|
|
67
67
|
connectedCallback() {
|
|
68
|
-
e(this,
|
|
69
|
-
e(this,
|
|
68
|
+
e(this, l).observe(), e(this, d).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", e(this, v)), setTimeout(() => {
|
|
69
|
+
e(this, v).call(this);
|
|
70
70
|
}, 0);
|
|
71
71
|
}
|
|
72
72
|
disconnectedCallback() {
|
|
73
|
-
e(this,
|
|
73
|
+
e(this, l).unobserve(), e(this, d).unobserve(), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, v));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
f = new WeakMap(),
|
|
77
|
-
return `${location.pathname}${location.search ? location.search + "&" : "?"}${
|
|
78
|
-
},
|
|
79
|
-
return `modal-${this.id}`;
|
|
80
|
-
}, E = new WeakMap(), L = new WeakMap(), $ = function(t) {
|
|
76
|
+
f = new WeakMap(), c = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakSet(), $ = function() {
|
|
77
|
+
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
78
|
+
}, E = new WeakMap(), L = new WeakMap(), M = function(t) {
|
|
81
79
|
(p.__opened[e(this, f) - 1] || p.__opened.length === 1) && t();
|
|
82
|
-
},
|
|
83
|
-
let
|
|
84
|
-
customElements.get("e-popover") || customElements.define("e-popover",
|
|
85
|
-
var s, b, w, C
|
|
86
|
-
class
|
|
80
|
+
}, v = new WeakMap(), p.__opened = [];
|
|
81
|
+
let A = p;
|
|
82
|
+
customElements.get("e-popover") || customElements.define("e-popover", A);
|
|
83
|
+
var s, T, b, w, C;
|
|
84
|
+
class B extends HTMLElement {
|
|
87
85
|
constructor() {
|
|
88
86
|
super();
|
|
89
87
|
n(this, s);
|
|
90
|
-
n(this,
|
|
88
|
+
n(this, T, () => {
|
|
91
89
|
this.classList.add("triggered");
|
|
92
90
|
});
|
|
93
|
-
n(this,
|
|
91
|
+
n(this, b, () => {
|
|
94
92
|
this.classList.add("opened");
|
|
95
93
|
});
|
|
96
|
-
n(this,
|
|
94
|
+
n(this, w, () => {
|
|
97
95
|
this.classList.remove("opened");
|
|
98
96
|
});
|
|
99
|
-
n(this,
|
|
97
|
+
n(this, C, () => {
|
|
100
98
|
this.classList.remove("triggered");
|
|
101
99
|
});
|
|
102
|
-
I &&
|
|
100
|
+
I && N(this, {
|
|
103
101
|
tabindex: this.getAttribute("tabindex") || "0",
|
|
104
102
|
onClick: () => {
|
|
105
103
|
if (e(this, s)) {
|
|
@@ -116,53 +114,53 @@ class D extends HTMLElement {
|
|
|
116
114
|
return e(this, s);
|
|
117
115
|
}
|
|
118
116
|
connectedCallback() {
|
|
119
|
-
var
|
|
117
|
+
var a;
|
|
120
118
|
const t = this.getAttribute("target");
|
|
121
119
|
if (t) {
|
|
122
120
|
let r = null;
|
|
123
121
|
if (t === "parent") {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
r =
|
|
122
|
+
const k = this.closest("[popover-target]");
|
|
123
|
+
if (k)
|
|
124
|
+
r = k;
|
|
127
125
|
else {
|
|
128
126
|
const m = this.getRootNode();
|
|
129
127
|
m instanceof ShadowRoot ? r = m.host.closest("[popover-target]") : m instanceof HTMLElement && (r = m.closest("[popover-target]"));
|
|
130
128
|
}
|
|
131
|
-
} else t === "sibling" ? r = (
|
|
129
|
+
} else t === "sibling" ? r = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : r = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
132
130
|
r instanceof HTMLElement ? (h(this, s, r), e(this, s).addEventListener(
|
|
133
131
|
"popoverTriggered",
|
|
134
|
-
e(this,
|
|
132
|
+
e(this, T)
|
|
135
133
|
), e(this, s).addEventListener(
|
|
136
134
|
"popoverOpened",
|
|
137
|
-
e(this,
|
|
135
|
+
e(this, b)
|
|
138
136
|
), e(this, s).addEventListener(
|
|
139
137
|
"popoverClosing",
|
|
140
|
-
e(this,
|
|
138
|
+
e(this, w)
|
|
141
139
|
), e(this, s).addEventListener(
|
|
142
140
|
"popoverClosed",
|
|
143
|
-
e(this,
|
|
141
|
+
e(this, C)
|
|
144
142
|
)) : console.warn(this, `target ${t} not found`);
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
disconnectedCallback() {
|
|
148
146
|
e(this, s) && (e(this, s).removeEventListener(
|
|
149
147
|
"popoverTriggered",
|
|
150
|
-
e(this,
|
|
148
|
+
e(this, T)
|
|
151
149
|
), e(this, s).removeEventListener(
|
|
152
150
|
"popoverOpened",
|
|
153
|
-
e(this,
|
|
151
|
+
e(this, b)
|
|
154
152
|
), e(this, s).removeEventListener(
|
|
155
153
|
"popoverClosing",
|
|
156
|
-
e(this,
|
|
154
|
+
e(this, w)
|
|
157
155
|
), e(this, s).removeEventListener(
|
|
158
156
|
"popoverClosed",
|
|
159
|
-
e(this,
|
|
157
|
+
e(this, C)
|
|
160
158
|
));
|
|
161
159
|
}
|
|
162
160
|
}
|
|
163
|
-
s = new WeakMap(),
|
|
164
|
-
customElements.get("e-popover-button") || customElements.define("e-popover-button",
|
|
161
|
+
s = new WeakMap(), T = new WeakMap(), b = new WeakMap(), w = new WeakMap(), C = new WeakMap();
|
|
162
|
+
customElements.get("e-popover-button") || customElements.define("e-popover-button", B);
|
|
165
163
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
B as PopoverButtonElement,
|
|
165
|
+
A as PopoverElement
|
|
168
166
|
};
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var gs=Object.defineProperty;var Ze=Object.getOwnPropertySymbols;var ys=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable;var Je=S=>{throw TypeError(S)};var je=(S,n,s)=>n in S?gs(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,Qe=(S,n)=>{for(var s in n||(n={}))ys.call(n,s)&&je(S,s,n[s]);if(Ze)for(var s of Ze(n))Cs.call(n,s)&&je(S,s,n[s]);return S};var Me=(S,n,s)=>n.has(S)||Je("Cannot "+s);var t=(S,n,s)=>(Me(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>n.has(S)?Je("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,s),r=(S,n,s,e)=>(Me(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s),o=(S,n,s)=>(Me(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rt=require("../Store-BnA-dJsE.cjs"),vs=require("../Derived-B-2UXnVE.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),Ps=require("../easings-DsS5-Kqc.cjs"),kt=require("../layout-8ryRAMGJ.cjs"),Ke=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),ts=require("../Damped-C7WAqKPh.cjs"),ws=require("../Tweened-DSXD0I0k.cjs"),Oe=require("../controls/index.cjs"),pe=require("../window-resizer/index.cjs"),Yt=require("../scroll-entries/index.cjs"),W=require("../tags-v-OSVkiQ.cjs"),Ne=require("../createStylesheet-CaDI99iu.cjs"),Xe=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Es=require("../Viewport-BmLTk_6k.cjs"),qe=require("../element-resizer/index.cjs"),xs=require("../gestures-DHLrn6Q8.cjs"),Ye=require("../theme/index.cjs"),Ls=require("../dom-JBOkFLTh.cjs"),es=require("../function-MthRj-GJ.cjs");var m,me,v,qt,J,dt;class zs{constructor(n,s,e){i(this,m);i(this,me);i(this,v);i(this,qt,0);i(this,J,0);i(this,dt,null);r(this,m,n),r(this,me,s),r(this,v,e),Yt.scrollEntries.register(t(this,m))}get index(){return t(this,me)}get size(){return t(this,qt)}get position(){return t(this,J)}destroy(){Yt.scrollEntries.unregister(t(this,m)),t(this,m).style.transform="",this.mark(null)}setSize(n){n?(t(this,m).style.setProperty("--size",n+"px"),t(this,v).axisCSSProperty.current==="x"?(t(this,m).style.width=n+"px",t(this,m).style.height=""):(t(this,m).style.height=n+"px",t(this,m).style.width="")):(t(this,m).style.width="",t(this,m).style.height="",t(this,m).style.removeProperty("--size"))}resize(){r(this,qt,t(this,v).vertical?t(this,m).offsetHeight:t(this,m).offsetWidth),r(this,J,t(this,v).vertical?kt.getCumulativeOffsetTop(t(this,m)):kt.getCumulativeOffsetLeft(t(this,m))),r(this,J,t(this,J)-t(this,v).contentPosition)}transform(){let n=0;const s=t(this,v).viewportSize*t(this,v).sectionDistanceScaleCSSProperty.current;t(this,v).loopCSSProperty.current&&t(this,v).overscroll&&t(this,J)+t(this,qt)<t(this,v).currentScrollValue&&(n=t(this,v).distance*-1-t(this,v).gap),Yt.scrollEntries.update(t(this,m),t(this,v).axisCSSProperty.current,n);const e=t(this,v).currentScrollValue+n,h=t(this,J)-t(this,v).viewportSize-s,a=t(this,J)+t(this,qt)+s,g=Ke.clamp(e,h,a);t(this,v).vertical?t(this,m).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,m).classList.remove(t(this,dt)),n&&t(this,m).classList.add(n),r(this,dt,n),t(this,m).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}m=new WeakMap,me=new WeakMap,v=new WeakMap,qt=new WeakMap,J=new WeakMap,dt=new WeakMap;const Vs=Ne.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":{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 d,It,k,Q,X,U,Y,pt,ft,G,R,Tt,Mt,At,Bt,se,K,_t,bt,N,mt,tt,gt,Ht,$t,Wt,b,ge,l,ye,Ce,w,y,I,Z,yt,et,z,C,ie,Ct,Ut,Gt,re,st,u,fe,ee,Ae,Be,_e,He,T,ve,ss,he,Pe,$e,Dt,We;class Ie extends HTMLElement{constructor(){super();i(this,u);i(this,d,null);i(this,It,new c.CSSProperty(this,"--controls",!0));i(this,k,new c.CSSProperty(this,"--axis","y"));i(this,Q,new c.CSSProperty(this,"--direction",0));i(this,X,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,U,new c.CSSProperty(this,"--split",!1));i(this,Y,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,G,new c.CSSProperty(this,"--sections-in-view",1));i(this,R,new c.CSSProperty(this,"--loop",!1));i(this,Tt,new c.CSSProperty(this,"--damping",20));i(this,Mt,new c.CSSProperty(this,"--mass",0));i(this,At,new c.CSSProperty(this,"--stiffness",0));i(this,Bt,new c.CSSProperty(this,"--mouse-drag",!1));i(this,se,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,K,new c.CSSProperty(this,"--autoplay",0));i(this,_t,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,N,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,tt,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,Ht,new c.CSSProperty(this,"--focus-duration",3e3));i(this,$t,new c.CSSProperty(this,"--disabled",!1));i(this,Wt,new c.CSSProperty(this,"--hibernated",!1));i(this,b,null);i(this,ge,null);i(this,l,[]);i(this,ye,0);i(this,Ce,0);i(this,w,0);i(this,y,0);i(this,I,0);i(this,Z,null);i(this,yt,null);i(this,et,null);i(this,z,null);i(this,C,new Rt.Store(0));i(this,ie,0);i(this,Ct,0);i(this,Ut,!0);i(this,Gt,!0);i(this,re);i(this,st,new ws.Tweened);i(this,T,()=>{t(this,d).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,y)||0,e=t(this,C).current;if(r(this,ye,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,Ce,this.vertical?kt.getCumulativeOffsetTop(t(this,b)):kt.getCumulativeOffsetLeft(t(this,b))),r(this,w,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,I,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):r(this,I,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,G).current,a=(t(this,w)-t(this,I)*(h-1))/h;t(this,l).forEach(g=>{g.setSize(a)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,X).current){r(this,y,t(this,w)*t(this,X).current);const h=t(this,y)+t(this,w);this.vertical?(t(this,b).style.width=h+"px",t(this,b).style.height="100%"):(t(this,b).style.height=h+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",r(this,y,t(this,b).offsetHeight-t(this,w))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",r(this,y,t(this,b).offsetWidth-t(this,w)));if(!t(this,R).current){const h=getComputedStyle(this),a=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,y,t(this,y)+a),t(this,d).max=t(this,y)}if(t(this,R).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],a=h.position+h.size-t(this,w),g=t(this,y)-a;r(this,Ct,h.position+h.size+g)}else r(this,Ct,t(this,y));if(t(this,Y).current&&t(this,l).length){const h=t(this,l)[e];t(this,d).set(h.position,{equalize:!0})}else t(this,d).set(s*t(this,y),{equalize:!0})});i(this,ve,()=>{const s=this.currentScrollValue;if(r(this,ie,Math.max(0,s-t(this,y))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const a=t(this,l)[h];a.transform(),this.targetScrollValue+a.size/2>=a.position&&(e=h)}t(this,C).current=e}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;Yt.scrollEntries.update(this,t(this,k).current,s)});i(this,he,(s,e)=>{t(this,It).current&&(t(this,bt).current&&(t(this,z).pauseAndContinue(t(this,_t).current),t(this,z).direction=Math.sign(e)||1),t(this,Pe).call(this,s,e))});i(this,Pe,(s,e)=>{if(t(this,Q).current){if(t(this,Q).current<0&&e>0)return;if(t(this,Q).current>0&&e<0)return}if(t(this,st).unlistenAnimationFrame(),!t(this,K).current&&t(this,gt).current&&(clearInterval(t(this,re)),r(this,re,setTimeout(()=>{const h=o(this,u,We).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,Ht).current,easing:Ps.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Es.device.isMobile&&!t(this,Bt).current))if(t(this,Y).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,d).shift(h*t(this,w))}else t(this,d).shift(e)});Ge.isBrowser&&(r(this,d,new ts.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Vs),W.element(this,{tabIndex:0,children:[W.div({class:"static",children:[W.slot({name:"static"})]}),W.div({class:"content",children:[W.slot({ref:e=>r(this,ge,e)})],style:{flexDirection:new vs.Derived(t(this,k),e=>e==="x"?"row":"column")},ref:e=>r(this,b,e)})]}),r(this,Z,new Oe.WheelControls({element:t(this,b)})),t(this,Z).changeEvent.subscribe(t(this,he)),r(this,yt,new Oe.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,he)),r(this,et,new Oe.DragControls({element:t(this,b)})),t(this,et).changeEvent.subscribe(t(this,he)),r(this,z,new Oe.AutoplayControls({culling:this})),t(this,z).changeEvent.subscribe(t(this,Pe)),t(this,k).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,Z).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,et).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,T).call(this)}),t(this,ft).subscribe(e=>{t(this,Z).axis=e.current?"max":t(this,k).current}),t(this,X).subscribe(()=>{this.isConnected&&t(this,T).call(this)}),t(this,U).subscribe(({current:e})=>{this.isConnected&&(e?o(this,u,fe).call(this):o(this,u,ee).call(this))}),t(this,Y).subscribe(e=>{t(this,Z).debounce=e.current,t(this,et).swipe=e.current,t(this,z).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,T).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,G).subscribe(e=>{this.isConnected&&(t(this,T).call(this),o(this,u,Dt).call(this))}),t(this,R).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,U).current=!0)),t(this,l).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(r(this,ie,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Tt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Mt).subscribe(e=>{t(this,d).mass=e.current}),t(this,At).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,$t).subscribe(e=>{e.current&&!e.previous?o(this,u,Ae).call(this):!e.current&&e.previous&&o(this,u,Be).call(this)}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,u,_e).call(this):!e.current&&e.previous&&o(this,u,He).call(this)}),t(this,K).subscribe(e=>{t(this,z).speed=e.current,e.current&&!e.previous?t(this,z).connect():!e.current&&e.previous&&t(this,z).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,z).direction=1)}),t(this,N).subscribe(e=>{this.isConnected&&o(this,u,Dt).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,tt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,C).subscribe(e=>{t(this,l).length&&o(this,u,Dt).call(this)}),t(this,st).subscribe(e=>{t(this,st).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,It)}get axisCSSProperty(){return t(this,k)}get directionCSSProperty(){return t(this,Q)}get pagesCSSProperty(){return t(this,X)}get splitCSSProperty(){return t(this,U)}get sectionalCSSProperty(){return t(this,Y)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,G)}get loopCSSProperty(){return t(this,R)}get dampingCSSProperty(){return t(this,Tt)}get massCSSProperty(){return t(this,Mt)}get stiffnessCSSProperty(){return t(this,At)}get mouseDragCSSProperty(){return t(this,Bt)}get sectionDistanceScaleCSSProperty(){return t(this,se)}get autoplayCSSProperty(){return t(this,K)}get autoplayPauseDurationCSSProperty(){return t(this,_t)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,N)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,tt)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,Ht)}get disabledCSSProperty(){return t(this,$t)}get hibernatedCSSProperty(){return t(this,Wt)}get currentScrollValue(){return o(this,u,$e).call(this,"current")}get targetScrollValue(){return o(this,u,$e).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,l)}get position(){return t(this,ye)}get contentPosition(){return t(this,Ce)}get viewportSize(){return t(this,w)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,C)}get limit(){return t(this,l).length-t(this,G).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,R).current?t(this,Ct)+t(this,I):t(this,Ct)}get overscroll(){return t(this,ie)}get vertical(){return t(this,k).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,k).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,k).current==="x"?0:t(this,d).distance}onScroll(...s){return t(this,d).subscribe(...s)}offScroll(...s){t(this,d).unsubscribe(...s)}range(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress<a?0:this.currentProgress>g?1:(this.currentProgress-a)/(g-a)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress>=a&&this.currentProgress<=g}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,C).current;o(this,u,ss).call(this,s);const a=t(this,l)[h],g=t(this,l)[t(this,C).current];if(a&&g){let q=0;const te=o(this,u,We).call(this),ms=te?this.targetScrollValue-te.position:0;t(this,R).current?t(this,C).current===0&&h===t(this,l).length-1?q=t(this,y)+t(this,w)-a.position+t(this,I):t(this,C).current===t(this,l).length-1&&h===0?q=g.position-(t(this,y)+t(this,w)+t(this,I)):q=g.position-a.position:q=g.position-a.position,this.shiftPosition(q-ms,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,C).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,st).set(t(this,d).current,{equalize:!0}),t(this,st).set(s,Qe({},e.tween))):t(this,d).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,d).target+s,e)}connectedCallback(){t(this,It).observe(),t(this,k).observe(),t(this,Q).observe(),t(this,X).observe(),t(this,U).observe(),t(this,Y).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,G).observe(),t(this,R).observe(),t(this,Tt).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,se).observe(),t(this,K).observe(),t(this,K).observe(),t(this,_t).observe(),t(this,bt).observe(),t(this,N).observe(),t(this,mt).observe(),t(this,tt).observe(),t(this,gt).observe(),t(this,Ht).observe(),t(this,$t).observe(),t(this,Wt).observe(),o(this,u,He).call(this)}disconnectedCallback(){t(this,It).unobserve(),t(this,k).unobserve(),t(this,Q).unobserve(),t(this,X).unobserve(),t(this,U).unobserve(),t(this,Y).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,Tt).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,se).unobserve(),t(this,K).unobserve(),t(this,_t).unobserve(),t(this,bt).unobserve(),t(this,N).unobserve(),t(this,mt).unobserve(),t(this,tt).unobserve(),t(this,gt).unobserve(),t(this,Ht).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),o(this,u,_e).call(this)}}d=new WeakMap,It=new WeakMap,k=new WeakMap,Q=new WeakMap,X=new WeakMap,U=new WeakMap,Y=new WeakMap,pt=new WeakMap,ft=new WeakMap,G=new WeakMap,R=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,se=new WeakMap,K=new WeakMap,_t=new WeakMap,bt=new WeakMap,N=new WeakMap,mt=new WeakMap,tt=new WeakMap,gt=new WeakMap,Ht=new WeakMap,$t=new WeakMap,Wt=new WeakMap,b=new WeakMap,ge=new WeakMap,l=new WeakMap,ye=new WeakMap,Ce=new WeakMap,w=new WeakMap,y=new WeakMap,I=new WeakMap,Z=new WeakMap,yt=new WeakMap,et=new WeakMap,z=new WeakMap,C=new WeakMap,ie=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,re=new WeakMap,st=new WeakMap,u=new WeakSet,fe=function(){o(this,u,ee).call(this),t(this,ge).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new zs(s,e,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,T).call(this),o(this,u,Dt).call(this)},ee=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,C).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},Ae=function(){t(this,Ut)||(r(this,Ut,!0),t(this,d).unsubscribe(t(this,ve)),t(this,d).unlistenAnimationFrame(),t(this,Z).disconnect(),t(this,yt).disconnect(),t(this,et).disconnect(),t(this,z).disconnect(),clearInterval(t(this,re)),t(this,st).unlistenAnimationFrame())},Be=function(){t(this,Ut)&&(r(this,Ut,!1),t(this,d).subscribe(t(this,ve)),t(this,Z).connect(),t(this,yt).connect(),t(this,et).connect(),t(this,K).current&&t(this,z).connect())},_e=function(){t(this,Gt)||(r(this,Gt,!0),pe.windowResizer.unsubscribe(t(this,T)),qe.elementResizer.unsubscribe(t(this,T)),t(this,d).reset(),o(this,u,Ae).call(this),t(this,b).style.transform="",t(this,U).current&&o(this,u,ee).call(this),Yt.scrollEntries.unregister(this))},He=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,U).current&&o(this,u,fe).call(this),Yt.scrollEntries.register(this),pe.windowResizer.subscribe(t(this,T),be.RESIZE_ORDER.SCROLL),qe.elementResizer.subscribe(this,t(this,T)),o(this,u,Be).call(this))},T=new WeakMap,ve=new WeakMap,ss=function(s){t(this,R).current?(t(this,C).current=s%t(this,l).length,t(this,C).current=t(this,C).current<0?t(this,l).length+t(this,C).current:t(this,C).current):t(this,C).current=Ke.clamp(s,0,this.limit)},he=new WeakMap,Pe=new WeakMap,$e=function(s="current"){if(t(this,R).current&&t(this,l).length){const e=t(this,d)[s]%(t(this,y)+t(this,w)+t(this,I));return e<0?t(this,y)+e+t(this,w)+t(this,I):e}else return t(this,d)[s]},Dt=function(){if(t(this,N).current&&t(this,l).length){const s=t(this,C).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,G).current+t(this,tt).current;t(this,l).forEach((h,a)=>{const g=s-this.limit-1+t(this,tt).current,q=s+e,te=this.sections.length-q;a>=s&&a<q||a<=g?h.mark("current"):a>=q&&a<q+te/2||a<=g+e?h.mark("next"):h.mark("previous")})}},We=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const a=Math.abs(t(this,l)[h].position-this.targetScrollValue);a<e&&(e=a,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ie);var we;class Te extends HTMLElement{constructor(){super(...arguments);i(this,we,null)}get scrollElement(){return t(this,we)}connectedCallback(){const s=Ls.findParentElement(this,Ie);s instanceof Ie?r(this,we,s):console.error(this,"e-scroll not found")}}we=new WeakMap;const Fs=Ne.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:Ye.aptechkaTheme.colorFont.var},':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:Ye.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ne,D,it,rt,oe,ce,Kt,Ee,xe,Le;class is extends Te{constructor(){super();i(this,ne,null);i(this,D,null);i(this,it,!1);i(this,rt,0);i(this,oe,0);i(this,ce,0);i(this,Kt,()=>{r(this,it,this.offsetWidth>this.offsetHeight);const s=t(this,it)?this.offsetWidth:this.offsetHeight;r(this,rt,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,rt,Math.max(t(this,rt),30)),t(this,it)?(t(this,D).style.width=t(this,rt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,rt)+"px"),r(this,oe,s-t(this,rt)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,Ee,()=>{r(this,ce,this.scrollElement.currentProgress*t(this,oe)),t(this,it)?t(this,D).style.transform=`translate3d(${t(this,ce)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,ce)}px, 0px)`});i(this,xe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Le,s=>{document.documentElement.classList.add("grabbing"),xs.setupDrag(a=>{const g=t(this,it)?a.x:a.y,q=this.scrollElement.distance/t(this,oe),te=(g-h)*q;this.scrollElement.setPosition(e+te)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,it)?s.x:s.y});Ge.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Fs),W.element(this,{slot:"static","drag-dead-zone":"",children:[W.slot({ref:e=>r(this,ne,e),children:W.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback();const s=t(this,ne).assignedElements()[0]||t(this,ne).firstElementChild;r(this,D,s),t(this,D).addEventListener("pointerdown",t(this,Le)),pe.windowResizer.subscribe(t(this,Kt),be.RESIZE_ORDER.SCROLL+1),qe.elementResizer.subscribe(this,t(this,Kt)),this.scrollElement.onScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.subscribe(t(this,xe))}disconnectedCallback(){t(this,D).removeEventListener("pointerdown",t(this,Le)),pe.windowResizer.unsubscribe(t(this,Kt)),qe.elementResizer.unsubscribe(t(this,Kt)),this.scrollElement.offScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,xe))}}ne=new WeakMap,D=new WeakMap,it=new WeakMap,rt=new WeakMap,oe=new WeakMap,ce=new WeakMap,Kt=new WeakMap,Ee=new WeakMap,xe=new WeakMap,Le=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",is);const ks=Ne.createStylesheet({button:{all:"inherit"}});class rs extends Te{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ks),Ge.isBrowser&&W.element(this,{children:[W.button({onClick:()=>{this.handleClick()},children:[W.slot()]})]})}}class hs extends rs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",hs);class ns extends rs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ns);var ht,vt,le,ze,Ve,ue;class Rs{constructor(n,s,e){i(this,ht);i(this,vt);i(this,le);i(this,ze);i(this,Ve,()=>{t(this,vt).scrollToSection(t(this,le),{behaviour:t(this,ze)})});i(this,ue,()=>{t(this,ht).classList.toggle("current",t(this,vt).counter.current===t(this,le))});r(this,ht,document.createElement("button")),r(this,vt,n),r(this,ze,e),r(this,le,s),t(this,ht).addEventListener("click",t(this,Ve)),t(this,vt).counter.subscribe(t(this,ue)),t(this,ue).call(this)}get element(){return t(this,ht)}destroy(){t(this,ht).removeEventListener("click",t(this,Ve)),t(this,vt).counter.unsubscribe(t(this,ue)),t(this,ht).remove()}}ht=new WeakMap,vt=new WeakMap,le=new WeakMap,ze=new WeakMap,Ve=new WeakMap,ue=new WeakMap;var Pt,ae;class os extends Te{constructor(){super(...arguments);i(this,Pt,[]);i(this,ae,es.debounce(()=>{t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Rs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,Pt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,ae)),t(this,ae).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,ae)),t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[])}}Pt=new WeakMap,ae=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",os);var Nt,Zt,jt,Jt,wt,Et,xt,Lt,V,M,A,B,zt,E,nt,ot,ct,lt,ut,x,_,H,at,St,j,Fe,p,Qt,Xt,ke,L,Vt,O,F,$,Se,Ft,P,f,ls,us,as,Ss,ds,ps,Re,de,Ot,fs,bs,Ue,De;class cs extends Te{constructor(){super();i(this,f);i(this,Nt,new c.CSSProperty(this,"--damping",20));i(this,Zt,new c.CSSProperty(this,"--mass",0));i(this,jt,new c.CSSProperty(this,"--stiffness",0));i(this,Jt,new c.CSSProperty(this,"--target",""));i(this,wt,new c.CSSProperty(this,"--disabled",!1));i(this,Et,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,xt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--capture-once",!1));i(this,V,new c.CSSProperty(this,"--captured",""));i(this,M,new c.CSSProperty(this,"--released",""));i(this,A,new c.CSSProperty(this,"--captured-from-start",""));i(this,B,new c.CSSProperty(this,"--captured-from-finish",""));i(this,zt,new c.CSSProperty(this,"--released-from-start",""));i(this,E,new c.CSSProperty(this,"--released-from-finish",""));i(this,nt,new c.CSSProperty(this,"--passed-var",""));i(this,ot,new c.CSSProperty(this,"--progress-var",""));i(this,ct,new c.CSSProperty(this,"--distance-var",""));i(this,lt,new c.CSSProperty(this,"--start-var",""));i(this,ut,new c.CSSProperty(this,"--finish-var",""));i(this,x,new Rt.Store(!1));i(this,_,new Rt.Store(!1));i(this,H,new Rt.Store(!1));i(this,at,new Rt.Store(!1));i(this,St,new Rt.Store(!1));i(this,j,new Rt.Store(!1));i(this,Fe,[]);i(this,p,this);i(this,Qt,0);i(this,Xt,0);i(this,ke,0);i(this,L,new ts.Damped(0,{order:be.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Vt,0);i(this,O,0);i(this,F,0);i(this,$,0);i(this,Se,!1);i(this,Ft,!1);i(this,P,!0);i(this,Re,()=>{t(this,P)||(this.resize(),t(this,de).call(this))});i(this,de,()=>{!t(this,P)&&t(this,Se)&&this.tick()});i(this,De,es.debounce(()=>{const s=Yt.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,a)=>{h.element===this.scrollElement&&(e=a)}),r(this,Fe,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,Et)}get startOffsetCSSProperty(){return t(this,xt)}get captureOnceCSSProperty(){return t(this,Lt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,M)}get capturedFromStartCSSProperty(){return t(this,A)}get capturedFromFinishCSSProperty(){return t(this,B)}get releasedFromStartCSSProperty(){return t(this,zt)}get releasedFromFinishCSSProperty(){return t(this,E)}get passedVarCSSProperty(){return t(this,nt)}get progressVarCSSProperty(){return t(this,ot)}get distanceVarCSSProperty(){return t(this,ct)}get startVarCSSProperty(){return t(this,lt)}get finishVarCSSProperty(){return t(this,ut)}get disabledCSSProperty(){return t(this,wt)}get dampingCSSProperty(){return t(this,Nt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,jt)}get targetCSSProperty(){return t(this,Jt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,_)}get isCapturedFromStart(){return t(this,H)}get isReleasedFromStart(){return t(this,at)}get isCapturedFromFinish(){return t(this,St)}get isReleasedFromFinish(){return t(this,j)}get directionPosition(){return t(this,Qt)}get directionSize(){return t(this,Xt)}get passed(){return t(this,L)}get progress(){return t(this,Vt)}get start(){return t(this,O)}get finish(){return t(this,$)}get distance(){return t(this,F)}get isCapturedOnce(){return t(this,Ft)}get isDisabled(){return t(this,P)}resize(){r(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Qt,this.scrollElement.vertical?kt.getCumulativeOffsetTop(this,this.scrollElement):kt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,O,this.getStart()),r(this,F,this.getDistance()),r(this,O,t(this,O)+t(this,xt).current),r(this,F,t(this,F)+t(this,Et).current),r(this,$,t(this,O)+t(this,F)),this.scrollElement.currentScrollValue>t(this,$)&&!t(this,x).current&&!t(this,_).current&&(t(this,x).current=!0),this.setVar(t(this,lt).current,t(this,O)),this.setVar(t(this,ut).current,t(this,$)),this.setVar(t(this,ct).current,t(this,F)),t(this,L).max=t(this,F),r(this,Se,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Fe).forEach(h=>{s+=h.value}),t(this,L).set(s-t(this,O));const e=Math.round(s);t(this,x).current&&(e>t(this,O)?t(this,H).current||o(this,f,as).call(this):t(this,H).current&&!t(this,at).current&&o(this,f,ds).call(this),e<t(this,$)?t(this,j).current&&!t(this,St).current&&o(this,f,Ss).call(this):t(this,H).current&&!t(this,j).current&&o(this,f,ps).call(this)),e>t(this,O)&&e<t(this,$)?t(this,x).current||o(this,f,ls).call(this):t(this,x).current&&(t(this,L).set(Ke.step(t(this,F)/2,t(this,L).current,0,t(this,F))),o(this,f,us).call(this)),t(this,Ft)&&t(this,Lt).current&&(t(this,V).current&&t(this,p).classList.add(t(this,V).current),r(this,P,!0))}disable(){this.style.cssText="",r(this,Qt,0),r(this,Xt,0),t(this,L).reset(),r(this,Vt,0),r(this,O,0),r(this,F,0),r(this,$,0),r(this,Se,!1),t(this,x).current=!1,t(this,_).current=!1,t(this,H).current=!1,t(this,at).current=!1,t(this,St).current=!1,t(this,j).current=!1,r(this,Ft,!1),r(this,P,!0),o(this,f,Ue).call(this)}enable(){r(this,P,!1)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Jt).observe(),t(this,wt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,V).observe(),t(this,M).observe(),t(this,A).observe(),t(this,B).observe(),t(this,zt).observe(),t(this,E).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe(),t(this,ut).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,De)),t(this,De).call(this),t(this,wt).current||this.enable(),t(this,Nt).subscribe(e=>{t(this,L).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,L).mass=e.current}),t(this,jt).subscribe(e=>{t(this,L).stiffness=e.current}),t(this,Jt).subscribe(e=>{e.previous&&o(this,f,Ue).call(this),e.current?e.current==="parent"?r(this,p,this.parentElement||this):r(this,p,document.querySelector(e.current)||this):r(this,p,this)}),t(this,wt).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,xt).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,Et).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,V).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,A).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,B).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,M).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,zt).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,E).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,Lt).subscribe(e=>{t(this,P)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,nt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,ot).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Vt)))}),t(this,lt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,O)))}),t(this,ut).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,$)))}),t(this,ct).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,F)))}),t(this,L).subscribe(e=>{r(this,Vt,t(this,L).current/t(this,F)||0),this.setVar(t(this,nt).current,t(this,L).current.toFixed(6)),this.setVar(t(this,ot).current,t(this,Vt).toFixed(6))}),pe.windowResizer.subscribe(t(this,Re),be.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,de)),s=!0}disconnectedCallback(){pe.windowResizer.unsubscribe(t(this,Re)),this.scrollElement.offScroll(t(this,de)),t(this,Nt).close(),t(this,Zt).close(),t(this,jt).close(),t(this,Jt).close(),t(this,wt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,V).close(),t(this,M).close(),t(this,A).close(),t(this,B).close(),t(this,zt).close(),t(this,E).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,ut).close(),t(this,x).close(),t(this,_).close(),t(this,H).close(),t(this,at).close(),t(this,St).close(),t(this,j).close(),this.disable()}removeVar(s){s&&t(this,p).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,p).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,Xt)+t(this,ke)}getStart(){return t(this,Qt)-t(this,ke)}}Nt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,wt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,V=new WeakMap,M=new WeakMap,A=new WeakMap,B=new WeakMap,zt=new WeakMap,E=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,ut=new WeakMap,x=new WeakMap,_=new WeakMap,H=new WeakMap,at=new WeakMap,St=new WeakMap,j=new WeakMap,Fe=new WeakMap,p=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,ke=new WeakMap,L=new WeakMap,Vt=new WeakMap,O=new WeakMap,F=new WeakMap,$=new WeakMap,Se=new WeakMap,Ft=new WeakMap,P=new WeakMap,f=new WeakSet,ls=function(){t(this,x).current=!0,t(this,_).current=!1,r(this,Ft,!0),t(this,M).current&&t(this,p).classList.remove(t(this,M).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,V).current&&t(this,p).classList.add(t(this,V).current)},us=function(){t(this,_).current=!0,t(this,x).current=!1,r(this,Ft,!0),t(this,V).current&&t(this,p).classList.remove(t(this,V).current),t(this,A).current&&t(this,p).classList.remove(t(this,A).current),t(this,B).current&&t(this,p).classList.remove(t(this,B).current),t(this,M).current&&t(this,p).classList.add(t(this,M).current)},as=function(){t(this,x).current=!0,t(this,H).current=!0,t(this,at).current=!1,t(this,A).current&&t(this,p).classList.add(t(this,A).current)},Ss=function(){t(this,x).current=!0,t(this,St).current=!0,t(this,j).current=!1,t(this,B).current&&t(this,p).classList.add(t(this,B).current)},ds=function(){t(this,_).current=!0,t(this,at).current=!0,t(this,H).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},ps=function(){t(this,_).current=!0,t(this,j).current=!0,t(this,St).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},Re=new WeakMap,de=new WeakMap,Ot=function(s){if(t(this,P)){s.previous&&t(this,p).classList.remove(s.previous),s.current&&t(this,p).classList.remove(s.current);return}s.current&&t(this,x).current?(s.previous&&t(this,p).classList.remove(s.previous),t(this,p).classList.add(s.current)):!s.current&&s.previous&&t(this,p).classList.remove(s.previous)},fs=function(...s){s.forEach(e=>{e&&t(this,p).classList.remove(e)})},bs=function(...s){s.forEach(e=>{e&&t(this,p).style.removeProperty(`--${e}`)})},Ue=function(){o(this,f,fs).call(this,t(this,V).current,t(this,A).current,t(this,B).current,t(this,M).current,t(this,zt).current,t(this,E).current),o(this,f,bs).call(this,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current,t(this,ut).current)},De=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",cs);exports.ScrollBulletButtonsElement=os;exports.ScrollElement=Ie;exports.ScrollSegmentElement=cs;exports.ScrollSetButtonElement=hs;exports.ScrollStepButtonElement=ns;exports.ScrollbarElement=is;
|
|
1
|
+
"use strict";var ms=Object.defineProperty;var Ze=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var Je=S=>{throw TypeError(S)};var je=(S,n,s)=>n in S?ms(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,Qe=(S,n)=>{for(var s in n||(n={}))gs.call(n,s)&&je(S,s,n[s]);if(Ze)for(var s of Ze(n))ys.call(n,s)&&je(S,s,n[s]);return S};var Me=(S,n,s)=>n.has(S)||Je("Cannot "+s);var t=(S,n,s)=>(Me(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>n.has(S)?Je("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,s),r=(S,n,s,e)=>(Me(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s),o=(S,n,s)=>(Me(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rt=require("../Store-npaZHvX4.cjs"),Cs=require("../Derived-BIBU-y7Z.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),vs=require("../easings-DsS5-Kqc.cjs"),kt=require("../layout-8ryRAMGJ.cjs"),Ke=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),Ye=require("../Damped-DYJ6Z0xo.cjs"),Ps=require("../Tweened-BkkD9s4n.cjs"),Oe=require("../controls/index.cjs"),pe=require("../window-resizer/index.cjs"),Yt=require("../scroll-entries/index.cjs"),W=require("../tags-6_ETuR75.cjs"),Ne=require("../createStylesheet-Csfmh-MH.cjs"),Xe=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),ws=require("../Viewport-Cv4TRGiv.cjs"),Ie=require("../element-resizer/index.cjs"),Es=require("../gestures-DHLrn6Q8.cjs"),xs=require("../dom-JBOkFLTh.cjs"),ts=require("../function-MthRj-GJ.cjs");var m,me,v,It,J,dt;class Ls{constructor(n,s,e){i(this,m);i(this,me);i(this,v);i(this,It,0);i(this,J,0);i(this,dt,null);r(this,m,n),r(this,me,s),r(this,v,e),Yt.scrollEntries.register(t(this,m))}get index(){return t(this,me)}get size(){return t(this,It)}get position(){return t(this,J)}destroy(){Yt.scrollEntries.unregister(t(this,m)),t(this,m).style.transform="",this.mark(null)}setSize(n){n?(t(this,m).style.setProperty("--size",n+"px"),t(this,v).axisCSSProperty.current==="x"?(t(this,m).style.width=n+"px",t(this,m).style.height=""):(t(this,m).style.height=n+"px",t(this,m).style.width="")):(t(this,m).style.width="",t(this,m).style.height="",t(this,m).style.removeProperty("--size"))}resize(){r(this,It,t(this,v).vertical?t(this,m).offsetHeight:t(this,m).offsetWidth),r(this,J,t(this,v).vertical?kt.getCumulativeOffsetTop(t(this,m)):kt.getCumulativeOffsetLeft(t(this,m))),r(this,J,t(this,J)-t(this,v).contentPosition)}transform(){let n=0;const s=t(this,v).viewportSize*t(this,v).sectionDistanceScaleCSSProperty.current;t(this,v).loopCSSProperty.current&&t(this,v).overscroll&&t(this,J)+t(this,It)<t(this,v).currentScrollValue&&(n=t(this,v).distance*-1-t(this,v).gap),Yt.scrollEntries.update(t(this,m),t(this,v).axisCSSProperty.current,n);const e=t(this,v).currentScrollValue+n,h=t(this,J)-t(this,v).viewportSize-s,a=t(this,J)+t(this,It)+s,g=Ke.clamp(e,h,a);t(this,v).vertical?t(this,m).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,m).classList.remove(t(this,dt)),n&&t(this,m).classList.add(n),r(this,dt,n),t(this,m).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}m=new WeakMap,me=new WeakMap,v=new WeakMap,It=new WeakMap,J=new WeakMap,dt=new WeakMap;const zs=Ne.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":{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 d,qt,k,Q,X,U,Y,pt,ft,G,R,Tt,Mt,At,Bt,se,K,_t,bt,N,mt,tt,gt,Ht,$t,Wt,b,ge,l,ye,Ce,w,y,q,Z,yt,et,z,C,ie,Ct,Ut,Gt,re,st,u,fe,ee,Ae,Be,_e,He,T,ve,es,he,Pe,$e,Dt,We;class qe extends HTMLElement{constructor(){super();i(this,u);i(this,d,null);i(this,qt,new c.CSSProperty(this,"--controls",!0));i(this,k,new c.CSSProperty(this,"--axis","y"));i(this,Q,new c.CSSProperty(this,"--direction",0));i(this,X,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,U,new c.CSSProperty(this,"--split",!1));i(this,Y,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,G,new c.CSSProperty(this,"--sections-in-view",1));i(this,R,new c.CSSProperty(this,"--loop",!1));i(this,Tt,new c.CSSProperty(this,"--damping",20));i(this,Mt,new c.CSSProperty(this,"--mass",0));i(this,At,new c.CSSProperty(this,"--stiffness",0));i(this,Bt,new c.CSSProperty(this,"--mouse-drag",!1));i(this,se,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,K,new c.CSSProperty(this,"--autoplay",0));i(this,_t,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,N,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,tt,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,Ht,new c.CSSProperty(this,"--focus-duration",3e3));i(this,$t,new c.CSSProperty(this,"--disabled",!1));i(this,Wt,new c.CSSProperty(this,"--hibernated",!1));i(this,b,null);i(this,ge,null);i(this,l,[]);i(this,ye,0);i(this,Ce,0);i(this,w,0);i(this,y,0);i(this,q,0);i(this,Z,null);i(this,yt,null);i(this,et,null);i(this,z,null);i(this,C,new Rt.Store(0));i(this,ie,0);i(this,Ct,0);i(this,Ut,!0);i(this,Gt,!0);i(this,re);i(this,st,new Ps.Tweened);i(this,T,()=>{t(this,d).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,y)||0,e=t(this,C).current;if(r(this,ye,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,Ce,this.vertical?kt.getCumulativeOffsetTop(t(this,b)):kt.getCumulativeOffsetLeft(t(this,b))),r(this,w,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,q,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):r(this,q,Xe.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,G).current,a=(t(this,w)-t(this,q)*(h-1))/h;t(this,l).forEach(g=>{g.setSize(a)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,X).current){r(this,y,t(this,w)*t(this,X).current);const h=t(this,y)+t(this,w);this.vertical?(t(this,b).style.width=h+"px",t(this,b).style.height="100%"):(t(this,b).style.height=h+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",r(this,y,t(this,b).offsetHeight-t(this,w))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",r(this,y,t(this,b).offsetWidth-t(this,w)));if(!t(this,R).current){const h=getComputedStyle(this),a=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,y,t(this,y)+a),t(this,d).max=t(this,y)}if(t(this,R).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],a=h.position+h.size-t(this,w),g=t(this,y)-a;r(this,Ct,h.position+h.size+g)}else r(this,Ct,t(this,y));if(t(this,Y).current&&t(this,l).length){const h=t(this,l)[e];t(this,d).set(h.position,{equalize:!0})}else t(this,d).set(s*t(this,y),{equalize:!0})});i(this,ve,()=>{const s=this.currentScrollValue;if(r(this,ie,Math.max(0,s-t(this,y))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const a=t(this,l)[h];a.transform(),this.targetScrollValue+a.size/2>=a.position&&(e=h)}t(this,C).current=e}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;Yt.scrollEntries.update(this,t(this,k).current,s)});i(this,he,(s,e)=>{t(this,qt).current&&(t(this,bt).current&&(t(this,z).pauseAndContinue(t(this,_t).current),t(this,z).direction=Math.sign(e)||1),t(this,Pe).call(this,s,e))});i(this,Pe,(s,e)=>{if(t(this,Q).current){if(t(this,Q).current<0&&e>0)return;if(t(this,Q).current>0&&e<0)return}if(t(this,st).unlistenAnimationFrame(),!t(this,K).current&&t(this,gt).current&&(clearInterval(t(this,re)),r(this,re,setTimeout(()=>{const h=o(this,u,We).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,Ht).current,easing:vs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!ws.device.isMobile&&!t(this,Bt).current))if(t(this,Y).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,d).shift(h*t(this,w))}else t(this,d).shift(e)});Ge.isBrowser&&(r(this,d,new Ye.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(zs),W.element(this,{tabIndex:0,children:[W.div({class:"static",children:[W.slot({name:"static"})]}),W.div({class:"content",children:[W.slot({ref:e=>r(this,ge,e)})],style:{flexDirection:new Cs.Derived(t(this,k),e=>e==="x"?"row":"column")},ref:e=>r(this,b,e)})]}),r(this,Z,new Oe.WheelControls({element:t(this,b)})),t(this,Z).changeEvent.subscribe(t(this,he)),r(this,yt,new Oe.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,he)),r(this,et,new Oe.DragControls({element:t(this,b)})),t(this,et).changeEvent.subscribe(t(this,he)),r(this,z,new Oe.AutoplayControls({culling:this})),t(this,z).changeEvent.subscribe(t(this,Pe)),t(this,k).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,Z).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,et).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,T).call(this)}),t(this,ft).subscribe(e=>{t(this,Z).axis=e.current?"max":t(this,k).current}),t(this,X).subscribe(()=>{this.isConnected&&t(this,T).call(this)}),t(this,U).subscribe(({current:e})=>{this.isConnected&&(e?o(this,u,fe).call(this):o(this,u,ee).call(this))}),t(this,Y).subscribe(e=>{t(this,Z).debounce=e.current,t(this,et).swipe=e.current,t(this,z).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,T).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,u,fe).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,G).subscribe(e=>{this.isConnected&&(t(this,T).call(this),o(this,u,Dt).call(this))}),t(this,R).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,U).current=!0)),t(this,l).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(r(this,ie,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Tt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Mt).subscribe(e=>{t(this,d).mass=e.current}),t(this,At).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,$t).subscribe(e=>{e.current&&!e.previous?o(this,u,Ae).call(this):!e.current&&e.previous&&o(this,u,Be).call(this)}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,u,_e).call(this):!e.current&&e.previous&&o(this,u,He).call(this)}),t(this,K).subscribe(e=>{t(this,z).speed=e.current,e.current&&!e.previous?t(this,z).connect():!e.current&&e.previous&&t(this,z).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,z).direction=1)}),t(this,N).subscribe(e=>{this.isConnected&&o(this,u,Dt).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,tt).subscribe(e=>{this.isConnected&&t(this,N).current&&o(this,u,Dt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,C).subscribe(e=>{t(this,l).length&&o(this,u,Dt).call(this)}),t(this,st).subscribe(e=>{t(this,st).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,qt)}get axisCSSProperty(){return t(this,k)}get directionCSSProperty(){return t(this,Q)}get pagesCSSProperty(){return t(this,X)}get splitCSSProperty(){return t(this,U)}get sectionalCSSProperty(){return t(this,Y)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,G)}get loopCSSProperty(){return t(this,R)}get dampingCSSProperty(){return t(this,Tt)}get massCSSProperty(){return t(this,Mt)}get stiffnessCSSProperty(){return t(this,At)}get mouseDragCSSProperty(){return t(this,Bt)}get sectionDistanceScaleCSSProperty(){return t(this,se)}get autoplayCSSProperty(){return t(this,K)}get autoplayPauseDurationCSSProperty(){return t(this,_t)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,N)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,tt)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,Ht)}get disabledCSSProperty(){return t(this,$t)}get hibernatedCSSProperty(){return t(this,Wt)}get currentScrollValue(){return o(this,u,$e).call(this,"current")}get targetScrollValue(){return o(this,u,$e).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,l)}get position(){return t(this,ye)}get contentPosition(){return t(this,Ce)}get viewportSize(){return t(this,w)}get scrollSize(){return t(this,y)}get gap(){return t(this,q)}get counter(){return t(this,C)}get limit(){return t(this,l).length-t(this,G).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,R).current?t(this,Ct)+t(this,q):t(this,Ct)}get overscroll(){return t(this,ie)}get vertical(){return t(this,k).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,k).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,k).current==="x"?0:t(this,d).distance}onScroll(...s){return t(this,d).subscribe(...s)}offScroll(...s){t(this,d).unsubscribe(...s)}range(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress<a?0:this.currentProgress>g?1:(this.currentProgress-a)/(g-a)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const a=s-h,g=a+e+h*2;return this.currentProgress>=a&&this.currentProgress<=g}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,C).current;o(this,u,es).call(this,s);const a=t(this,l)[h],g=t(this,l)[t(this,C).current];if(a&&g){let I=0;const te=o(this,u,We).call(this),bs=te?this.targetScrollValue-te.position:0;t(this,R).current?t(this,C).current===0&&h===t(this,l).length-1?I=t(this,y)+t(this,w)-a.position+t(this,q):t(this,C).current===t(this,l).length-1&&h===0?I=g.position-(t(this,y)+t(this,w)+t(this,q)):I=g.position-a.position:I=g.position-a.position,this.shiftPosition(I-bs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,C).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,st).set(t(this,d).current,{equalize:!0}),t(this,st).set(s,Qe({},e.tween))):t(this,d).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,d).target+s,e)}connectedCallback(){t(this,qt).observe(),t(this,k).observe(),t(this,Q).observe(),t(this,X).observe(),t(this,U).observe(),t(this,Y).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,G).observe(),t(this,R).observe(),t(this,Tt).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,se).observe(),t(this,K).observe(),t(this,K).observe(),t(this,_t).observe(),t(this,bt).observe(),t(this,N).observe(),t(this,mt).observe(),t(this,tt).observe(),t(this,gt).observe(),t(this,Ht).observe(),t(this,$t).observe(),t(this,Wt).observe(),o(this,u,He).call(this)}disconnectedCallback(){t(this,qt).unobserve(),t(this,k).unobserve(),t(this,Q).unobserve(),t(this,X).unobserve(),t(this,U).unobserve(),t(this,Y).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,G).unobserve(),t(this,R).unobserve(),t(this,Tt).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,se).unobserve(),t(this,K).unobserve(),t(this,_t).unobserve(),t(this,bt).unobserve(),t(this,N).unobserve(),t(this,mt).unobserve(),t(this,tt).unobserve(),t(this,gt).unobserve(),t(this,Ht).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),o(this,u,_e).call(this)}}d=new WeakMap,qt=new WeakMap,k=new WeakMap,Q=new WeakMap,X=new WeakMap,U=new WeakMap,Y=new WeakMap,pt=new WeakMap,ft=new WeakMap,G=new WeakMap,R=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,se=new WeakMap,K=new WeakMap,_t=new WeakMap,bt=new WeakMap,N=new WeakMap,mt=new WeakMap,tt=new WeakMap,gt=new WeakMap,Ht=new WeakMap,$t=new WeakMap,Wt=new WeakMap,b=new WeakMap,ge=new WeakMap,l=new WeakMap,ye=new WeakMap,Ce=new WeakMap,w=new WeakMap,y=new WeakMap,q=new WeakMap,Z=new WeakMap,yt=new WeakMap,et=new WeakMap,z=new WeakMap,C=new WeakMap,ie=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,re=new WeakMap,st=new WeakMap,u=new WeakSet,fe=function(){o(this,u,ee).call(this),t(this,ge).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Ls(s,e,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,T).call(this),o(this,u,Dt).call(this)},ee=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,C).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},Ae=function(){t(this,Ut)||(r(this,Ut,!0),t(this,d).unsubscribe(t(this,ve)),t(this,d).unlistenAnimationFrame(),t(this,Z).disconnect(),t(this,yt).disconnect(),t(this,et).disconnect(),t(this,z).disconnect(),clearInterval(t(this,re)),t(this,st).unlistenAnimationFrame())},Be=function(){t(this,Ut)&&(r(this,Ut,!1),t(this,d).subscribe(t(this,ve)),t(this,Z).connect(),t(this,yt).connect(),t(this,et).connect(),t(this,K).current&&t(this,z).connect())},_e=function(){t(this,Gt)||(r(this,Gt,!0),pe.windowResizer.unsubscribe(t(this,T)),Ie.elementResizer.unsubscribe(t(this,T)),t(this,d).reset(),o(this,u,Ae).call(this),t(this,b).style.transform="",t(this,U).current&&o(this,u,ee).call(this),Yt.scrollEntries.unregister(this))},He=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,U).current&&o(this,u,fe).call(this),Yt.scrollEntries.register(this),pe.windowResizer.subscribe(t(this,T),be.RESIZE_ORDER.SCROLL),Ie.elementResizer.subscribe(this,t(this,T)),o(this,u,Be).call(this))},T=new WeakMap,ve=new WeakMap,es=function(s){t(this,R).current?(t(this,C).current=s%t(this,l).length,t(this,C).current=t(this,C).current<0?t(this,l).length+t(this,C).current:t(this,C).current):t(this,C).current=Ke.clamp(s,0,this.limit)},he=new WeakMap,Pe=new WeakMap,$e=function(s="current"){if(t(this,R).current&&t(this,l).length){const e=t(this,d)[s]%(t(this,y)+t(this,w)+t(this,q));return e<0?t(this,y)+e+t(this,w)+t(this,q):e}else return t(this,d)[s]},Dt=function(){if(t(this,N).current&&t(this,l).length){const s=t(this,C).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,G).current+t(this,tt).current;t(this,l).forEach((h,a)=>{const g=s-this.limit-1+t(this,tt).current,I=s+e,te=this.sections.length-I;a>=s&&a<I||a<=g?h.mark("current"):a>=I&&a<I+te/2||a<=g+e?h.mark("next"):h.mark("previous")})}},We=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const a=Math.abs(t(this,l)[h].position-this.targetScrollValue);a<e&&(e=a,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",qe);var we;class Te extends HTMLElement{constructor(){super(...arguments);i(this,we,null)}get scrollElement(){return t(this,we)}connectedCallback(){const s=xs.findParentElement(this,qe);s instanceof qe?r(this,we,s):console.error(this,"e-scroll not found")}}we=new WeakMap;const Vs=Ne.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:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ne,D,it,rt,oe,ce,Kt,Ee,xe,Le;class ss extends Te{constructor(){super();i(this,ne,null);i(this,D,null);i(this,it,!1);i(this,rt,0);i(this,oe,0);i(this,ce,0);i(this,Kt,()=>{r(this,it,this.offsetWidth>this.offsetHeight);const s=t(this,it)?this.offsetWidth:this.offsetHeight;r(this,rt,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,rt,Math.max(t(this,rt),30)),t(this,it)?(t(this,D).style.width=t(this,rt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,rt)+"px"),r(this,oe,s-t(this,rt)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,Ee,()=>{r(this,ce,this.scrollElement.currentProgress*t(this,oe)),t(this,it)?t(this,D).style.transform=`translate3d(${t(this,ce)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,ce)}px, 0px)`});i(this,xe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Le,s=>{document.documentElement.classList.add("grabbing"),Es.setupDrag(a=>{const g=t(this,it)?a.x:a.y,I=this.scrollElement.distance/t(this,oe),te=(g-h)*I;this.scrollElement.setPosition(e+te)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,it)?s.x:s.y});Ge.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Vs),W.element(this,{slot:"static","drag-dead-zone":"",children:[W.slot({ref:e=>r(this,ne,e),children:W.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback();const s=t(this,ne).assignedElements()[0]||t(this,ne).firstElementChild;r(this,D,s),t(this,D).addEventListener("pointerdown",t(this,Le)),pe.windowResizer.subscribe(t(this,Kt),be.RESIZE_ORDER.SCROLL+1),Ie.elementResizer.subscribe(this,t(this,Kt)),this.scrollElement.onScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.subscribe(t(this,xe))}disconnectedCallback(){t(this,D).removeEventListener("pointerdown",t(this,Le)),pe.windowResizer.unsubscribe(t(this,Kt)),Ie.elementResizer.unsubscribe(t(this,Kt)),this.scrollElement.offScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,xe))}}ne=new WeakMap,D=new WeakMap,it=new WeakMap,rt=new WeakMap,oe=new WeakMap,ce=new WeakMap,Kt=new WeakMap,Ee=new WeakMap,xe=new WeakMap,Le=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ss);const Fs=Ne.createStylesheet({button:{all:"inherit"}});class is extends Te{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Fs),Ge.isBrowser&&W.element(this,{children:[W.button({onClick:()=>{this.handleClick()},children:[W.slot()]})]})}}class rs extends is{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",rs);class hs extends is{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",hs);var ht,vt,le,ze,Ve,ue;class ks{constructor(n,s,e){i(this,ht);i(this,vt);i(this,le);i(this,ze);i(this,Ve,()=>{t(this,vt).scrollToSection(t(this,le),{behaviour:t(this,ze)})});i(this,ue,()=>{t(this,ht).classList.toggle("current",t(this,vt).counter.current===t(this,le))});r(this,ht,document.createElement("button")),r(this,vt,n),r(this,ze,e),r(this,le,s),t(this,ht).addEventListener("click",t(this,Ve)),t(this,vt).counter.subscribe(t(this,ue)),t(this,ue).call(this)}get element(){return t(this,ht)}destroy(){t(this,ht).removeEventListener("click",t(this,Ve)),t(this,vt).counter.unsubscribe(t(this,ue)),t(this,ht).remove()}}ht=new WeakMap,vt=new WeakMap,le=new WeakMap,ze=new WeakMap,Ve=new WeakMap,ue=new WeakMap;var Pt,ae;class ns extends Te{constructor(){super(...arguments);i(this,Pt,[]);i(this,ae,ts.debounce(()=>{t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new ks(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,Pt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,ae)),t(this,ae).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,ae)),t(this,Pt).forEach(s=>s.destroy()),r(this,Pt,[])}}Pt=new WeakMap,ae=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ns);var Nt,Zt,jt,Jt,wt,Et,xt,Lt,V,M,A,B,zt,E,nt,ot,ct,lt,ut,x,_,H,at,St,j,Fe,p,Qt,Xt,ke,L,Vt,O,F,$,Se,Ft,P,f,cs,ls,us,as,Ss,ds,Re,de,Ot,ps,fs,Ue,De;class os extends Te{constructor(){super();i(this,f);i(this,Nt,new c.CSSProperty(this,"--damping",20));i(this,Zt,new c.CSSProperty(this,"--mass",0));i(this,jt,new c.CSSProperty(this,"--stiffness",0));i(this,Jt,new c.CSSProperty(this,"--target",""));i(this,wt,new c.CSSProperty(this,"--disabled",!1));i(this,Et,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,xt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--capture-once",!1));i(this,V,new c.CSSProperty(this,"--captured",""));i(this,M,new c.CSSProperty(this,"--released",""));i(this,A,new c.CSSProperty(this,"--captured-from-start",""));i(this,B,new c.CSSProperty(this,"--captured-from-finish",""));i(this,zt,new c.CSSProperty(this,"--released-from-start",""));i(this,E,new c.CSSProperty(this,"--released-from-finish",""));i(this,nt,new c.CSSProperty(this,"--passed-var",""));i(this,ot,new c.CSSProperty(this,"--progress-var",""));i(this,ct,new c.CSSProperty(this,"--distance-var",""));i(this,lt,new c.CSSProperty(this,"--start-var",""));i(this,ut,new c.CSSProperty(this,"--finish-var",""));i(this,x,new Rt.Store(!1));i(this,_,new Rt.Store(!1));i(this,H,new Rt.Store(!1));i(this,at,new Rt.Store(!1));i(this,St,new Rt.Store(!1));i(this,j,new Rt.Store(!1));i(this,Fe,[]);i(this,p,this);i(this,Qt,0);i(this,Xt,0);i(this,ke,0);i(this,L,new Ye.Damped(0,{order:be.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Vt,0);i(this,O,0);i(this,F,0);i(this,$,0);i(this,Se,!1);i(this,Ft,!1);i(this,P,!0);i(this,Re,()=>{t(this,P)||(this.resize(),t(this,de).call(this))});i(this,de,()=>{!t(this,P)&&t(this,Se)&&this.tick()});i(this,De,ts.debounce(()=>{const s=Yt.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,a)=>{h.element===this.scrollElement&&(e=a)}),r(this,Fe,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,Et)}get startOffsetCSSProperty(){return t(this,xt)}get captureOnceCSSProperty(){return t(this,Lt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,M)}get capturedFromStartCSSProperty(){return t(this,A)}get capturedFromFinishCSSProperty(){return t(this,B)}get releasedFromStartCSSProperty(){return t(this,zt)}get releasedFromFinishCSSProperty(){return t(this,E)}get passedVarCSSProperty(){return t(this,nt)}get progressVarCSSProperty(){return t(this,ot)}get distanceVarCSSProperty(){return t(this,ct)}get startVarCSSProperty(){return t(this,lt)}get finishVarCSSProperty(){return t(this,ut)}get disabledCSSProperty(){return t(this,wt)}get dampingCSSProperty(){return t(this,Nt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,jt)}get targetCSSProperty(){return t(this,Jt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,_)}get isCapturedFromStart(){return t(this,H)}get isReleasedFromStart(){return t(this,at)}get isCapturedFromFinish(){return t(this,St)}get isReleasedFromFinish(){return t(this,j)}get directionPosition(){return t(this,Qt)}get directionSize(){return t(this,Xt)}get passed(){return t(this,L)}get progress(){return t(this,Vt)}get start(){return t(this,O)}get finish(){return t(this,$)}get distance(){return t(this,F)}get isCapturedOnce(){return t(this,Ft)}get isDisabled(){return t(this,P)}resize(){r(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Qt,this.scrollElement.vertical?kt.getCumulativeOffsetTop(this,this.scrollElement):kt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,O,this.getStart()),r(this,F,this.getDistance()),r(this,O,t(this,O)+t(this,xt).current),r(this,F,t(this,F)+t(this,Et).current),r(this,$,t(this,O)+t(this,F)),this.scrollElement.currentScrollValue>t(this,$)&&!t(this,x).current&&!t(this,_).current&&(t(this,x).current=!0),this.setVar(t(this,lt).current,t(this,O)),this.setVar(t(this,ut).current,t(this,$)),this.setVar(t(this,ct).current,t(this,F)),t(this,L).max=t(this,F),r(this,Se,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Fe).forEach(h=>{s+=h.value}),t(this,L).set(s-t(this,O));const e=Math.round(s);t(this,x).current&&(e>t(this,O)?t(this,H).current||o(this,f,us).call(this):t(this,H).current&&!t(this,at).current&&o(this,f,Ss).call(this),e<t(this,$)?t(this,j).current&&!t(this,St).current&&o(this,f,as).call(this):t(this,H).current&&!t(this,j).current&&o(this,f,ds).call(this)),e>t(this,O)&&e<t(this,$)?t(this,x).current||o(this,f,cs).call(this):t(this,x).current&&(t(this,L).set(Ke.step(t(this,F)/2,t(this,L).current,0,t(this,F))),o(this,f,ls).call(this)),t(this,Ft)&&t(this,Lt).current&&(t(this,V).current&&t(this,p).classList.add(t(this,V).current),r(this,P,!0))}disable(){this.style.cssText="",r(this,Qt,0),r(this,Xt,0),t(this,L).reset(),r(this,Vt,0),r(this,O,0),r(this,F,0),r(this,$,0),r(this,Se,!1),t(this,x).current=!1,t(this,_).current=!1,t(this,H).current=!1,t(this,at).current=!1,t(this,St).current=!1,t(this,j).current=!1,r(this,Ft,!1),r(this,P,!0),o(this,f,Ue).call(this)}enable(){r(this,P,!1)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Jt).observe(),t(this,wt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,V).observe(),t(this,M).observe(),t(this,A).observe(),t(this,B).observe(),t(this,zt).observe(),t(this,E).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe(),t(this,ut).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,De)),t(this,De).call(this),t(this,wt).current||this.enable(),t(this,Nt).subscribe(e=>{t(this,L).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,L).mass=e.current}),t(this,jt).subscribe(e=>{t(this,L).stiffness=e.current}),t(this,Jt).subscribe(e=>{e.previous&&o(this,f,Ue).call(this),e.current?e.current==="parent"?r(this,p,this.parentElement||this):r(this,p,document.querySelector(e.current)||this):r(this,p,this)}),t(this,wt).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,xt).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,Et).subscribe(()=>{s&&!t(this,P)&&this.resize()}),t(this,V).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,A).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,B).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,M).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,zt).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,E).subscribe(e=>{o(this,f,Ot).call(this,e)}),t(this,Lt).subscribe(e=>{t(this,P)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,nt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,ot).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Vt)))}),t(this,lt).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,O)))}),t(this,ut).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,$)))}),t(this,ct).subscribe(e=>{t(this,P)||(this.removeVar(e.previous),this.setVar(e.current,t(this,F)))}),t(this,L).subscribe(e=>{r(this,Vt,t(this,L).current/t(this,F)||0),this.setVar(t(this,nt).current,t(this,L).current.toFixed(6)),this.setVar(t(this,ot).current,t(this,Vt).toFixed(6))}),pe.windowResizer.subscribe(t(this,Re),be.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,de)),s=!0}disconnectedCallback(){pe.windowResizer.unsubscribe(t(this,Re)),this.scrollElement.offScroll(t(this,de)),t(this,Nt).close(),t(this,Zt).close(),t(this,jt).close(),t(this,Jt).close(),t(this,wt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,V).close(),t(this,M).close(),t(this,A).close(),t(this,B).close(),t(this,zt).close(),t(this,E).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,ut).close(),t(this,x).close(),t(this,_).close(),t(this,H).close(),t(this,at).close(),t(this,St).close(),t(this,j).close(),this.disable()}removeVar(s){s&&t(this,p).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,p).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,Xt)+t(this,ke)}getStart(){return t(this,Qt)-t(this,ke)}}Nt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,wt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,V=new WeakMap,M=new WeakMap,A=new WeakMap,B=new WeakMap,zt=new WeakMap,E=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,ut=new WeakMap,x=new WeakMap,_=new WeakMap,H=new WeakMap,at=new WeakMap,St=new WeakMap,j=new WeakMap,Fe=new WeakMap,p=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,ke=new WeakMap,L=new WeakMap,Vt=new WeakMap,O=new WeakMap,F=new WeakMap,$=new WeakMap,Se=new WeakMap,Ft=new WeakMap,P=new WeakMap,f=new WeakSet,cs=function(){t(this,x).current=!0,t(this,_).current=!1,r(this,Ft,!0),t(this,M).current&&t(this,p).classList.remove(t(this,M).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,E).current&&t(this,p).classList.remove(t(this,E).current),t(this,V).current&&t(this,p).classList.add(t(this,V).current)},ls=function(){t(this,_).current=!0,t(this,x).current=!1,r(this,Ft,!0),t(this,V).current&&t(this,p).classList.remove(t(this,V).current),t(this,A).current&&t(this,p).classList.remove(t(this,A).current),t(this,B).current&&t(this,p).classList.remove(t(this,B).current),t(this,M).current&&t(this,p).classList.add(t(this,M).current)},us=function(){t(this,x).current=!0,t(this,H).current=!0,t(this,at).current=!1,t(this,A).current&&t(this,p).classList.add(t(this,A).current)},as=function(){t(this,x).current=!0,t(this,St).current=!0,t(this,j).current=!1,t(this,B).current&&t(this,p).classList.add(t(this,B).current)},Ss=function(){t(this,_).current=!0,t(this,at).current=!0,t(this,H).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},ds=function(){t(this,_).current=!0,t(this,j).current=!0,t(this,St).current=!1,t(this,E).current&&t(this,p).classList.add(t(this,E).current)},Re=new WeakMap,de=new WeakMap,Ot=function(s){if(t(this,P)){s.previous&&t(this,p).classList.remove(s.previous),s.current&&t(this,p).classList.remove(s.current);return}s.current&&t(this,x).current?(s.previous&&t(this,p).classList.remove(s.previous),t(this,p).classList.add(s.current)):!s.current&&s.previous&&t(this,p).classList.remove(s.previous)},ps=function(...s){s.forEach(e=>{e&&t(this,p).classList.remove(e)})},fs=function(...s){s.forEach(e=>{e&&t(this,p).style.removeProperty(`--${e}`)})},Ue=function(){o(this,f,ps).call(this,t(this,V).current,t(this,A).current,t(this,B).current,t(this,M).current,t(this,zt).current,t(this,E).current),o(this,f,fs).call(this,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current,t(this,ut).current)},De=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",os);exports.ScrollBulletButtonsElement=ns;exports.ScrollElement=qe;exports.ScrollSegmentElement=os;exports.ScrollSetButtonElement=rs;exports.ScrollStepButtonElement=hs;exports.ScrollbarElement=ss;
|