aptechka 0.50.23 → 0.50.25

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.
@@ -21,9 +21,11 @@ export declare class ScrollSection {
21
21
  resize(): void;
22
22
  transform(): void;
23
23
  setMark(mark: ScrollSectionMark): void;
24
+ setMiddle(bool: boolean): void;
24
25
  setIndex(value: number | null): void;
25
26
  setCurrentIndex(value: number | null): void;
26
27
  setCurrentIndexArc(value: number | null): void;
28
+ setCurrentIndexArcAbs(value: number | null): void;
27
29
  }
28
30
  declare global {
29
31
  interface HTMLElementEventMap extends ScrollSectionEvents {
@@ -1 +1 @@
1
- "use strict";var Ne=Object.defineProperty;var ze=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var Ie=a=>{throw TypeError(a)};var ke=(a,n,e)=>n in a?Ne(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Re=(a,n)=>{for(var e in n||(n={}))Ue.call(n,e)&&ke(a,e,n[e]);if(ze)for(var e of ze(n))Ge.call(n,e)&&ke(a,e,n[e]);return a};var Ce=(a,n,e)=>n.has(a)||Ie("Cannot "+e);var t=(a,n,e)=>(Ce(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?Ie("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Ce(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),c=(a,n,e)=>(Ce(a,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),je=require("../easings-GegIwET5.cjs"),te=require("../events-KVanG9sR.cjs"),Ae=require("../jss-CRBgdvJ3.cjs"),At=require("../layout-Ctc2p3uz.cjs"),Te=require("../math-GDWEqu7y.cjs"),Ke=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const pe=require("../order/index.cjs"),Je=require("../Damped-B1lXa9nb.cjs"),Qe=require("../Tweened-cJ36zq1A.cjs"),Se=require("../controls/index.cjs"),Tt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Me=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Xe=require("../device/index.cjs"),se=require("../element-resizer/index.cjs"),Ye=require("../gestures-C7gbKx11.cjs"),qe=require("../dom-JBOkFLTh.cjs"),ts=require("../function-MthRj-GJ.cjs"),es=require("../scroll-segment/index.cjs");var b,qt,g,yt,V,X,Ct,Dt,be;class ss{constructor(n,e,i){s(this,Dt);s(this,b);s(this,qt);s(this,g);s(this,yt,0);s(this,V,0);s(this,X,null);s(this,Ct,0);h(this,b,n),h(this,qt,e),h(this,g,i),gt.scrollEntries.register(t(this,b)),this.setIndex(t(this,qt))}get element(){return t(this,b)}get index(){return t(this,qt)}get size(){return t(this,yt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){gt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,yt,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?At.getCumulativeOffsetTop(t(this,b)):At.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let n=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,yt)<t(this,g).currentScrollValue&&(n=t(this,g).distance*-1-t(this,g).gap),gt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,n);const i=t(this,g).currentScrollValue+n,r=t(this,V)-t(this,g).viewportSize-e,u=t(this,V)+t(this,yt)+e,f=Te.clamp(i,r,u);h(this,Ct,f*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(n){t(this,X)!==n&&(t(this,X)&&t(this,b).classList.remove(t(this,X)),n&&t(this,b).classList.add(n),h(this,X,n),te.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}setIndex(n){c(this,Dt,be).call(this,"--index",n)}setCurrentIndex(n){c(this,Dt,be).call(this,"--current-index",n)}setCurrentIndexArc(n){c(this,Dt,be).call(this,"--current-index-arc",n)}}b=new WeakMap,qt=new WeakMap,g=new WeakMap,yt=new WeakMap,V=new WeakMap,X=new WeakMap,Ct=new WeakMap,Dt=new WeakSet,be=function(n,e){e!==null?t(this,b).style.setProperty(n,e.toString()):t(this,b).style.removeProperty(n)};const is=Ae.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,vt,x,Y,_,H,W,A,tt,et,F,st,wt,T,C,Et,Pt,xt,Lt,Bt,R,zt,it,M,rt,$,nt,kt,ht,ot,lt,p,Ot,l,ie,re,y,m,k,q,ct,D,w,E,Vt,ut,N,U,G,_t,at,Z,Ht,B,P,ne,dt,o,ve,ee,Mt,fe,me,we,Ee,L,Wt,De,Ft,he,Pe,xe,mt,Be,ge,oe;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,vt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,A,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,Et,new S.CSSProperty(this,"--damping",20));s(this,Pt,new S.CSSProperty(this,"--mass",0));s(this,xt,new S.CSSProperty(this,"--stiffness",0));s(this,Lt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Bt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,zt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,M,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,Ot,null);s(this,l,[]);s(this,ie,0);s(this,re,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,ct,null);s(this,D,null);s(this,w,null);s(this,E,new Ze.Store(0));s(this,Vt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,_t);s(this,at);s(this,Z,new Qe.Tweened);s(this,Ht,!1);s(this,B,null);s(this,P,!1);s(this,ne,null);s(this,dt,[]);s(this,L,()=>{if(t(this,ot).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,E).current;if(h(this,ie,this.vertical?At.getCumulativeOffsetTop(this):At.getCumulativeOffsetLeft(this)),h(this,re,this.vertical?At.getCumulativeOffsetTop(t(this,p)):At.getCumulativeOffsetLeft(t(this,p))),h(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,C).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,d).max=t(this,m)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,y),f=t(this,m)-u;h(this,ut,r.position+r.size+f)}else h(this,ut,t(this,m));if(t(this,A).current&&t(this,l).length){const r=t(this,l)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,m),{equalize:!0});h(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,me).call(this):c(this,o,fe).call(this),te.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,Wt).call(this)});s(this,Wt,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(h(this,Vt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,E).current=c(this,o,ge).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Be).call(this),gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Ft,(e,i)=>{t(this,vt).current&&(c(this,o,Pe).call(this,Math.sign(i)||1),t(this,he).call(this,e,i))});s(this,he,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,at)||t(this,Z).unlistenAnimationFrame(),!t(this,R).current&&t(this,nt).current&&(clearInterval(t(this,_t)),h(this,_t,setTimeout(()=>{const r=t(this,l)[c(this,o,ge).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,kt).current,easing:je.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Xe.device.isTouch&&!t(this,Lt).current)){if(t(this,A).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Ht)?this.scrollToSection(t(this,E).current,u):this.shiftSections(r,u)}else t(this,d).shift(r*t(this,y))}else t(this,d).shift(i);h(this,Ht,e==="drag")}});s(this,oe,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Ee).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[is];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ot,document.createElement("slot")),t(this,p).appendChild(t(this,Ot)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),h(this,ne,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,vt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,A)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,Et)}get massCSSProperty(){return t(this,Pt)}get stiffnessCSSProperty(){return t(this,xt)}get mouseDragCSSProperty(){return t(this,Lt)}get sectionDistanceScaleCSSProperty(){return t(this,Bt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,zt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,M)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,xe).call(this,"current")}get targetScrollValue(){return c(this,o,xe).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ie)}get contentPosition(){return t(this,re)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,E)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,C).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Vt)}get scrollLine(){return t(this,B)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,C).current||t(this,W).current||t(this,C).current||t(this,F).current||t(this,A).current)&&c(this,o,ee).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,E).current,u=c(this,o,De).call(this,e),f=t(this,l)[r],v=t(this,l)[u];if(f&&v){let I=0;const ye=c(this,o,ge).call(this),Yt=t(this,l)[ye],$e=Yt?this.targetScrollValue-Yt.position:0;t(this,C).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,y)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=v.position-(t(this,m)+t(this,y)+t(this,k)):I=v.position-f.position:I=v.position-f.position,this.shiftPosition(I-$e,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,E).current+e,i)}setPosition(e,i){c(this,o,Pe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,d).current,{equalize:!0}),t(this,Z).set(e,Re({},i.tween)),h(this,at,setTimeout(()=>{h(this,at,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){gt.scrollEntries.register(this),h(this,d,new Je.Damped(0,{damping:.01,min:0,order:pe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new Se.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ft)),h(this,ct,new Se.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Ft)),h(this,D,new Se.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Ft)),h(this,w,new Se.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,he)),t(this,x).subscribe(()=>{c(this,o,ve).call(this)}),t(this,Y).subscribe(()=>{c(this,o,ve).call(this)}),t(this,st).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,x).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,ee).call(this):c(this,o,Mt).call(this))}),t(this,A).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,ee).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,F).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,ee).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,mt).call(this))}),t(this,C).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,W).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Vt,0),t(this,d).max=t(this,m),t(this,d).min=0)}),t(this,Et).subscribe(e=>{t(this,d).damping=e.current}),t(this,Pt).subscribe(e=>{t(this,d).mass=e.current}),t(this,xt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,M).subscribe(e=>{t(this,P)&&c(this,o,mt).call(this)}),t(this,rt).subscribe(e=>{t(this,P)&&t(this,M).current&&c(this,o,mt).call(this)}),t(this,$).subscribe(e=>{t(this,P)&&t(this,M).current&&c(this,o,mt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,E).subscribe(e=>{t(this,l).length&&c(this,o,mt).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,fe).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,me).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,we).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Ee).call(this))}),t(this,vt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,A).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,C).observe(),t(this,Et).observe(),t(this,Pt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,Bt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,zt).observe(),t(this,it).observe(),t(this,M).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,ht).observe(),t(this,ot).observe(),Tt.windowResizer.subscribe(t(this,oe),pe.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,vt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,A).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,C).unobserve(),t(this,Et).unobserve(),t(this,Pt).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,Bt).unobserve(),t(this,R).unobserve(),t(this,zt).unobserve(),t(this,it).unobserve(),t(this,M).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),Tt.windowResizer.unsubscribe(t(this,oe)),c(this,o,we).call(this),t(this,ne).disconnect()}}d=new WeakMap,vt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,A=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,wt=new WeakMap,T=new WeakMap,C=new WeakMap,Et=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,R=new WeakMap,zt=new WeakMap,it=new WeakMap,M=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,kt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,Ot=new WeakMap,l=new WeakMap,ie=new WeakMap,re=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,ct=new WeakMap,D=new WeakMap,w=new WeakMap,E=new WeakMap,Vt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,_t=new WeakMap,at=new WeakMap,Z=new WeakMap,Ht=new WeakMap,B=new WeakMap,P=new WeakMap,ne=new WeakMap,dt=new WeakMap,o=new WeakSet,ve=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},ee=function(){c(this,o,Mt).call(this),t(this,Ot).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new ss(e,i,this))}),t(this,p).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,mt).call(this)},Mt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,E).reset(),t(this,d).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},fe=function(){t(this,U)||(h(this,U,!0),t(this,d).unsubscribe(t(this,Wt)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,_t)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ct).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},me=function(){t(this,U)&&(h(this,U,!1),t(this,d).subscribe(t(this,Wt)),t(this,q).connect(),t(this,ct).connect(),t(this,D).connect(),t(this,R).current&&t(this,w).connect())},we=function(){t(this,G)||(h(this,G,!0),Tt.windowResizer.unsubscribe(t(this,L)),se.elementResizer.unsubscribe(t(this,L)),c(this,o,fe).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Mt).call(this):(t(this,E).reset(),t(this,d).reset()),gt.scrollEntries.unregister(this))},Ee=function(){t(this,G)&&(h(this,G,!1),gt.scrollEntries.register(this),this.tryResplit(),c(this,o,me).call(this),Tt.windowResizer.subscribe(t(this,L),pe.RESIZE_ORDER.SCROLL),se.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Wt=new WeakMap,De=function(e){let i=t(this,E).current;return t(this,C).current?i=Ke.loopNumber(e,t(this,l).length):i=Te.clamp(e,0,this.limit),i},Ft=new WeakMap,he=new WeakMap,Pe=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,zt).current,this.sectionalCSSProperty.current)},xe=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,d)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,d)[e]},mt=function(){if(t(this,l).length){const e=t(this,E).current+t(this,rt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),te.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,M).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,$).current;h(this,dt,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null);const f=e-this.limit-1+t(this,$).current,v=e+i,I=this.sections.length-v;u>=e&&u<v||u<=f?(r.setMark("current"),t(this,dt).push(r)):u>=v&&u<v+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},Be=function(){if(t(this,M).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,dt).forEach((i,r)=>{const u=Math.abs(r-e);i.setCurrentIndex(r),i.setCurrentIndexArc(u)})}},ge=function(){let e=this.targetScrollValue,i=1/0,r=0;const u=t(this,d).direction;for(let f=0;f<t(this,l).length;f++){const v=t(this,l)[f];let I=t(this,Ht)?v.size*u*-1*.4:0,ye=v.position;const Yt=Math.abs(ye+I-e);Yt<i&&(i=Yt,r=f)}return r},oe=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Rt);var le;class Le extends HTMLElement{constructor(){super(...arguments);s(this,le,null)}get scrollElement(){return t(this,le)}connectedCallback(){const e=qe.findParentElement(this,Rt);e instanceof Rt?h(this,le,e):console.error(this,"e-scroll not found")}}le=new WeakMap;var St,z,j,K,$t,Nt,pt,Ut,ce,ue;class Oe extends Le{constructor(){super();s(this,St,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,$t,0);s(this,Nt,0);s(this,pt,()=>{h(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;h(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),h(this,$t,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ut).call(this)});s(this,Ut,()=>{h(this,Nt,this.scrollElement.currentProgress*t(this,$t)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,Nt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Nt)}px, 0px)`});s(this,ce,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ue,e=>{document.documentElement.classList.add("grabbing"),Ye.setupDrag(u=>{const f=t(this,j)?u.x:u.y,v=this.scrollElement.distance/t(this,$t),I=(f-r)*v;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ae.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ue)),Tt.windowResizer.subscribe(t(this,pt),pe.RESIZE_ORDER.SCROLL),se.elementResizer.subscribe(this,t(this,pt)),se.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.subscribe(t(this,ce))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ue)),Tt.windowResizer.unsubscribe(t(this,pt)),se.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ce))}}St=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,$t=new WeakMap,Nt=new WeakMap,pt=new WeakMap,Ut=new WeakMap,ce=new WeakMap,ue=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Oe);var Gt,Zt,jt;class Ve extends Le{constructor(){super();s(this,Gt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Zt,new S.CSSProperty(this,"--tween-easing",!1));s(this,jt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Gt).current,i=t(this,Zt).current,r=t(this,jt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Gt).observe(),t(this,Zt).observe(),t(this,jt).observe()}disconnectedCallback(){t(this,Gt).close(),t(this,Zt).close(),t(this,jt).close()}}Gt=new WeakMap,Zt=new WeakMap,jt=new WeakMap;var Kt;class _e extends Ve{constructor(){super(...arguments);s(this,Kt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Kt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Kt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Kt).close()}}Kt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",_e);var J,Jt;class He extends Ve{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Jt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Jt).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Jt)),t(this,Jt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Jt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",He);var Q,bt,Qt,ae,de,Xt;class rs{constructor(n,e,i){s(this,Q,null);s(this,bt,null);s(this,Qt,null);s(this,ae,null);s(this,de,()=>{t(this,bt).scrollToSection(t(this,Qt),{behaviour:t(this,ae)})});s(this,Xt,()=>{t(this,Q).classList.toggle("current",t(this,bt).counter.current===t(this,Qt))});O.isBrowser&&(h(this,Q,document.createElement("button")),h(this,bt,n),h(this,ae,i),h(this,Qt,e),t(this,Q).addEventListener("click",t(this,de)),t(this,bt).counter.subscribe(t(this,Xt)),t(this,Xt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,de)),t(this,bt).counter.unsubscribe(t(this,Xt)),t(this,Q).remove()}}Q=new WeakMap,bt=new WeakMap,Qt=new WeakMap,ae=new WeakMap,de=new WeakMap,Xt=new WeakMap;var ft,It;class We extends Le{constructor(){super(...arguments);s(this,ft,[]);s(this,It,ts.debounce(()=>{t(this,ft).forEach(i=>i.destroy()),h(this,ft,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new rs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,ft).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,It)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,It))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,It)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,It)),t(this,ft).forEach(e=>e.destroy()),h(this,ft,[])}}ft=new WeakMap,It=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",We);class Fe extends es.ScrollSegmentElement{connectedCallback(){const n=qe.findParentElement(this,Rt);n instanceof Rt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Rt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Fe);exports.ScrollBulletButtonsElement=We;exports.ScrollElement=Rt;exports.ScrollSegmentElement=Fe;exports.ScrollSetButtonElement=_e;exports.ScrollStepButtonElement=He;exports.ScrollbarElement=Oe;
1
+ "use strict";var Ne=Object.defineProperty;var ze=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var ke=a=>{throw TypeError(a)};var Ie=(a,n,e)=>n in a?Ne(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Re=(a,n)=>{for(var e in n||(n={}))Ue.call(n,e)&&Ie(a,e,n[e]);if(ze)for(var e of ze(n))Ge.call(n,e)&&Ie(a,e,n[e]);return a};var Ce=(a,n,e)=>n.has(a)||ke("Cannot "+e);var t=(a,n,e)=>(Ce(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?ke("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Ce(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),c=(a,n,e)=>(Ce(a,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),je=require("../easings-GegIwET5.cjs"),te=require("../events-KVanG9sR.cjs"),Me=require("../jss-CRBgdvJ3.cjs"),Tt=require("../layout-Ctc2p3uz.cjs"),Te=require("../math-GDWEqu7y.cjs"),Ke=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),Je=require("../Damped-B1lXa9nb.cjs"),Qe=require("../Tweened-cJ36zq1A.cjs"),pe=require("../controls/index.cjs"),qt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Ae=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Xe=require("../device/index.cjs"),ie=require("../element-resizer/index.cjs"),Ye=require("../gestures-C7gbKx11.cjs"),qe=require("../dom-JBOkFLTh.cjs"),ts=require("../function-MthRj-GJ.cjs"),es=require("../scroll-segment/index.cjs");var b,Dt,g,yt,V,X,Ct,vt,ee;class ss{constructor(n,e,i){s(this,vt);s(this,b);s(this,Dt);s(this,g);s(this,yt,0);s(this,V,0);s(this,X,null);s(this,Ct,0);h(this,b,n),h(this,Dt,e),h(this,g,i),gt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Dt))}get element(){return t(this,b)}get index(){return t(this,Dt)}get size(){return t(this,yt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){gt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,yt,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Tt.getCumulativeOffsetTop(t(this,b)):Tt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let n=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,yt)<t(this,g).currentScrollValue&&(n=t(this,g).distance*-1-t(this,g).gap),gt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,n);const i=t(this,g).currentScrollValue+n,r=t(this,V)-t(this,g).viewportSize-e,u=t(this,V)+t(this,yt)+e,f=Te.clamp(i,r,u);h(this,Ct,f*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(n){t(this,X)!==n&&(t(this,X)&&t(this,b).classList.remove(t(this,X)),n&&t(this,b).classList.add(n),h(this,X,n),te.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,vt,ee).call(this,"--index",n)}setCurrentIndex(n){c(this,vt,ee).call(this,"--current-index",n)}setCurrentIndexArc(n){c(this,vt,ee).call(this,"--current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,vt,ee).call(this,"--current-index-arc-abs",n)}}b=new WeakMap,Dt=new WeakMap,g=new WeakMap,yt=new WeakMap,V=new WeakMap,X=new WeakMap,Ct=new WeakMap,vt=new WeakSet,ee=function(n,e){e!==null?t(this,b).style.setProperty(n,e.toString()):t(this,b).style.removeProperty(n)};const is=Me.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,wt,x,Y,_,H,W,M,tt,et,F,st,Et,T,C,Pt,xt,Lt,zt,Bt,R,It,it,A,rt,$,nt,kt,ht,ot,lt,p,Ot,l,re,ne,y,m,I,q,ct,D,w,E,Vt,ut,N,U,G,_t,at,Z,Ht,B,P,he,dt,o,ve,se,Mt,fe,me,we,Ee,L,Wt,De,Ft,oe,Pe,xe,mt,Be,ge,le;class At extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,C,new S.CSSProperty(this,"--loop",!1));s(this,Pt,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Bt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,A,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,Ot,null);s(this,l,[]);s(this,re,0);s(this,ne,0);s(this,y,0);s(this,m,0);s(this,I,0);s(this,q,null);s(this,ct,null);s(this,D,null);s(this,w,null);s(this,E,new Ze.Store(0));s(this,Vt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,_t);s(this,at);s(this,Z,new Qe.Tweened);s(this,Ht,!1);s(this,B,null);s(this,P,!1);s(this,he,null);s(this,dt,[]);s(this,L,()=>{if(t(this,ot).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,E).current;if(h(this,re,this.vertical?Tt.getCumulativeOffsetTop(this):Tt.getCumulativeOffsetLeft(this)),h(this,ne,this.vertical?Tt.getCumulativeOffsetTop(t(this,p)):Tt.getCumulativeOffsetLeft(t(this,p))),h(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,I,Ae.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,I,Ae.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,y)-t(this,I)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,C).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,d).max=t(this,m)}if(t(this,C).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,y),f=t(this,m)-u;h(this,ut,r.position+r.size+f)}else h(this,ut,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,m),{equalize:!0});h(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,me).call(this):c(this,o,fe).call(this),te.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,Wt).call(this)});s(this,Wt,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(h(this,Vt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,E).current=c(this,o,ge).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Be).call(this),gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Ft,(e,i)=>{t(this,wt).current&&(c(this,o,Pe).call(this,Math.sign(i)||1),t(this,oe).call(this,e,i))});s(this,oe,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,at)||t(this,Z).unlistenAnimationFrame(),!t(this,R).current&&t(this,nt).current&&(clearInterval(t(this,_t)),h(this,_t,setTimeout(()=>{const r=t(this,l)[c(this,o,ge).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,kt).current,easing:je.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Xe.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Ht)?this.scrollToSection(t(this,E).current,u):this.shiftSections(r,u)}else t(this,d).shift(r*t(this,y))}else t(this,d).shift(i);h(this,Ht,e==="drag")}});s(this,le,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Ee).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[is];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ot,document.createElement("slot")),t(this,p).appendChild(t(this,Ot)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),h(this,he,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,C)}get dampingCSSProperty(){return t(this,Pt)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Bt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,A)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,xe).call(this,"current")}get targetScrollValue(){return c(this,o,xe).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,re)}get contentPosition(){return t(this,ne)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,I)}get counter(){return t(this,E)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,C).current?t(this,ut)+t(this,I):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Vt)}get scrollLine(){return t(this,B)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,C).current||t(this,W).current||t(this,C).current||t(this,F).current||t(this,M).current)&&c(this,o,se).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,E).current,u=c(this,o,De).call(this,e),f=t(this,l)[r],v=t(this,l)[u];if(f&&v){let k=0;const ye=c(this,o,ge).call(this),Yt=t(this,l)[ye],$e=Yt?this.targetScrollValue-Yt.position:0;t(this,C).current?u===0&&r===t(this,l).length-1?k=t(this,m)+t(this,y)-f.position+t(this,I):u===t(this,l).length-1&&r===0?k=v.position-(t(this,m)+t(this,y)+t(this,I)):k=v.position-f.position:k=v.position-f.position,this.shiftPosition(k-$e,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,E).current+e,i)}setPosition(e,i){c(this,o,Pe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,d).current,{equalize:!0}),t(this,Z).set(e,Re({},i.tween)),h(this,at,setTimeout(()=>{h(this,at,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){gt.scrollEntries.register(this),h(this,d,new Je.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new pe.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ft)),h(this,ct,new pe.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Ft)),h(this,D,new pe.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Ft)),h(this,w,new pe.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,oe)),t(this,x).subscribe(()=>{c(this,o,ve).call(this)}),t(this,Y).subscribe(()=>{c(this,o,ve).call(this)}),t(this,st).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,x).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,se).call(this):c(this,o,Mt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,se).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,F).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,se).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Mt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,mt).call(this))}),t(this,C).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,W).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Vt,0),t(this,d).max=t(this,m),t(this,d).min=0)}),t(this,Pt).subscribe(e=>{t(this,d).damping=e.current}),t(this,xt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,A).subscribe(e=>{t(this,P)&&c(this,o,mt).call(this)}),t(this,rt).subscribe(e=>{t(this,P)&&t(this,A).current&&c(this,o,mt).call(this)}),t(this,$).subscribe(e=>{t(this,P)&&t(this,A).current&&c(this,o,mt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,E).subscribe(e=>{t(this,l).length&&c(this,o,mt).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,fe).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,me).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,we).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Ee).call(this))}),t(this,wt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,M).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,C).observe(),t(this,Pt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Bt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,It).observe(),t(this,it).observe(),t(this,A).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,ht).observe(),t(this,ot).observe(),qt.windowResizer.subscribe(t(this,le),be.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,M).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,C).unobserve(),t(this,Pt).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Bt).unobserve(),t(this,R).unobserve(),t(this,It).unobserve(),t(this,it).unobserve(),t(this,A).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),qt.windowResizer.unsubscribe(t(this,le)),c(this,o,we).call(this),t(this,he).disconnect()}}d=new WeakMap,wt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,M=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,Et=new WeakMap,T=new WeakMap,C=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,R=new WeakMap,It=new WeakMap,it=new WeakMap,A=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,kt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,Ot=new WeakMap,l=new WeakMap,re=new WeakMap,ne=new WeakMap,y=new WeakMap,m=new WeakMap,I=new WeakMap,q=new WeakMap,ct=new WeakMap,D=new WeakMap,w=new WeakMap,E=new WeakMap,Vt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,_t=new WeakMap,at=new WeakMap,Z=new WeakMap,Ht=new WeakMap,B=new WeakMap,P=new WeakMap,he=new WeakMap,dt=new WeakMap,o=new WeakSet,ve=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},se=function(){c(this,o,Mt).call(this),t(this,Ot).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new ss(e,i,this))}),t(this,p).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,mt).call(this)},Mt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,E).reset(),t(this,d).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},fe=function(){t(this,U)||(h(this,U,!0),t(this,d).unsubscribe(t(this,Wt)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,_t)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ct).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},me=function(){t(this,U)&&(h(this,U,!1),t(this,d).subscribe(t(this,Wt)),t(this,q).connect(),t(this,ct).connect(),t(this,D).connect(),t(this,R).current&&t(this,w).connect())},we=function(){t(this,G)||(h(this,G,!0),qt.windowResizer.unsubscribe(t(this,L)),ie.elementResizer.unsubscribe(t(this,L)),c(this,o,fe).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Mt).call(this):(t(this,E).reset(),t(this,d).reset()),gt.scrollEntries.unregister(this))},Ee=function(){t(this,G)&&(h(this,G,!1),gt.scrollEntries.register(this),this.tryResplit(),c(this,o,me).call(this),qt.windowResizer.subscribe(t(this,L),be.RESIZE_ORDER.SCROLL),ie.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Wt=new WeakMap,De=function(e){let i=t(this,E).current;return t(this,C).current?i=Ke.loopNumber(e,t(this,l).length):i=Te.clamp(e,0,this.limit),i},Ft=new WeakMap,oe=new WeakMap,Pe=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},xe=function(e="current"){if(t(this,C).current&&t(this,l).length){const i=t(this,d)[e]%(t(this,m)+t(this,y)+t(this,I));return i<0?t(this,m)+i+t(this,y)+t(this,I):i}else return t(this,d)[e]},mt=function(){if(t(this,l).length){const e=t(this,E).current+t(this,rt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),te.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,A).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,$).current;h(this,dt,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null);const f=e-this.limit-1+t(this,$).current,v=e+i,k=this.sections.length-v;u>=e&&u<v||u<=f?(r.setMark("current"),t(this,dt).push(r)):u>=v&&u<v+k/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},Be=function(){if(t(this,A).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,dt).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ge=function(){let e=this.targetScrollValue,i=1/0,r=0;const u=t(this,d).direction;for(let f=0;f<t(this,l).length;f++){const v=t(this,l)[f];let k=t(this,Ht)?v.size*u*-1*.4:0,ye=v.position;const Yt=Math.abs(ye+k-e);Yt<i&&(i=Yt,r=f)}return r},le=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",At);var ce;class Le extends HTMLElement{constructor(){super(...arguments);s(this,ce,null)}get scrollElement(){return t(this,ce)}connectedCallback(){const e=qe.findParentElement(this,At);e instanceof At?h(this,ce,e):console.error(this,"e-scroll not found")}}ce=new WeakMap;var St,z,j,K,$t,Nt,pt,Ut,ue,ae;class Oe extends Le{constructor(){super();s(this,St,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,$t,0);s(this,Nt,0);s(this,pt,()=>{h(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;h(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),h(this,$t,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ut).call(this)});s(this,Ut,()=>{h(this,Nt,this.scrollElement.currentProgress*t(this,$t)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,Nt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Nt)}px, 0px)`});s(this,ue,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ae,e=>{document.documentElement.classList.add("grabbing"),Ye.setupDrag(u=>{const f=t(this,j)?u.x:u.y,v=this.scrollElement.distance/t(this,$t),k=(f-r)*v;this.scrollElement.setPosition(i+k)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Me.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ae)),qt.windowResizer.subscribe(t(this,pt),be.RESIZE_ORDER.SCROLL),ie.elementResizer.subscribe(this,t(this,pt)),ie.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.subscribe(t(this,ue))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ae)),qt.windowResizer.unsubscribe(t(this,pt)),ie.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Ut)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ue))}}St=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,$t=new WeakMap,Nt=new WeakMap,pt=new WeakMap,Ut=new WeakMap,ue=new WeakMap,ae=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Oe);var Gt,Zt,jt;class Ve extends Le{constructor(){super();s(this,Gt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Zt,new S.CSSProperty(this,"--tween-easing",!1));s(this,jt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Gt).current,i=t(this,Zt).current,r=t(this,jt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Gt).observe(),t(this,Zt).observe(),t(this,jt).observe()}disconnectedCallback(){t(this,Gt).close(),t(this,Zt).close(),t(this,jt).close()}}Gt=new WeakMap,Zt=new WeakMap,jt=new WeakMap;var Kt;class _e extends Ve{constructor(){super(...arguments);s(this,Kt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Kt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Kt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Kt).close()}}Kt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",_e);var J,Jt;class He extends Ve{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Jt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Jt).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Jt)),t(this,Jt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Jt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",He);var Q,bt,Qt,de,Se,Xt;class rs{constructor(n,e,i){s(this,Q,null);s(this,bt,null);s(this,Qt,null);s(this,de,null);s(this,Se,()=>{t(this,bt).scrollToSection(t(this,Qt),{behaviour:t(this,de)})});s(this,Xt,()=>{t(this,Q).classList.toggle("current",t(this,bt).counter.current===t(this,Qt))});O.isBrowser&&(h(this,Q,document.createElement("button")),h(this,bt,n),h(this,de,i),h(this,Qt,e),t(this,Q).addEventListener("click",t(this,Se)),t(this,bt).counter.subscribe(t(this,Xt)),t(this,Xt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,Se)),t(this,bt).counter.unsubscribe(t(this,Xt)),t(this,Q).remove()}}Q=new WeakMap,bt=new WeakMap,Qt=new WeakMap,de=new WeakMap,Se=new WeakMap,Xt=new WeakMap;var ft,Rt;class We extends Le{constructor(){super(...arguments);s(this,ft,[]);s(this,Rt,ts.debounce(()=>{t(this,ft).forEach(i=>i.destroy()),h(this,ft,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new rs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,ft).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Rt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Rt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Rt)),t(this,ft).forEach(e=>e.destroy()),h(this,ft,[])}}ft=new WeakMap,Rt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",We);class Fe extends es.ScrollSegmentElement{connectedCallback(){const n=qe.findParentElement(this,At);n instanceof At?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof At&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Fe);exports.ScrollBulletButtonsElement=We;exports.ScrollElement=At;exports.ScrollSegmentElement=Fe;exports.ScrollSetButtonElement=_e;exports.ScrollStepButtonElement=He;exports.ScrollbarElement=Oe;
@@ -1,19 +1,19 @@
1
1
  var We = Object.defineProperty;
2
2
  var ze = Object.getOwnPropertySymbols;
3
3
  var Fe = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
4
- var Ie = (u) => {
4
+ var ke = (u) => {
5
5
  throw TypeError(u);
6
6
  };
7
- var ke = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Ae = (u, n) => {
7
+ var Ie = (u, n, e) => n in u ? We(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Ae = (u, n) => {
8
8
  for (var e in n || (n = {}))
9
- Fe.call(n, e) && ke(u, e, n[e]);
9
+ Fe.call(n, e) && Ie(u, e, n[e]);
10
10
  if (ze)
11
11
  for (var e of ze(n))
12
- $e.call(n, e) && ke(u, e, n[e]);
12
+ $e.call(n, e) && Ie(u, e, n[e]);
13
13
  return u;
14
14
  };
15
- var Se = (u, n, e) => n.has(u) || Ie("Cannot " + e);
16
- var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ie("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Se(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), c = (u, n, e) => (Se(u, n, "access private method"), e);
15
+ var Se = (u, n, e) => n.has(u) || ke("Cannot " + e);
16
+ var t = (u, n, e) => (Se(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? ke("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (Se(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), c = (u, n, e) => (Se(u, n, "access private method"), e);
17
17
  import { S as Ne } from "../Store-D2xCXENW.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
19
  import { a as qe } from "../easings-Bni3YAAW.js";
@@ -27,34 +27,34 @@ import { TICK_ORDER as Ge, RESIZE_ORDER as ye } from "../order/index.js";
27
27
  import { D as Ke } from "../Damped-BXsGpI-B.js";
28
28
  import { T as _e } from "../Tweened-BhDWLNF0.js";
29
29
  import { WheelControls as Ze, KeyboardControls as je, DragControls as Je, AutoplayControls as Qe } from "../controls/index.js";
30
- import { windowResizer as Mt } from "../window-resizer/index.js";
30
+ import { windowResizer as Tt } from "../window-resizer/index.js";
31
31
  import { scrollEntries as gt } from "../scroll-entries/index.js";
32
32
  import { cssUnitParser as Me } from "../css-unit-parser/index.js";
33
33
  import { CSSProperty as p } from "../css-property/index.js";
34
34
  import { device as Xe } from "../device/index.js";
35
- import { elementResizer as ee } from "../element-resizer/index.js";
35
+ import { elementResizer as se } from "../element-resizer/index.js";
36
36
  import { s as Ye } from "../gestures-CcXV6fCp.js";
37
37
  import { b as Ve } from "../dom-CVWzyXPH.js";
38
38
  import { d as ts } from "../function-C10DGppn.js";
39
39
  import { ScrollSegmentElement as es } from "../scroll-segment/index.js";
40
- var m, Dt, g, vt, B, X, yt, Vt, de;
40
+ var m, Vt, g, vt, B, X, yt, Ct, te;
41
41
  class ss {
42
42
  constructor(n, e, i) {
43
- s(this, Vt);
43
+ s(this, Ct);
44
44
  s(this, m);
45
- s(this, Dt);
45
+ s(this, Vt);
46
46
  s(this, g);
47
47
  s(this, vt, 0);
48
48
  s(this, B, 0);
49
49
  s(this, X, null);
50
50
  s(this, yt, 0);
51
- h(this, m, n), h(this, Dt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Dt));
51
+ h(this, m, n), h(this, Vt, e), h(this, g, i), gt.register(t(this, m)), this.setIndex(t(this, Vt));
52
52
  }
53
53
  get element() {
54
54
  return t(this, m);
55
55
  }
56
56
  get index() {
57
- return t(this, Dt);
57
+ return t(this, Vt);
58
58
  }
59
59
  get size() {
60
60
  return t(this, vt);
@@ -69,7 +69,7 @@ class ss {
69
69
  gt.unregister(t(this, m)), this.unsetTransform();
70
70
  }
71
71
  unsetTransform() {
72
- t(this, m).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setSize();
72
+ t(this, m).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setMiddle(!1), this.setSize();
73
73
  }
74
74
  setSize(n) {
75
75
  n ? (t(this, m).style.setProperty("--size", n + "px"), t(this, g).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"));
@@ -97,17 +97,23 @@ class ss {
97
97
  custom: !0
98
98
  }));
99
99
  }
100
+ setMiddle(n) {
101
+ t(this, m).classList.toggle("middle", n);
102
+ }
100
103
  setIndex(n) {
101
- c(this, Vt, de).call(this, "--index", n);
104
+ c(this, Ct, te).call(this, "--index", n);
102
105
  }
103
106
  setCurrentIndex(n) {
104
- c(this, Vt, de).call(this, "--current-index", n);
107
+ c(this, Ct, te).call(this, "--current-index", n);
105
108
  }
106
109
  setCurrentIndexArc(n) {
107
- c(this, Vt, de).call(this, "--current-index-arc", n);
110
+ c(this, Ct, te).call(this, "--current-index-arc", n);
111
+ }
112
+ setCurrentIndexArcAbs(n) {
113
+ c(this, Ct, te).call(this, "--current-index-arc-abs", n);
108
114
  }
109
115
  }
110
- m = new WeakMap(), Dt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Vt = new WeakSet(), de = function(n, e) {
116
+ m = new WeakMap(), Vt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), B = new WeakMap(), X = new WeakMap(), yt = new WeakMap(), Ct = new WeakSet(), te = function(n, e) {
111
117
  e !== null ? t(this, m).style.setProperty(n, e.toString()) : t(this, m).style.removeProperty(n);
112
118
  };
113
119
  const is = Te({
@@ -148,13 +154,13 @@ const is = Te({
148
154
  flexShrink: "0"
149
155
  }
150
156
  });
151
- var d, Ct, P, Y, W, F, $, T, tt, et, N, st, wt, D, y, Et, xt, Pt, Lt, Rt, A, zt, it, M, rt, q, nt, kt, ht, ot, lt, f, Ot, l, se, ie, v, S, k, V, ct, R, w, E, Ht, at, U, G, K, Bt, ut, _, Wt, O, x, re, dt, o, Ce, te, At, pe, fe, we, Ee, L, Ft, Re, $t, ne, xe, Pe, St, Oe, me, he;
152
- class Tt extends HTMLElement {
157
+ var d, wt, P, Y, W, F, $, T, tt, et, N, st, Et, D, y, xt, Pt, Lt, zt, Rt, A, It, it, M, rt, q, nt, kt, ht, ot, lt, f, Ot, l, ie, re, v, S, I, V, ct, R, w, E, Ht, at, U, G, K, Bt, ut, _, Wt, O, x, ne, dt, o, Ce, ee, Mt, pe, fe, we, Ee, L, Ft, Re, $t, he, xe, Pe, St, Oe, me, oe;
158
+ class Dt extends HTMLElement {
153
159
  constructor() {
154
160
  super();
155
161
  s(this, o);
156
162
  s(this, d, null);
157
- s(this, Ct, new p(this, "--controls", !0));
163
+ s(this, wt, new p(this, "--controls", !0));
158
164
  s(this, P, new p(this, "--axis", "y"));
159
165
  s(this, Y, new p(this, "--reverse", !1));
160
166
  s(this, W, new p(this, "--direction", 0));
@@ -179,24 +185,24 @@ class Tt extends HTMLElement {
179
185
  "--wheel-max-delta",
180
186
  !1
181
187
  ));
182
- s(this, wt, new p(this, "--drag-inertion", 1));
188
+ s(this, Et, new p(this, "--drag-inertion", 1));
183
189
  s(this, D, new p(
184
190
  this,
185
191
  "--sections-in-view",
186
192
  1
187
193
  ));
188
194
  s(this, y, new p(this, "--loop", !1));
189
- s(this, Et, new p(this, "--damping", 20));
190
- s(this, xt, new p(this, "--mass", 0));
191
- s(this, Pt, new p(this, "--stiffness", 0));
192
- s(this, Lt, new p(this, "--mouse-drag", !1));
195
+ s(this, xt, new p(this, "--damping", 20));
196
+ s(this, Pt, new p(this, "--mass", 0));
197
+ s(this, Lt, new p(this, "--stiffness", 0));
198
+ s(this, zt, new p(this, "--mouse-drag", !1));
193
199
  s(this, Rt, new p(
194
200
  this,
195
201
  "--section-distance-scale",
196
202
  0.5
197
203
  ));
198
204
  s(this, A, new p(this, "--autoplay", 0));
199
- s(this, zt, new p(
205
+ s(this, It, new p(
200
206
  this,
201
207
  "--autoplay-pause-duration",
202
208
  0
@@ -229,11 +235,11 @@ class Tt extends HTMLElement {
229
235
  s(this, f, null);
230
236
  s(this, Ot, null);
231
237
  s(this, l, []);
232
- s(this, se, 0);
233
238
  s(this, ie, 0);
239
+ s(this, re, 0);
234
240
  s(this, v, 0);
235
241
  s(this, S, 0);
236
- s(this, k, 0);
242
+ s(this, I, 0);
237
243
  s(this, V, null);
238
244
  s(this, ct, null);
239
245
  s(this, R, null);
@@ -250,19 +256,19 @@ class Tt extends HTMLElement {
250
256
  s(this, Wt, !1);
251
257
  s(this, O, null);
252
258
  s(this, x, !1);
253
- s(this, re, null);
259
+ s(this, ne, null);
254
260
  s(this, dt, []);
255
261
  s(this, L, () => {
256
262
  if (t(this, ot).current)
257
263
  return;
258
264
  t(this, d).unlistenAnimationFrame();
259
265
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
260
- if (h(this, se, this.vertical ? ge(this) : ve(this)), h(this, ie, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Me.parse(
266
+ if (h(this, ie, this.vertical ? ge(this) : ve(this)), h(this, re, this.vertical ? ge(t(this, f)) : ve(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Me.parse(
261
267
  getComputedStyle(t(this, f)).rowGap
262
- )) : h(this, k, Me.parse(
268
+ )) : h(this, I, Me.parse(
263
269
  getComputedStyle(t(this, f)).columnGap
264
270
  )), t(this, N).current && t(this, l).length) {
265
- const r = t(this, D).current, a = (t(this, v) - t(this, k) * (r - 1)) / r;
271
+ const r = t(this, D).current, a = (t(this, v) - t(this, I) * (r - 1)) / r;
266
272
  t(this, l).forEach((b) => {
267
273
  b.setSize(a);
268
274
  });
@@ -315,9 +321,9 @@ class Tt extends HTMLElement {
315
321
  );
316
322
  });
317
323
  s(this, $t, (e, i) => {
318
- t(this, Ct).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, ne).call(this, e, i));
324
+ t(this, wt).current && (c(this, o, xe).call(this, Math.sign(i) || 1), t(this, he).call(this, e, i));
319
325
  });
320
- s(this, ne, (e, i) => {
326
+ s(this, he, (e, i) => {
321
327
  if (t(this, W).current) {
322
328
  if (t(this, W).current < 0 && i > 0)
323
329
  return;
@@ -332,7 +338,7 @@ class Tt extends HTMLElement {
332
338
  easing: qe
333
339
  }
334
340
  });
335
- }, t(this, nt).current))), !(e.includes("drag") && !Xe.isTouch && !t(this, Lt).current)) {
341
+ }, t(this, nt).current))), !(e.includes("drag") && !Xe.isTouch && !t(this, zt).current)) {
336
342
  if (t(this, T).current && e !== "drag") {
337
343
  const r = Math.sign(i);
338
344
  if (t(this, l).length) {
@@ -350,14 +356,14 @@ class Tt extends HTMLElement {
350
356
  h(this, Wt, e === "drag");
351
357
  }
352
358
  });
353
- s(this, he, () => {
359
+ s(this, oe, () => {
354
360
  h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, Ee).call(this);
355
361
  });
356
362
  if (H) {
357
363
  const e = this.attachShadow({ mode: "open" });
358
364
  e.adoptedStyleSheets = [is];
359
365
  const i = document.createElement("div");
360
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Ot, document.createElement("slot")), t(this, f).appendChild(t(this, Ot)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, re, new MutationObserver((r) => {
366
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Ot, document.createElement("slot")), t(this, f).appendChild(t(this, Ot)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), h(this, ne, new MutationObserver((r) => {
361
367
  this.tryResplit();
362
368
  }));
363
369
  }
@@ -366,7 +372,7 @@ class Tt extends HTMLElement {
366
372
  return t(this, d);
367
373
  }
368
374
  get controlsCSSProperty() {
369
- return t(this, Ct);
375
+ return t(this, wt);
370
376
  }
371
377
  get axisCSSProperty() {
372
378
  return t(this, P);
@@ -399,7 +405,7 @@ class Tt extends HTMLElement {
399
405
  return t(this, st);
400
406
  }
401
407
  get dragInertionCSSProperty() {
402
- return t(this, wt);
408
+ return t(this, Et);
403
409
  }
404
410
  get sectionsInViewCSSProperty() {
405
411
  return t(this, D);
@@ -408,16 +414,16 @@ class Tt extends HTMLElement {
408
414
  return t(this, y);
409
415
  }
410
416
  get dampingCSSProperty() {
411
- return t(this, Et);
417
+ return t(this, xt);
412
418
  }
413
419
  get massCSSProperty() {
414
- return t(this, xt);
420
+ return t(this, Pt);
415
421
  }
416
422
  get stiffnessCSSProperty() {
417
- return t(this, Pt);
423
+ return t(this, Lt);
418
424
  }
419
425
  get mouseDragCSSProperty() {
420
- return t(this, Lt);
426
+ return t(this, zt);
421
427
  }
422
428
  get sectionDistanceScaleCSSProperty() {
423
429
  return t(this, Rt);
@@ -426,7 +432,7 @@ class Tt extends HTMLElement {
426
432
  return t(this, A);
427
433
  }
428
434
  get autoplayPauseDurationCSSProperty() {
429
- return t(this, zt);
435
+ return t(this, It);
430
436
  }
431
437
  get autoplayUserDirectionCSSProperty() {
432
438
  return t(this, it);
@@ -468,10 +474,10 @@ class Tt extends HTMLElement {
468
474
  return t(this, l);
469
475
  }
470
476
  get position() {
471
- return t(this, se);
477
+ return t(this, ie);
472
478
  }
473
479
  get contentPosition() {
474
- return t(this, ie);
480
+ return t(this, re);
475
481
  }
476
482
  get viewportSize() {
477
483
  return t(this, v);
@@ -480,7 +486,7 @@ class Tt extends HTMLElement {
480
486
  return t(this, S);
481
487
  }
482
488
  get gap() {
483
- return t(this, k);
489
+ return t(this, I);
484
490
  }
485
491
  get counter() {
486
492
  return t(this, E);
@@ -494,7 +500,7 @@ class Tt extends HTMLElement {
494
500
  return t(this, at);
495
501
  }
496
502
  get loopDistance() {
497
- return t(this, y).current ? t(this, at) + t(this, k) : t(this, at);
503
+ return t(this, y).current ? t(this, at) + t(this, I) : t(this, at);
498
504
  }
499
505
  get hasOverflow() {
500
506
  return t(this, U);
@@ -521,7 +527,7 @@ class Tt extends HTMLElement {
521
527
  return t(this, P).current === "x" ? 0 : t(this, d).distance;
522
528
  }
523
529
  tryResplit() {
524
- !t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o, te).call(this);
530
+ !t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, T).current) && c(this, o, ee).call(this);
525
531
  }
526
532
  onScroll(...e) {
527
533
  return t(this, d).subscribe(...e);
@@ -546,9 +552,9 @@ class Tt extends HTMLElement {
546
552
  return;
547
553
  const r = t(this, E).current, a = c(this, o, Re).call(this, e), b = t(this, l)[r], C = t(this, l)[a];
548
554
  if (b && C) {
549
- let I = 0;
555
+ let k = 0;
550
556
  const be = c(this, o, me).call(this), Xt = t(this, l)[be], Be = Xt ? this.targetScrollValue - Xt.position : 0;
551
- t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - b.position + t(this, k) : a === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, k)) : I = C.position - b.position : I = C.position - b.position, this.shiftPosition(I - Be, i);
557
+ t(this, y).current ? a === 0 && r === t(this, l).length - 1 ? k = t(this, S) + t(this, v) - b.position + t(this, I) : a === t(this, l).length - 1 && r === 0 ? k = C.position - (t(this, S) + t(this, v) + t(this, I)) : k = C.position - b.position : k = C.position - b.position, this.shiftPosition(k - Be, i);
552
558
  }
553
559
  }
554
560
  shiftSections(e, i) {
@@ -575,31 +581,31 @@ class Tt extends HTMLElement {
575
581
  t(this, $t)
576
582
  ), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, $t)), h(this, w, new Qe({
577
583
  culling: this
578
- })), t(this, w).changeEvent.subscribe(t(this, ne)), t(this, P).subscribe(() => {
584
+ })), t(this, w).changeEvent.subscribe(t(this, he)), t(this, P).subscribe(() => {
579
585
  c(this, o, Ce).call(this);
580
586
  }), t(this, Y).subscribe(() => {
581
587
  c(this, o, Ce).call(this);
582
588
  }), t(this, st).subscribe((e) => {
583
589
  t(this, V).axis = e.current ? "max" : t(this, P).current;
584
- }), t(this, wt).subscribe((e) => {
590
+ }), t(this, Et).subscribe((e) => {
585
591
  t(this, R).inertion = typeof e.current == "number" ? e.current : 1;
586
592
  }), t(this, F).subscribe(() => {
587
593
  t(this, x) && t(this, L).call(this);
588
594
  }), t(this, $).subscribe(({ current: e }) => {
589
- t(this, x) && (e ? c(this, o, te).call(this) : c(this, o, At).call(this));
595
+ t(this, x) && (e ? c(this, o, ee).call(this) : c(this, o, Mt).call(this));
590
596
  }), t(this, T).subscribe((e) => {
591
- t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
597
+ t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, ee).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
592
598
  }), t(this, N).subscribe((e) => {
593
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, te).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, At).call(this));
599
+ t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, ee).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Mt).call(this));
594
600
  }), t(this, D).subscribe((e) => {
595
601
  t(this, x) && (t(this, L).call(this), c(this, o, St).call(this));
596
602
  }), t(this, y).subscribe((e) => {
597
603
  e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ht, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
598
- }), t(this, Et).subscribe((e) => {
599
- t(this, d).damping = e.current;
600
604
  }), t(this, xt).subscribe((e) => {
601
- t(this, d).mass = e.current;
605
+ t(this, d).damping = e.current;
602
606
  }), t(this, Pt).subscribe((e) => {
607
+ t(this, d).mass = e.current;
608
+ }), t(this, Lt).subscribe((e) => {
603
609
  t(this, d).stiffness = e.current;
604
610
  }), t(this, A).subscribe((e) => {
605
611
  t(this, w).speed = e.current, !t(this, G) && e.current && !e.previous ? t(this, w).connect() : !e.current && e.previous && t(this, w).disconnect();
@@ -621,23 +627,23 @@ class Tt extends HTMLElement {
621
627
  e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, fe).call(this));
622
628
  }), t(this, ot).subscribe((e) => {
623
629
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, we).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, Ee).call(this));
624
- }), t(this, Ct).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, Rt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, zt).observe(), t(this, it).observe(), t(this, M).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, kt).observe(), t(this, ht).observe(), t(this, ot).observe(), Mt.subscribe(t(this, he), ye.LAST);
630
+ }), t(this, wt).observe(), t(this, P).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, Et).observe(), t(this, D).observe(), t(this, y).observe(), t(this, xt).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, Rt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, It).observe(), t(this, it).observe(), t(this, M).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, kt).observe(), t(this, ht).observe(), t(this, ot).observe(), Tt.subscribe(t(this, oe), ye.LAST);
625
631
  }
626
632
  disconnectedCallback() {
627
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Ct).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, Rt).unobserve(), t(this, A).unobserve(), t(this, zt).unobserve(), t(this, it).unobserve(), t(this, M).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, kt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), Mt.unsubscribe(t(this, he)), c(this, o, we).call(this), t(this, re).disconnect();
633
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, P).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, Et).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, xt).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, Rt).unobserve(), t(this, A).unobserve(), t(this, It).unobserve(), t(this, it).unobserve(), t(this, M).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, kt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), Tt.unsubscribe(t(this, oe)), c(this, o, we).call(this), t(this, ne).disconnect();
628
634
  }
629
635
  }
630
- d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Rt = new WeakMap(), A = new WeakMap(), zt = new WeakMap(), it = new WeakMap(), M = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Ot = new WeakMap(), l = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Bt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Wt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), re = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
636
+ d = new WeakMap(), wt = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), Et = new WeakMap(), D = new WeakMap(), y = new WeakMap(), xt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), Rt = new WeakMap(), A = new WeakMap(), It = new WeakMap(), it = new WeakMap(), M = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Ot = new WeakMap(), l = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), v = new WeakMap(), S = new WeakMap(), I = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), R = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Bt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Wt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), ne = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), Ce = function() {
631
637
  const e = t(this, P).current, i = t(this, Y).current ? "-reverse" : "";
632
638
  t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
633
- }, te = function() {
634
- c(this, o, At).call(this), t(this, Ot).assignedElements().forEach((e, i) => {
639
+ }, ee = function() {
640
+ c(this, o, Mt).call(this), t(this, Ot).assignedElements().forEach((e, i) => {
635
641
  e instanceof HTMLElement && t(this, l).push(new ss(e, i, this));
636
642
  }), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
637
643
  custom: !0,
638
644
  composed: !0
639
645
  }), t(this, L).call(this), c(this, o, St).call(this);
640
- }, At = function() {
646
+ }, Mt = function() {
641
647
  t(this, l).forEach((e) => {
642
648
  e.destroy();
643
649
  }), h(this, l, []), t(this, E).reset(), t(this, d).reset(), Yt(this, "scrollSectionsChange", {
@@ -651,21 +657,21 @@ d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W =
651
657
  }, fe = function() {
652
658
  t(this, G) && (h(this, G, !1), t(this, d).subscribe(t(this, Ft)), t(this, V).connect(), t(this, ct).connect(), t(this, R).connect(), t(this, A).current && t(this, w).connect());
653
659
  }, we = function() {
654
- t(this, K) || (h(this, K, !0), Mt.unsubscribe(t(this, L)), ee.unsubscribe(t(this, L)), c(this, o, pe).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, At).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
660
+ t(this, K) || (h(this, K, !0), Tt.unsubscribe(t(this, L)), se.unsubscribe(t(this, L)), c(this, o, pe).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Mt).call(this) : (t(this, E).reset(), t(this, d).reset()), gt.unregister(this));
655
661
  }, Ee = function() {
656
- t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), Mt.subscribe(t(this, L), ye.SCROLL), ee.subscribe(this, t(this, L)));
662
+ t(this, K) && (h(this, K, !1), gt.register(this), this.tryResplit(), c(this, o, fe).call(this), Tt.subscribe(t(this, L), ye.SCROLL), se.subscribe(this, t(this, L)));
657
663
  }, L = new WeakMap(), Ft = new WeakMap(), Re = function(e) {
658
664
  let i = t(this, E).current;
659
665
  return t(this, y).current ? i = Ue(e, t(this, l).length) : i = De(e, 0, this.limit), i;
660
- }, $t = new WeakMap(), ne = new WeakMap(), xe = function(e = 1) {
666
+ }, $t = new WeakMap(), he = new WeakMap(), xe = function(e = 1) {
661
667
  t(this, it).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
662
- t(this, zt).current,
668
+ t(this, It).current,
663
669
  this.sectionalCSSProperty.current
664
670
  );
665
671
  }, Pe = function(e = "current") {
666
672
  if (t(this, y).current && t(this, l).length) {
667
- const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, k));
668
- return i < 0 ? t(this, S) + i + t(this, v) + t(this, k) : i;
673
+ const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, I));
674
+ return i < 0 ? t(this, S) + i + t(this, v) + t(this, I) : i;
669
675
  } else
670
676
  return t(this, d)[e];
671
677
  }, St = function() {
@@ -678,8 +684,8 @@ d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W =
678
684
  const i = t(this, D).current + t(this, q).current;
679
685
  h(this, dt, []), t(this, l).forEach((r, a) => {
680
686
  r.setCurrentIndex(null), r.setCurrentIndexArc(null);
681
- const b = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
682
- a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + I / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
687
+ const b = e - this.limit - 1 + t(this, q).current, C = e + i, k = this.sections.length - C;
688
+ a >= e && a < C || a <= b ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + k / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
683
689
  });
684
690
  }
685
691
  }
@@ -687,8 +693,8 @@ d = new WeakMap(), Ct = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), W =
687
693
  if (t(this, M).current) {
688
694
  const e = Math.floor(t(this, dt).length / 2);
689
695
  t(this, dt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, dt).forEach((i, r) => {
690
- const a = Math.abs(r - e);
691
- i.setCurrentIndex(r), i.setCurrentIndexArc(a);
696
+ const a = r - e;
697
+ i.setCurrentIndex(r), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(r === e);
692
698
  });
693
699
  }
694
700
  }, // TODO: Учитывать loop
@@ -697,29 +703,29 @@ me = function() {
697
703
  const a = t(this, d).direction;
698
704
  for (let b = 0; b < t(this, l).length; b++) {
699
705
  const C = t(this, l)[b];
700
- let I = t(this, Wt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
701
- const Xt = Math.abs(be + I - e);
706
+ let k = t(this, Wt) ? C.size * a * -1 * 0.4 : 0, be = C.position;
707
+ const Xt = Math.abs(be + k - e);
702
708
  Xt < i && (i = Xt, r = b);
703
709
  }
704
710
  return r;
705
- }, he = new WeakMap();
706
- H && !customElements.get("e-scroll") && customElements.define("e-scroll", Tt);
707
- var oe;
711
+ }, oe = new WeakMap();
712
+ H && !customElements.get("e-scroll") && customElements.define("e-scroll", Dt);
713
+ var le;
708
714
  class Le extends HTMLElement {
709
715
  constructor() {
710
716
  super(...arguments);
711
- s(this, oe, null);
717
+ s(this, le, null);
712
718
  }
713
719
  get scrollElement() {
714
- return t(this, oe);
720
+ return t(this, le);
715
721
  }
716
722
  connectedCallback() {
717
- const e = Ve(this, Tt);
718
- e instanceof Tt ? h(this, oe, e) : console.error(this, "e-scroll not found");
723
+ const e = Ve(this, Dt);
724
+ e instanceof Dt ? h(this, le, e) : console.error(this, "e-scroll not found");
719
725
  }
720
726
  }
721
- oe = new WeakMap();
722
- var pt, z, Z, j, Nt, qt, ft, Ut, le, ce;
727
+ le = new WeakMap();
728
+ var pt, z, Z, j, Nt, qt, ft, Ut, ce, ae;
723
729
  class rs extends Le {
724
730
  constructor() {
725
731
  super();
@@ -737,14 +743,14 @@ class rs extends Le {
737
743
  s(this, Ut, () => {
738
744
  h(this, qt, this.scrollElement.currentProgress * t(this, Nt)), t(this, Z) ? t(this, z).style.transform = `translate3d(${t(this, qt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, qt)}px, 0px)`;
739
745
  });
740
- s(this, le, () => {
746
+ s(this, ce, () => {
741
747
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
742
748
  });
743
- s(this, ce, (e) => {
749
+ s(this, ae, (e) => {
744
750
  document.documentElement.classList.add("grabbing"), Ye(
745
751
  (a) => {
746
- const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, Nt), I = (b - r) * C;
747
- this.scrollElement.setPosition(i + I);
752
+ const b = t(this, Z) ? a.x : a.y, C = this.scrollElement.distance / t(this, Nt), k = (b - r) * C;
753
+ this.scrollElement.setPosition(i + k);
748
754
  },
749
755
  () => {
750
756
  document.documentElement.classList.remove("grabbing");
@@ -793,13 +799,13 @@ class rs extends Le {
793
799
  connectedCallback() {
794
800
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
795
801
  const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
796
- h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ce)), Mt.subscribe(t(this, ft), ye.SCROLL), ee.subscribe(this, t(this, ft)), ee.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.subscribe(t(this, le));
802
+ h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ae)), Tt.subscribe(t(this, ft), ye.SCROLL), se.subscribe(this, t(this, ft)), se.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.subscribe(t(this, ce));
797
803
  }
798
804
  disconnectedCallback() {
799
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ce)), Mt.unsubscribe(t(this, ft)), ee.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, le));
805
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ae)), Tt.unsubscribe(t(this, ft)), se.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, Ut)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ce));
800
806
  }
801
807
  }
802
- pt = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), Ut = new WeakMap(), le = new WeakMap(), ce = new WeakMap();
808
+ pt = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), Ut = new WeakMap(), ce = new WeakMap(), ae = new WeakMap();
803
809
  H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", rs);
804
810
  var Gt, Kt, _t;
805
811
  class He extends Le {
@@ -872,16 +878,16 @@ class hs extends He {
872
878
  }
873
879
  J = new WeakMap(), jt = new WeakMap();
874
880
  H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", hs);
875
- var Q, mt, Jt, ae, ue, Qt;
881
+ var Q, mt, Jt, ue, de, Qt;
876
882
  class os {
877
883
  constructor(n, e, i) {
878
884
  s(this, Q, null);
879
885
  s(this, mt, null);
880
886
  s(this, Jt, null);
881
- s(this, ae, null);
882
- s(this, ue, () => {
887
+ s(this, ue, null);
888
+ s(this, de, () => {
883
889
  t(this, mt).scrollToSection(t(this, Jt), {
884
- behaviour: t(this, ae)
890
+ behaviour: t(this, ue)
885
891
  });
886
892
  });
887
893
  s(this, Qt, () => {
@@ -890,22 +896,22 @@ class os {
890
896
  t(this, mt).counter.current === t(this, Jt)
891
897
  );
892
898
  });
893
- H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ae, i), h(this, Jt, e), t(this, Q).addEventListener("click", t(this, ue)), t(this, mt).counter.subscribe(t(this, Qt)), t(this, Qt).call(this));
899
+ H && (h(this, Q, document.createElement("button")), h(this, mt, n), h(this, ue, i), h(this, Jt, e), t(this, Q).addEventListener("click", t(this, de)), t(this, mt).counter.subscribe(t(this, Qt)), t(this, Qt).call(this));
894
900
  }
895
901
  get element() {
896
902
  return t(this, Q);
897
903
  }
898
904
  destroy() {
899
- t(this, Q).removeEventListener("click", t(this, ue)), t(this, mt).counter.unsubscribe(t(this, Qt)), t(this, Q).remove();
905
+ t(this, Q).removeEventListener("click", t(this, de)), t(this, mt).counter.unsubscribe(t(this, Qt)), t(this, Q).remove();
900
906
  }
901
907
  }
902
- Q = new WeakMap(), mt = new WeakMap(), Jt = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), Qt = new WeakMap();
903
- var bt, It;
908
+ Q = new WeakMap(), mt = new WeakMap(), Jt = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), Qt = new WeakMap();
909
+ var bt, At;
904
910
  class ls extends Le {
905
911
  constructor() {
906
912
  super(...arguments);
907
913
  s(this, bt, []);
908
- s(this, It, ts(() => {
914
+ s(this, At, ts(() => {
909
915
  t(this, bt).forEach((i) => i.destroy()), h(this, bt, []);
910
916
  const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
911
917
  for (let i = 0; i < e; i++) {
@@ -921,32 +927,32 @@ class ls extends Le {
921
927
  connectedCallback() {
922
928
  super.connectedCallback(), this.scrollElement.addEventListener(
923
929
  "sectionsChange",
924
- t(this, It)
930
+ t(this, At)
925
931
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
926
- t(this, It)
932
+ t(this, At)
927
933
  );
928
934
  }
929
935
  disconnectedCallback() {
930
936
  this.scrollElement.removeEventListener(
931
937
  "sectionsChange",
932
- t(this, It)
938
+ t(this, At)
933
939
  ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
934
- t(this, It)
940
+ t(this, At)
935
941
  ), t(this, bt).forEach((e) => e.destroy()), h(this, bt, []);
936
942
  }
937
943
  }
938
- bt = new WeakMap(), It = new WeakMap();
944
+ bt = new WeakMap(), At = new WeakMap();
939
945
  H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ls);
940
946
  class cs extends es {
941
947
  connectedCallback() {
942
- const n = Ve(this, Tt);
943
- n instanceof Tt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
948
+ const n = Ve(this, Dt);
949
+ n instanceof Dt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
944
950
  "scrollSectionsChange",
945
951
  this.findAnotherScrollEntries
946
952
  ), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
947
953
  }
948
954
  disconnectedCallback() {
949
- super.disconnectedCallback(), this.scrollContainer instanceof Tt && (this.scrollContainer.removeEventListener(
955
+ super.disconnectedCallback(), this.scrollContainer instanceof Dt && (this.scrollContainer.removeEventListener(
950
956
  "scrollSectionsChange",
951
957
  this.findAnotherScrollEntries
952
958
  ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
@@ -955,7 +961,7 @@ class cs extends es {
955
961
  H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", cs);
956
962
  export {
957
963
  ls as ScrollBulletButtonsElement,
958
- Tt as ScrollElement,
964
+ Dt as ScrollElement,
959
965
  cs as ScrollSegmentElement,
960
966
  ns as ScrollSetButtonElement,
961
967
  hs as ScrollStepButtonElement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.23",
3
+ "version": "0.50.25",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"