aptechka 0.50.1 → 0.50.2

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.
@@ -1 +1 @@
1
- "use strict";var Ve=Object.defineProperty;var we=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var Pe=(u,h,e)=>h in u?Ve(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&Pe(u,e,h[e]);if(we)for(var e of we(h))He.call(h,e)&&Pe(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),r=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),Fe=require("../easings-GegIwET5.cjs"),ce=require("../events-KVanG9sR.cjs"),ze=require("../jss-BXAMRO12.cjs"),kt=require("../layout-Ctc2p3uz.cjs"),ke=require("../math-GDWEqu7y.cjs"),$e=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ue=require("../order/index.cjs"),Ne=require("../Damped-DbaLw6w1.cjs"),Ue=require("../Tweened-Dm6Avip9.cjs"),le=require("../controls/index.cjs"),Rt=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),Le=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ge=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),Ze=require("../gestures-DHLrn6Q8.cjs"),Re=require("../dom-JBOkFLTh.cjs"),je=require("../function-MthRj-GJ.cjs"),Ke=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,Q;class Je{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,Q,null);r(this,f,h),r(this,Xt,e),r(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,V,t(this,g).vertical?kt.getCumulativeOffsetTop(t(this,f)):kt.getCumulativeOffsetLeft(t(this,f))),r(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,n=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=ke.clamp(i,n,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),r(this,Q,h),ce.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,Q=new WeakMap;const Qe=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,X,_,H,W,T,Y,tt,F,et,vt,q,v,Ct,wt,Pt,Et,It,I,xt,st,D,it,$,rt,Lt,nt,ht,ot,p,Tt,l,Yt,te,y,m,k,A,lt,B,w,P,qt,ct,N,U,ut,Dt,at,G,At,M,E,o,fe,Jt,zt,ae,de,me,ge,L,Bt,Ie,Mt,ee,ye,ve,ft,Se,se;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,It,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,nt,new S.CSSProperty(this,"--disabled",!1));s(this,ht,new S.CSSProperty(this,"--hibernate",!1));s(this,ot,null);s(this,p,null);s(this,Tt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,lt,null);s(this,B,null);s(this,w,null);s(this,P,new We.Store(0));s(this,qt,0);s(this,ct,0);s(this,N,!1);s(this,U,!0);s(this,ut,!0);s(this,Dt);s(this,at);s(this,G,new Ue.Tweened);s(this,At,!1);s(this,M,null);s(this,E,!1);s(this,L,()=>{if(t(this,ht).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(r(this,Yt,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),r(this,te,this.vertical?kt.getCumulativeOffsetTop(t(this,p)):kt.getCumulativeOffsetLeft(t(this,p))),r(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const n=t(this,q).current,d=(t(this,y)-t(this,k)*(n-1))/n;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(n=>{n.setSize()});if(t(this,l).forEach(n=>{n.resize()}),t(this,H).current){r(this,m,t(this,y)*t(this,H).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),d=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const n=t(this,l)[t(this,l).length-1],d=n.position+n.size-t(this,y),b=t(this,m)-d;r(this,ct,n.position+n.size+b)}else r(this,ct,t(this,m));if(t(this,T).current&&t(this,l).length){const n=t(this,l)[i];t(this,a).set(n.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});r(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,nt).current||c(this,o,de).call(this):c(this,o,ae).call(this),t(this,Bt).call(this)});s(this,Bt,()=>{if(!t(this,N)||t(this,ut)||t(this,U))return;const e=this.currentScrollValue;if(r(this,qt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,Se).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Mt,(e,i)=>{t(this,yt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,ee).call(this,e,i))});s(this,ee,(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,G).unlistenAnimationFrame(),!t(this,I).current&&t(this,rt).current&&(clearInterval(t(this,Dt)),r(this,Dt,setTimeout(()=>{const n=t(this,l)[c(this,o,Se).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Lt).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ge.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const n=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,At)?this.scrollToSection(t(this,P).current,d):this.shiftSections(n,d)}else t(this,a).shift(n*t(this,y))}else t(this,a).shift(i);r(this,At,e==="drag")}});s(this,se,()=>{r(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Qe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),r(this,ot,document.createElement("div")),t(this,ot).className="content-wrapper",r(this,p,document.createElement("div")),t(this,p).className="content",r(this,Tt,document.createElement("slot")),t(this,p).appendChild(t(this,Tt)),t(this,ot).appendChild(t(this,p)),e.appendChild(t(this,ot))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,It)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,nt)}get hibernatedCSSProperty(){return t(this,ht)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,ot)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ct)}get loopDistance(){return t(this,v).current?t(this,ct)+t(this,k):t(this,ct)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,qt)}get scrollLine(){return t(this,M)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const d=e-n,b=d+i+n*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const n=t(this,P).current,d=c(this,o,Ie).call(this,e),b=t(this,l)[n],C=t(this,l)[d];if(b&&C){let R=0;const pe=c(this,o,Se).call(this),Kt=t(this,l)[pe],Oe=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&n===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&n===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Oe,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),r(this,at,setTimeout(()=>{r(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),r(this,a,new Ne.Damped(0,{damping:.01,min:0,order:ue.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,A,new le.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Mt)),r(this,lt,new le.KeyboardControls({element:this})),t(this,lt).changeEvent.subscribe(t(this,Mt)),r(this,B,new le.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Mt)),r(this,w,new le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ee)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,zt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,zt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(r(this,qt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,st).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,nt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ae).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,de).call(this))}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,F).observe(),t(this,et).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,It).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,st).observe(),t(this,D).observe(),t(this,it).observe(),t(this,$).observe(),t(this,rt).observe(),t(this,Lt).observe(),t(this,nt).observe(),t(this,ht).observe(),Rt.windowResizer.subscribe(t(this,se),ue.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,F).unobserve(),t(this,et).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,It).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,st).unobserve(),t(this,D).unobserve(),t(this,it).unobserve(),t(this,$).unobserve(),t(this,rt).unobserve(),t(this,Lt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),Rt.windowResizer.unsubscribe(t(this,se)),c(this,o,me).call(this)}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,X=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,F=new WeakMap,et=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,It=new WeakMap,I=new WeakMap,xt=new WeakMap,st=new WeakMap,D=new WeakMap,it=new WeakMap,$=new WeakMap,rt=new WeakMap,Lt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,p=new WeakMap,Tt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,lt=new WeakMap,B=new WeakMap,w=new WeakMap,P=new WeakMap,qt=new WeakMap,ct=new WeakMap,N=new WeakMap,U=new WeakMap,ut=new WeakMap,Dt=new WeakMap,at=new WeakMap,G=new WeakMap,At=new WeakMap,M=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,lt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,zt).call(this),t(this,Tt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Je(e,i,this))}),t(this,p).style.transform="",ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},zt=function(){t(this,l).forEach(e=>{e.destroy()}),r(this,l,[]),t(this,P).reset(),t(this,a).reset(),ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ae=function(){t(this,U)||(r(this,U,!0),t(this,a).unsubscribe(t(this,Bt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Dt)),clearInterval(t(this,at)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,lt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},de=function(){t(this,U)&&(r(this,U,!1),t(this,a).subscribe(t(this,Bt)),t(this,A).connect(),t(this,lt).connect(),t(this,B).connect(),t(this,I).current&&t(this,w).connect())},me=function(){t(this,ut)||(r(this,ut,!0),Rt.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,ae).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,zt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ge=function(){t(this,ut)&&(r(this,ut,!1),mt.scrollEntries.register(this),(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this),c(this,o,de).call(this),Rt.windowResizer.subscribe(t(this,L),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Bt=new WeakMap,Ie=function(e){let i=t(this,P).current;return t(this,v).current?i=$e.loopNumber(e,t(this,l).length):i=ke.clamp(e,0,this.limit),i},Mt=new WeakMap,ee=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,it).current;if(e===0?r(this,M,"start"):e===this.limit?r(this,M,"end"):r(this,M,null),ce.dispatchEvent(this,"scrollLine",{detail:{line:t(this,M)}}),t(this,D).current){this.classList.remove("end","start"),t(this,M)&&this.classList.add(t(this,M));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((n,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?n.mark("current"):d>=C&&d<C+R/2||d<=b+i?n.mark("next"):n.mark("previous")})}}},Se=function(){let e=this.targetScrollValue,i=1/0,n=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,At)?C.size*d*-1*.4:0,pe=C.position;const Kt=Math.abs(pe+R-e);Kt<i&&(i=Kt,n=b)}return n},se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var ie;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,ie,null)}get scrollElement(){return t(this,ie)}connectedCallback(){const e=Re.findParentElement(this,jt);e instanceof jt?r(this,ie,e):console.error(this,"e-scroll not found")}}ie=new WeakMap;var dt,z,Z,j,Ot,Vt,St,_t,re,ne;class Te extends Ce{constructor(){super();s(this,dt,null);s(this,z,null);s(this,Z,!1);s(this,j,0);s(this,Ot,0);s(this,Vt,0);s(this,St,()=>{r(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;r(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,z).style.width=t(this,j)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,j)+"px"),r(this,Ot,e-t(this,j)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,_t).call(this)});s(this,_t,()=>{r(this,Vt,this.scrollElement.currentProgress*t(this,Ot)),t(this,Z)?t(this,z).style.transform=`translate3d(${t(this,Vt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Vt)}px, 0px)`});s(this,re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ne,e=>{document.documentElement.classList.add("grabbing"),Ze.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Ot),R=(b-n)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,Z)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.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"}})],r(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;r(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ne)),Rt.windowResizer.subscribe(t(this,St),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,_t)),this.scrollElement.axisCSSProperty.subscribe(t(this,re))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ne)),Rt.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,_t)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,re))}}dt=new WeakMap,z=new WeakMap,Z=new WeakMap,j=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,St=new WeakMap,_t=new WeakMap,re=new WeakMap,ne=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Te);var Ht,Wt,Ft;class qe extends Ce{constructor(){super();s(this,Ht,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Wt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Ft,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ht).current,i=t(this,Wt).current,n=t(this,Ft).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Ht).observe(),t(this,Wt).observe(),t(this,Ft).observe()}disconnectedCallback(){t(this,Ht).close(),t(this,Wt).close(),t(this,Ft).close()}}Ht=new WeakMap,Wt=new WeakMap,Ft=new WeakMap;var $t;class De extends qe{constructor(){super(...arguments);s(this,$t,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,$t).current,e)}connectedCallback(){super.connectedCallback(),t(this,$t).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,$t).close()}}$t=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",De);var K,Nt;class Ae extends qe{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,Nt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,Nt).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Nt)),t(this,Nt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,Nt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ae);var J,pt,Ut,he,oe,Gt;class Xe{constructor(h,e,i){s(this,J,null);s(this,pt,null);s(this,Ut,null);s(this,he,null);s(this,oe,()=>{t(this,pt).scrollToSection(t(this,Ut),{behaviour:t(this,he)})});s(this,Gt,()=>{t(this,J).classList.toggle("current",t(this,pt).counter.current===t(this,Ut))});O.isBrowser&&(r(this,J,document.createElement("button")),r(this,pt,h),r(this,he,i),r(this,Ut,e),t(this,J).addEventListener("click",t(this,oe)),t(this,pt).counter.subscribe(t(this,Gt)),t(this,Gt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,oe)),t(this,pt).counter.unsubscribe(t(this,Gt)),t(this,J).remove()}}J=new WeakMap,pt=new WeakMap,Ut=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;var bt,Zt;class Be extends Ce{constructor(){super(...arguments);s(this,bt,[]);s(this,Zt,je.debounce(()=>{t(this,bt).forEach(e=>e.destroy()),r(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Xe(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Zt)),t(this,Zt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Zt)),t(this,bt).forEach(e=>e.destroy()),r(this,bt,[])}}bt=new WeakMap,Zt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Be);class Me extends Ke.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Me);exports.ScrollBulletButtonsElement=Be;exports.ScrollElement=jt;exports.ScrollSegmentElement=Me;exports.ScrollSetButtonElement=De;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
1
+ "use strict";var Ve=Object.defineProperty;var we=Object.getOwnPropertySymbols;var _e=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=u=>{throw TypeError(u)};var Pe=(u,h,e)=>h in u?Ve(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,xe=(u,h)=>{for(var e in h||(h={}))_e.call(h,e)&&Pe(u,e,h[e]);if(we)for(var e of we(h))He.call(h,e)&&Pe(u,e,h[e]);return u};var be=(u,h,e)=>h.has(u)||Ee("Cannot "+e);var t=(u,h,e)=>(be(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?Ee("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(be(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(be(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),Fe=require("../easings-GegIwET5.cjs"),ce=require("../events-KVanG9sR.cjs"),ze=require("../jss-BXAMRO12.cjs"),It=require("../layout-Ctc2p3uz.cjs"),ke=require("../math-GDWEqu7y.cjs"),$e=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ue=require("../order/index.cjs"),Ne=require("../Damped-DbaLw6w1.cjs"),Ue=require("../Tweened-Dm6Avip9.cjs"),le=require("../controls/index.cjs"),Rt=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),Le=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ge=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),Ze=require("../gestures-DHLrn6Q8.cjs"),Ie=require("../dom-JBOkFLTh.cjs"),je=require("../function-MthRj-GJ.cjs"),Ke=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,Q;class Je{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,Q,null);n(this,f,h),n(this,Xt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,V,t(this,g).vertical?It.getCumulativeOffsetTop(t(this,f)):It.getCumulativeOffsetLeft(t(this,f))),n(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=ke.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,Q)!==h&&(t(this,Q)&&t(this,f).classList.remove(t(this,Q)),h&&t(this,f).classList.add(h),n(this,Q,h),ce.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Q)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,Q=new WeakMap;const Qe=ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,yt,x,X,_,H,W,T,Y,tt,F,et,vt,q,v,Ct,wt,Pt,Et,Tt,R,xt,st,D,it,$,rt,Lt,nt,ht,ot,p,qt,l,Yt,te,y,m,k,A,lt,M,w,P,Dt,ct,N,U,ut,At,at,G,Mt,B,E,o,fe,Jt,kt,ae,de,me,ge,L,Bt,Re,Ot,ee,ye,ve,ft,Se,se;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,X,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,Y,new S.CSSProperty(this,"--tween-easing",!1));s(this,tt,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,et,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Tt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,st,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,it,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,rt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,nt,new S.CSSProperty(this,"--disabled",!1));s(this,ht,new S.CSSProperty(this,"--hibernate",!1));s(this,ot,null);s(this,p,null);s(this,qt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,lt,null);s(this,M,null);s(this,w,null);s(this,P,new We.Store(0));s(this,Dt,0);s(this,ct,0);s(this,N,!1);s(this,U,!0);s(this,ut,!0);s(this,At);s(this,at);s(this,G,new Ue.Tweened);s(this,Mt,!1);s(this,B,null);s(this,E,!1);s(this,L,()=>{if(t(this,ht).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,Yt,this.vertical?It.getCumulativeOffsetTop(this):It.getCumulativeOffsetLeft(this)),n(this,te,this.vertical?It.getCumulativeOffsetTop(t(this,p)):It.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,Le.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,q).current,d=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){n(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],d=r.position+r.size-t(this,y),b=t(this,m)-d;n(this,ct,r.position+r.size+b)}else n(this,ct,t(this,m));if(t(this,T).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,nt).current||c(this,o,de).call(this):c(this,o,ae).call(this),t(this,Bt).call(this)});s(this,Bt,()=>{if(!t(this,N)||t(this,ut)||t(this,U))return;const e=this.currentScrollValue;if(n(this,Dt,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,P).current=c(this,o,Se).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Ot,(e,i)=>{t(this,yt).current&&(c(this,o,ye).call(this,Math.sign(i)||1),t(this,ee).call(this,e,i))});s(this,ee,(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,G).unlistenAnimationFrame(),!t(this,R).current&&t(this,rt).current&&(clearInterval(t(this,At)),n(this,At,setTimeout(()=>{const r=t(this,l)[c(this,o,Se).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:Fe.easeInOutExpo}})},t(this,rt).current))),!(e.includes("drag")&&!Ge.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,Y).current||t(this,tt).current?{easing:t(this,Y).current||"easeInOutCubic",duration:t(this,tt).current||500}:void 0};t(this,Mt)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Mt,e==="drag")}});s(this,se,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ge).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Qe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,ot,document.createElement("div")),t(this,ot).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,qt,document.createElement("slot")),t(this,p).appendChild(t(this,qt)),t(this,ot).appendChild(t(this,p)),e.appendChild(t(this,ot))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,X)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,Y)}get durationCSSProperty(){return t(this,tt)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,et)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,Tt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,st)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,it)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,rt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,nt)}get hibernatedCSSProperty(){return t(this,ht)}get currentScrollValue(){return c(this,o,ve).call(this,"current")}get targetScrollValue(){return c(this,o,ve).call(this,"target")}get contentWrapperElement(){return t(this,ot)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ct)}get loopDistance(){return t(this,v).current?t(this,ct)+t(this,k):t(this,ct)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Dt)}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,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Re).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let I=0;const pe=c(this,o,Se).call(this),Kt=t(this,l)[pe],Oe=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&r===t(this,l).length-1?I=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&r===0?I=C.position-(t(this,m)+t(this,y)+t(this,k)):I=C.position-b.position:I=C.position-b.position,this.shiftPosition(I-Oe,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ye).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,G).set(t(this,a).current,{equalize:!0}),t(this,G).set(e,xe({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),n(this,a,new Ne.Damped(0,{damping:.01,min:0,order:ue.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,A,new le.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Ot)),n(this,lt,new le.KeyboardControls({element:this})),t(this,lt).changeEvent.subscribe(t(this,Ot)),n(this,M,new le.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Ot)),n(this,w,new le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ee)),t(this,x).subscribe(()=>{c(this,o,fe).call(this)}),t(this,X).subscribe(()=>{c(this,o,fe).call(this)}),t(this,et).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,kt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,Dt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,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,st).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,it).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,G).subscribe(e=>{t(this,G).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,nt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ae).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,de).call(this))}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ge).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,X).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,Y).observe(),t(this,tt).observe(),t(this,F).observe(),t(this,et).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,Tt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,xt).observe(),t(this,st).observe(),t(this,D).observe(),t(this,it).observe(),t(this,$).observe(),t(this,rt).observe(),t(this,Lt).observe(),t(this,nt).observe(),t(this,ht).observe(),Rt.windowResizer.subscribe(t(this,se),ue.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,X).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,Y).unobserve(),t(this,tt).unobserve(),t(this,F).unobserve(),t(this,et).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,Tt).unobserve(),t(this,R).unobserve(),t(this,xt).unobserve(),t(this,st).unobserve(),t(this,D).unobserve(),t(this,it).unobserve(),t(this,$).unobserve(),t(this,rt).unobserve(),t(this,Lt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),Rt.windowResizer.unsubscribe(t(this,se)),c(this,o,me).call(this)}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,X=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,Y=new WeakMap,tt=new WeakMap,F=new WeakMap,et=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,R=new WeakMap,xt=new WeakMap,st=new WeakMap,D=new WeakMap,it=new WeakMap,$=new WeakMap,rt=new WeakMap,Lt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,p=new WeakMap,qt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,lt=new WeakMap,M=new WeakMap,w=new WeakMap,P=new WeakMap,Dt=new WeakMap,ct=new WeakMap,N=new WeakMap,U=new WeakMap,ut=new WeakMap,At=new WeakMap,at=new WeakMap,G=new WeakMap,Mt=new WeakMap,B=new WeakMap,E=new WeakMap,o=new WeakSet,fe=function(){const e=t(this,x).current,i=t(this,X).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,et).current?"max":e,t(this,lt).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,kt).call(this),t(this,qt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Je(e,i,this))}),t(this,p).style.transform="",ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},kt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ce.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ae=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Bt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,At)),clearInterval(t(this,at)),t(this,G).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,lt).disconnect(),t(this,M).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},de=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Bt)),t(this,A).connect(),t(this,lt).connect(),t(this,M).connect(),t(this,R).current&&t(this,w).connect())},me=function(){t(this,ut)||(n(this,ut,!0),Rt.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,ae).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,kt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ge=function(){t(this,ut)&&(n(this,ut,!1),mt.scrollEntries.register(this),(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this),c(this,o,de).call(this),Rt.windowResizer.subscribe(t(this,L),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Bt=new WeakMap,Re=function(e){let i=t(this,P).current;return t(this,v).current?i=$e.loopNumber(e,t(this,l).length):i=ke.clamp(e,0,this.limit),i},Ot=new WeakMap,ee=new WeakMap,ye=function(e=1){t(this,st).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},ve=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,it).current;if(e===0?n(this,B,"start"):e===this.limit?n(this,B,"end"):n(this,B,null),ce.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,D).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,I=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+I/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},Se=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let I=t(this,Mt)?C.size*d*-1*.4:0,pe=C.position;const Kt=Math.abs(pe+I-e);Kt<i&&(i=Kt,r=b)}return r},se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var ie;class Ce extends HTMLElement{constructor(){super(...arguments);s(this,ie,null)}get scrollElement(){return t(this,ie)}connectedCallback(){const e=Ie.findParentElement(this,jt);e instanceof jt?n(this,ie,e):console.error(this,"e-scroll not found")}}ie=new WeakMap;var dt,z,Z,j,Vt,_t,St,Ht,re,ne;class Te extends Ce{constructor(){super();s(this,dt,null);s(this,z,null);s(this,Z,!1);s(this,j,0);s(this,Vt,0);s(this,_t,0);s(this,St,()=>{n(this,Z,this.offsetWidth>this.offsetHeight);const e=t(this,Z)?this.offsetWidth:this.offsetHeight;n(this,j,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,j,Math.max(t(this,j),30)),t(this,Z)?(t(this,z).style.width=t(this,j)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,j)+"px"),n(this,Vt,e-t(this,j)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ht).call(this)});s(this,Ht,()=>{n(this,_t,this.scrollElement.currentProgress*t(this,Vt)),t(this,Z)?t(this,z).style.transform=`translate3d(${t(this,_t)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,_t)}px, 0px)`});s(this,re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ne,e=>{document.documentElement.classList.add("grabbing"),Ze.setupDrag(d=>{const b=t(this,Z)?d.x:d.y,C=this.scrollElement.distance/t(this,Vt),I=(b-r)*C;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,Z)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ze.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,ne)),Rt.windowResizer.subscribe(t(this,St),ue.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.subscribe(t(this,re))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,ne)),Rt.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,re))}}dt=new WeakMap,z=new WeakMap,Z=new WeakMap,j=new WeakMap,Vt=new WeakMap,_t=new WeakMap,St=new WeakMap,Ht=new WeakMap,re=new WeakMap,ne=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Te);var Wt,Ft,$t;class qe extends Ce{constructor(){super();s(this,Wt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ft,new S.CSSProperty(this,"--tween-easing",!1));s(this,$t,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Wt).current,i=t(this,Ft).current,r=t(this,$t).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Wt).observe(),t(this,Ft).observe(),t(this,$t).observe()}disconnectedCallback(){t(this,Wt).close(),t(this,Ft).close(),t(this,$t).close()}}Wt=new WeakMap,Ft=new WeakMap,$t=new WeakMap;var Nt;class De extends qe{constructor(){super(...arguments);s(this,Nt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Nt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Nt).close()}}Nt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",De);var K,Ut;class Ae extends qe{constructor(){super(...arguments);s(this,K,new S.CSSProperty(this,"--step",1));s(this,Ut,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,K).current>0&&this.scrollElement.scrollLine==="end"||t(this,K).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,K).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,K).subscribe(()=>{t(this,Ut).call(this)}),t(this,K).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ut)),t(this,Ut).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,K).close(),this.removeAttribute("disabled")}}K=new WeakMap,Ut=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ae);var J,pt,Gt,he,oe,Zt;class Xe{constructor(h,e,i){s(this,J,null);s(this,pt,null);s(this,Gt,null);s(this,he,null);s(this,oe,()=>{t(this,pt).scrollToSection(t(this,Gt),{behaviour:t(this,he)})});s(this,Zt,()=>{t(this,J).classList.toggle("current",t(this,pt).counter.current===t(this,Gt))});O.isBrowser&&(n(this,J,document.createElement("button")),n(this,pt,h),n(this,he,i),n(this,Gt,e),t(this,J).addEventListener("click",t(this,oe)),t(this,pt).counter.subscribe(t(this,Zt)),t(this,Zt).call(this))}get element(){return t(this,J)}destroy(){t(this,J).removeEventListener("click",t(this,oe)),t(this,pt).counter.unsubscribe(t(this,Zt)),t(this,J).remove()}}J=new WeakMap,pt=new WeakMap,Gt=new WeakMap,he=new WeakMap,oe=new WeakMap,Zt=new WeakMap;var bt,zt;class Me extends Ce{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,je.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new Xe(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,bt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Me);class Be extends Ke.ScrollSegmentElement{connectedCallback(){const h=Ie.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Me;exports.ScrollElement=jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=De;exports.ScrollStepButtonElement=Ae;exports.ScrollbarElement=Te;
@@ -1,10 +1,10 @@
1
1
  var Me = Object.defineProperty;
2
2
  var we = Object.getOwnPropertySymbols;
3
3
  var Ve = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
4
- var xe = (a) => {
4
+ var Pe = (a) => {
5
5
  throw TypeError(a);
6
6
  };
7
- var Ee = (a, h, e) => h in a ? Me(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e, Pe = (a, h) => {
7
+ var Ee = (a, h, e) => h in a ? Me(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e, xe = (a, h) => {
8
8
  for (var e in h || (h = {}))
9
9
  Ve.call(h, e) && Ee(a, e, h[e]);
10
10
  if (we)
@@ -12,8 +12,8 @@ var Ee = (a, h, e) => h in a ? Me(a, h, { enumerable: !0, configurable: !0, writ
12
12
  Oe.call(h, e) && Ee(a, e, h[e]);
13
13
  return a;
14
14
  };
15
- var de = (a, h, e) => h.has(a) || xe("Cannot " + e);
16
- var t = (a, h, e) => (de(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? xe("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), r = (a, h, e, i) => (de(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), c = (a, h, e) => (de(a, h, "access private method"), e);
15
+ var de = (a, h, e) => h.has(a) || Pe("Cannot " + e);
16
+ var t = (a, h, e) => (de(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? Pe("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (de(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), c = (a, h, e) => (de(a, h, "access private method"), e);
17
17
  import { S as Re } from "../Store-D2xCXENW.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
19
  import { a as He } from "../easings-Bni3YAAW.js";
@@ -27,7 +27,7 @@ import { TICK_ORDER as We, RESIZE_ORDER as me } from "../order/index.js";
27
27
  import { D as Fe } from "../Damped-CucKOQsI.js";
28
28
  import { T as $e } from "../Tweened-CcPeZ0UE.js";
29
29
  import { WheelControls as Ne, KeyboardControls as qe, DragControls as Ue, AutoplayControls as Ge } from "../controls/index.js";
30
- import { windowResizer as zt } from "../window-resizer/index.js";
30
+ import { windowResizer as It } from "../window-resizer/index.js";
31
31
  import { scrollEntries as St } from "../scroll-entries/index.js";
32
32
  import { cssUnitParser as Le } from "../css-unit-parser/index.js";
33
33
  import { CSSProperty as p } from "../css-property/index.js";
@@ -46,7 +46,7 @@ class Je {
46
46
  s(this, gt, 0);
47
47
  s(this, B, 0);
48
48
  s(this, Q, null);
49
- r(this, b, h), r(this, Qt, e), r(this, g, i), St.register(t(this, b));
49
+ n(this, b, h), n(this, Qt, e), n(this, g, i), St.register(t(this, b));
50
50
  }
51
51
  get index() {
52
52
  return t(this, Qt);
@@ -67,7 +67,7 @@ class Je {
67
67
  h ? (t(this, b).style.setProperty("--size", h + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, b).style.width = h + "px", t(this, b).style.height = "") : (t(this, b).style.height = h + "px", t(this, b).style.width = "")) : (t(this, b).style.width = "", t(this, b).style.height = "", t(this, b).style.removeProperty("--size"));
68
68
  }
69
69
  resize() {
70
- r(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), r(this, B, t(this, g).vertical ? pe(t(this, b)) : fe(t(this, b))), r(this, B, t(this, B) - t(this, g).contentPosition);
70
+ n(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), n(this, B, t(this, g).vertical ? pe(t(this, b)) : fe(t(this, b))), n(this, B, t(this, B) - t(this, g).contentPosition);
71
71
  }
72
72
  transform() {
73
73
  let h = 0;
@@ -77,11 +77,11 @@ class Je {
77
77
  t(this, g).axisCSSProperty.current,
78
78
  h
79
79
  );
80
- const i = t(this, g).currentScrollValue + h, n = t(this, B) - t(this, g).viewportSize - e, d = t(this, B) + t(this, gt) + e, m = ze(i, n, d);
80
+ const i = t(this, g).currentScrollValue + h, r = t(this, B) - t(this, g).viewportSize - e, d = t(this, B) + t(this, gt) + e, m = ze(i, r, d);
81
81
  t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${m * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${m * -1}px, 0px, 0px)`;
82
82
  }
83
83
  mark(h) {
84
- t(this, Q) !== h && (t(this, Q) && t(this, b).classList.remove(t(this, Q)), h && t(this, b).classList.add(h), r(this, Q, h), oe(t(this, b), "scrollSectionMarkChange", {
84
+ t(this, Q) !== h && (t(this, Q) && t(this, b).classList.remove(t(this, Q)), h && t(this, b).classList.add(h), n(this, Q, h), oe(t(this, b), "scrollSectionMarkChange", {
85
85
  composed: !0,
86
86
  detail: {
87
87
  mark: t(this, Q)
@@ -129,14 +129,14 @@ const Qe = ke({
129
129
  flexShrink: "0"
130
130
  }
131
131
  });
132
- var u, vt, P, X, W, F, $, A, Y, tt, N, et, yt, D, y, Ct, wt, Et, xt, It, T, Pt, st, M, it, q, rt, Lt, nt, ht, ot, f, Tt, l, Xt, Yt, v, S, z, V, lt, O, w, E, At, ct, U, G, at, Dt, ut, K, Mt, R, x, o, be, Zt, kt, le, ce, Se, ge, L, Vt, Te, Ot, te, ve, ye, bt, ae, ee;
132
+ var u, vt, x, X, W, F, $, A, Y, tt, N, et, yt, D, y, Ct, wt, Et, Pt, Tt, T, xt, st, M, it, q, rt, Lt, nt, ht, ot, f, At, l, Xt, Yt, v, S, z, V, lt, O, w, E, Dt, ct, U, G, at, Mt, ut, K, Vt, R, P, o, be, Zt, zt, le, ce, Se, ge, L, Ot, Te, Rt, te, ve, ye, bt, ae, ee;
133
133
  class Jt extends HTMLElement {
134
134
  constructor() {
135
135
  super();
136
136
  s(this, o);
137
137
  s(this, u, null);
138
138
  s(this, vt, new p(this, "--controls", !0));
139
- s(this, P, new p(this, "--axis", "y"));
139
+ s(this, x, new p(this, "--axis", "y"));
140
140
  s(this, X, new p(this, "--reverse", !1));
141
141
  s(this, W, new p(this, "--direction", 0));
142
142
  s(this, F, new p(this, "--pages", 0, {
@@ -170,14 +170,14 @@ class Jt extends HTMLElement {
170
170
  s(this, Ct, new p(this, "--damping", 20));
171
171
  s(this, wt, new p(this, "--mass", 0));
172
172
  s(this, Et, new p(this, "--stiffness", 0));
173
- s(this, xt, new p(this, "--mouse-drag", !1));
174
- s(this, It, new p(
173
+ s(this, Pt, new p(this, "--mouse-drag", !1));
174
+ s(this, Tt, new p(
175
175
  this,
176
176
  "--section-distance-scale",
177
177
  0.5
178
178
  ));
179
179
  s(this, T, new p(this, "--autoplay", 0));
180
- s(this, Pt, new p(
180
+ s(this, xt, new p(
181
181
  this,
182
182
  "--autoplay-pause-duration",
183
183
  0
@@ -208,7 +208,7 @@ class Jt extends HTMLElement {
208
208
  s(this, ht, new p(this, "--hibernate", !1));
209
209
  s(this, ot, null);
210
210
  s(this, f, null);
211
- s(this, Tt, null);
211
+ s(this, At, null);
212
212
  s(this, l, []);
213
213
  s(this, Xt, 0);
214
214
  s(this, Yt, 0);
@@ -220,68 +220,68 @@ class Jt extends HTMLElement {
220
220
  s(this, O, null);
221
221
  s(this, w, null);
222
222
  s(this, E, new Re(0));
223
- s(this, At, 0);
223
+ s(this, Dt, 0);
224
224
  s(this, ct, 0);
225
225
  s(this, U, !1);
226
226
  s(this, G, !0);
227
227
  s(this, at, !0);
228
- s(this, Dt);
228
+ s(this, Mt);
229
229
  s(this, ut);
230
230
  s(this, K, new $e());
231
- s(this, Mt, !1);
231
+ s(this, Vt, !1);
232
232
  s(this, R, null);
233
- s(this, x, !1);
233
+ s(this, P, !1);
234
234
  s(this, L, () => {
235
235
  if (t(this, ht).current)
236
236
  return;
237
237
  t(this, u).unlistenAnimationFrame();
238
238
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
239
- if (r(this, Xt, this.vertical ? pe(this) : fe(this)), r(this, Yt, this.vertical ? pe(t(this, f)) : fe(t(this, f))), r(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? r(this, z, Le.parse(
239
+ if (n(this, Xt, this.vertical ? pe(this) : fe(this)), n(this, Yt, this.vertical ? pe(t(this, f)) : fe(t(this, f))), n(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, z, Le.parse(
240
240
  getComputedStyle(t(this, f)).rowGap
241
- )) : r(this, z, Le.parse(
241
+ )) : n(this, z, Le.parse(
242
242
  getComputedStyle(t(this, f)).columnGap
243
243
  )), t(this, N).current && t(this, l).length) {
244
- const n = t(this, D).current, d = (t(this, v) - t(this, z) * (n - 1)) / n;
244
+ const r = t(this, D).current, d = (t(this, v) - t(this, z) * (r - 1)) / r;
245
245
  t(this, l).forEach((m) => {
246
246
  m.setSize(d);
247
247
  });
248
248
  } else
249
- t(this, l).forEach((n) => {
250
- n.setSize();
249
+ t(this, l).forEach((r) => {
250
+ r.setSize();
251
251
  });
252
- if (t(this, l).forEach((n) => {
253
- n.resize();
252
+ if (t(this, l).forEach((r) => {
253
+ r.resize();
254
254
  }), t(this, F).current) {
255
- r(this, S, t(this, v) * t(this, F).current);
256
- const n = t(this, S) + t(this, v);
257
- this.vertical ? (t(this, f).style.width = n + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = n + "px", t(this, f).style.width = "100%");
255
+ n(this, S, t(this, v) * t(this, F).current);
256
+ const r = t(this, S) + t(this, v);
257
+ this.vertical ? (t(this, f).style.width = r + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = r + "px", t(this, f).style.width = "100%");
258
258
  } else
259
- this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", r(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", r(this, S, t(this, f).offsetWidth - t(this, v)));
259
+ this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", n(this, S, t(this, f).offsetWidth - t(this, v)));
260
260
  if (!t(this, y).current) {
261
- const n = getComputedStyle(this), d = this.vertical ? parseFloat(n.paddingBlockStart) + parseFloat(n.paddingBlockEnd) : parseFloat(n.paddingInlineStart) + parseFloat(n.paddingInlineEnd);
262
- r(this, S, t(this, S) + d), t(this, u).max = t(this, S);
261
+ const r = getComputedStyle(this), d = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
262
+ n(this, S, t(this, S) + d), t(this, u).max = t(this, S);
263
263
  }
264
264
  if (t(this, y).current && t(this, l).length) {
265
- const n = t(this, l)[t(this, l).length - 1], d = n.position + n.size - t(this, v), m = t(this, S) - d;
266
- r(this, ct, n.position + n.size + m);
265
+ const r = t(this, l)[t(this, l).length - 1], d = r.position + r.size - t(this, v), m = t(this, S) - d;
266
+ n(this, ct, r.position + r.size + m);
267
267
  } else
268
- r(this, ct, t(this, S));
268
+ n(this, ct, t(this, S));
269
269
  if (t(this, A).current && t(this, l).length) {
270
- const n = t(this, l)[i];
271
- t(this, u).set(n.position, {
270
+ const r = t(this, l)[i];
271
+ t(this, u).set(r.position, {
272
272
  equalize: !0
273
273
  });
274
274
  } else
275
275
  t(this, u).set(e * t(this, S), {
276
276
  equalize: !0
277
277
  });
278
- r(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, nt).current || c(this, o, ce).call(this) : c(this, o, le).call(this), t(this, Vt).call(this);
278
+ n(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, nt).current || c(this, o, ce).call(this) : c(this, o, le).call(this), t(this, Ot).call(this);
279
279
  });
280
- s(this, Vt, () => {
280
+ s(this, Ot, () => {
281
281
  if (!t(this, U) || t(this, at) || t(this, G))
282
282
  return;
283
283
  const e = this.currentScrollValue;
284
- if (r(this, At, Math.max(0, e - t(this, S))), t(this, l).length) {
284
+ if (n(this, Dt, Math.max(0, e - t(this, S))), t(this, l).length) {
285
285
  for (let i = 0; i < t(this, l).length; i++)
286
286
  t(this, l)[i].transform();
287
287
  t(this, E).current = c(this, o, ae).call(this);
@@ -289,11 +289,11 @@ class Jt extends HTMLElement {
289
289
  this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
290
290
  St.update(
291
291
  this,
292
- t(this, P).current,
292
+ t(this, x).current,
293
293
  e
294
294
  );
295
295
  });
296
- s(this, Ot, (e, i) => {
296
+ s(this, Rt, (e, i) => {
297
297
  t(this, vt).current && (c(this, o, ve).call(this, Math.sign(i) || 1), t(this, te).call(this, e, i));
298
298
  });
299
299
  s(this, te, (e, i) => {
@@ -303,17 +303,17 @@ class Jt extends HTMLElement {
303
303
  if (t(this, W).current > 0 && i < 0)
304
304
  return;
305
305
  }
306
- if (t(this, ut) || t(this, K).unlistenAnimationFrame(), !t(this, T).current && t(this, rt).current && (clearInterval(t(this, Dt)), r(this, Dt, setTimeout(() => {
307
- const n = t(this, l)[c(this, o, ae).call(this)];
308
- n && this.scrollToSection(n.index, {
306
+ if (t(this, ut) || t(this, K).unlistenAnimationFrame(), !t(this, T).current && t(this, rt).current && (clearInterval(t(this, Mt)), n(this, Mt, setTimeout(() => {
307
+ const r = t(this, l)[c(this, o, ae).call(this)];
308
+ r && this.scrollToSection(r.index, {
309
309
  tween: {
310
310
  duration: t(this, Lt).current,
311
311
  easing: He
312
312
  }
313
313
  });
314
- }, t(this, rt).current))), !(e.includes("drag") && !Ke.isTouch && !t(this, xt).current)) {
314
+ }, t(this, rt).current))), !(e.includes("drag") && !Ke.isTouch && !t(this, Pt).current)) {
315
315
  if (t(this, A).current && e !== "drag") {
316
- const n = Math.sign(i);
316
+ const r = Math.sign(i);
317
317
  if (t(this, l).length) {
318
318
  const d = {
319
319
  tween: t(this, Y).current || t(this, tt).current ? {
@@ -321,22 +321,22 @@ class Jt extends HTMLElement {
321
321
  duration: t(this, tt).current || 500
322
322
  } : void 0
323
323
  };
324
- t(this, Mt) ? this.scrollToSection(t(this, E).current, d) : this.shiftSections(n, d);
324
+ t(this, Vt) ? this.scrollToSection(t(this, E).current, d) : this.shiftSections(r, d);
325
325
  } else
326
- t(this, u).shift(n * t(this, v));
326
+ t(this, u).shift(r * t(this, v));
327
327
  } else
328
328
  t(this, u).shift(i);
329
- r(this, Mt, e === "drag");
329
+ n(this, Vt, e === "drag");
330
330
  }
331
331
  });
332
332
  s(this, ee, () => {
333
- r(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, ge).call(this);
333
+ n(this, P, !0), this.hibernatedCSSProperty.current || c(this, o, ge).call(this);
334
334
  });
335
335
  if (H) {
336
336
  const e = this.attachShadow({ mode: "open" });
337
337
  e.adoptedStyleSheets = [Qe];
338
338
  const i = document.createElement("div");
339
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), r(this, ot, document.createElement("div")), t(this, ot).className = "content-wrapper", r(this, f, document.createElement("div")), t(this, f).className = "content", r(this, Tt, document.createElement("slot")), t(this, f).appendChild(t(this, Tt)), t(this, ot).appendChild(t(this, f)), e.appendChild(t(this, ot));
339
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, ot, document.createElement("div")), t(this, ot).className = "content-wrapper", n(this, f, document.createElement("div")), t(this, f).className = "content", n(this, At, document.createElement("slot")), t(this, f).appendChild(t(this, At)), t(this, ot).appendChild(t(this, f)), e.appendChild(t(this, ot));
340
340
  }
341
341
  }
342
342
  get damped() {
@@ -346,7 +346,7 @@ class Jt extends HTMLElement {
346
346
  return t(this, vt);
347
347
  }
348
348
  get axisCSSProperty() {
349
- return t(this, P);
349
+ return t(this, x);
350
350
  }
351
351
  get reverseCSSProperty() {
352
352
  return t(this, X);
@@ -394,16 +394,16 @@ class Jt extends HTMLElement {
394
394
  return t(this, Et);
395
395
  }
396
396
  get mouseDragCSSProperty() {
397
- return t(this, xt);
397
+ return t(this, Pt);
398
398
  }
399
399
  get sectionDistanceScaleCSSProperty() {
400
- return t(this, It);
400
+ return t(this, Tt);
401
401
  }
402
402
  get autoplayCSSProperty() {
403
403
  return t(this, T);
404
404
  }
405
405
  get autoplayPauseDurationCSSProperty() {
406
- return t(this, Pt);
406
+ return t(this, xt);
407
407
  }
408
408
  get autoplayUserDirectionCSSProperty() {
409
409
  return t(this, st);
@@ -477,13 +477,13 @@ class Jt extends HTMLElement {
477
477
  return t(this, U);
478
478
  }
479
479
  get overscroll() {
480
- return t(this, At);
480
+ return t(this, Dt);
481
481
  }
482
482
  get scrollLine() {
483
483
  return t(this, R);
484
484
  }
485
485
  get vertical() {
486
- return t(this, P).current === "y";
486
+ return t(this, x).current === "y";
487
487
  }
488
488
  get currentProgress() {
489
489
  return this.currentScrollValue / this.loopDistance || 0;
@@ -492,10 +492,10 @@ class Jt extends HTMLElement {
492
492
  return this.targetScrollValue / this.loopDistance || 0;
493
493
  }
494
494
  get scrollWidth() {
495
- return t(this, P).current === "y" ? 0 : t(this, u).distance;
495
+ return t(this, x).current === "y" ? 0 : t(this, u).distance;
496
496
  }
497
497
  get scrollHeight() {
498
- return t(this, P).current === "x" ? 0 : t(this, u).distance;
498
+ return t(this, x).current === "x" ? 0 : t(this, u).distance;
499
499
  }
500
500
  onScroll(...e) {
501
501
  return t(this, u).subscribe(...e);
@@ -504,33 +504,33 @@ class Jt extends HTMLElement {
504
504
  t(this, u).unsubscribe(...e);
505
505
  }
506
506
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
507
- range(e, i, n = 0) {
508
- const d = e - n, m = d + i + n * 2;
507
+ range(e, i, r = 0) {
508
+ const d = e - r, m = d + i + r * 2;
509
509
  return this.currentProgress < d ? 0 : this.currentProgress > m ? 1 : (this.currentProgress - d) / (m - d);
510
510
  }
511
- curve(e, i, n = 0) {
512
- return Math.sin(this.range(e, i, n) * Math.PI);
511
+ curve(e, i, r = 0) {
512
+ return Math.sin(this.range(e, i, r) * Math.PI);
513
513
  }
514
- visible(e, i, n = 0) {
515
- const d = e - n, m = d + i + n * 2;
514
+ visible(e, i, r = 0) {
515
+ const d = e - r, m = d + i + r * 2;
516
516
  return this.currentProgress >= d && this.currentProgress <= m;
517
517
  }
518
518
  scrollToSection(e, i) {
519
519
  if (!t(this, l).length)
520
520
  return;
521
- const n = t(this, E).current, d = c(this, o, Te).call(this, e), m = t(this, l)[n], C = t(this, l)[d];
521
+ const r = t(this, E).current, d = c(this, o, Te).call(this, e), m = t(this, l)[r], C = t(this, l)[d];
522
522
  if (m && C) {
523
523
  let I = 0;
524
524
  const ue = c(this, o, ae).call(this), _t = t(this, l)[ue], De = _t ? this.targetScrollValue - _t.position : 0;
525
- t(this, y).current ? d === 0 && n === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - m.position + t(this, z) : d === t(this, l).length - 1 && n === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, z)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - De, i);
525
+ t(this, y).current ? d === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - m.position + t(this, z) : d === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, z)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - De, i);
526
526
  }
527
527
  }
528
528
  shiftSections(e, i) {
529
529
  t(this, l).length && this.scrollToSection(t(this, E).current + e, i);
530
530
  }
531
531
  setPosition(e, i) {
532
- c(this, o, ve).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, K).set(t(this, u).current, { equalize: !0 }), t(this, K).set(e, Pe({}, i.tween)), r(this, ut, setTimeout(() => {
533
- r(this, ut, void 0);
532
+ c(this, o, ve).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, K).set(t(this, u).current, { equalize: !0 }), t(this, K).set(e, xe({}, i.tween)), n(this, ut, setTimeout(() => {
533
+ n(this, ut, void 0);
534
534
  }, i.tween.duration || 0))) : t(this, u).set(e, {
535
535
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
536
536
  });
@@ -539,36 +539,36 @@ class Jt extends HTMLElement {
539
539
  this.setPosition(t(this, u).target + e, i);
540
540
  }
541
541
  connectedCallback() {
542
- St.register(this), r(this, u, new Fe(0, {
542
+ St.register(this), n(this, u, new Fe(0, {
543
543
  damping: 0.01,
544
544
  min: 0,
545
545
  order: We.SCROLL
546
- })), this.setAttribute("tabindex", "0"), r(this, V, new Ne({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ot)), r(this, lt, new qe({
546
+ })), this.setAttribute("tabindex", "0"), n(this, V, new Ne({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Rt)), n(this, lt, new qe({
547
547
  element: this
548
548
  })), t(this, lt).changeEvent.subscribe(
549
- t(this, Ot)
550
- ), r(this, O, new Ue({ element: t(this, f) })), t(this, O).changeEvent.subscribe(t(this, Ot)), r(this, w, new Ge({
549
+ t(this, Rt)
550
+ ), n(this, O, new Ue({ element: t(this, f) })), t(this, O).changeEvent.subscribe(t(this, Rt)), n(this, w, new Ge({
551
551
  culling: this
552
- })), t(this, w).changeEvent.subscribe(t(this, te)), t(this, P).subscribe(() => {
552
+ })), t(this, w).changeEvent.subscribe(t(this, te)), t(this, x).subscribe(() => {
553
553
  c(this, o, be).call(this);
554
554
  }), t(this, X).subscribe(() => {
555
555
  c(this, o, be).call(this);
556
556
  }), t(this, et).subscribe((e) => {
557
- t(this, V).axis = e.current ? "max" : t(this, P).current;
557
+ t(this, V).axis = e.current ? "max" : t(this, x).current;
558
558
  }), t(this, yt).subscribe((e) => {
559
559
  t(this, O).inertion = typeof e.current == "number" ? e.current : 1;
560
560
  }), t(this, F).subscribe(() => {
561
- t(this, x) && t(this, L).call(this);
561
+ t(this, P) && t(this, L).call(this);
562
562
  }), t(this, $).subscribe(({ current: e }) => {
563
- t(this, x) && (e ? c(this, o, Zt).call(this) : c(this, o, kt).call(this));
563
+ t(this, P) && (e ? c(this, o, Zt).call(this) : c(this, o, zt).call(this));
564
564
  }), t(this, A).subscribe((e) => {
565
- t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, kt).call(this));
565
+ t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, w).interval = e.current, t(this, P) && (e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, zt).call(this));
566
566
  }), t(this, N).subscribe((e) => {
567
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, kt).call(this));
567
+ t(this, P) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, zt).call(this));
568
568
  }), t(this, D).subscribe((e) => {
569
- t(this, x) && (t(this, L).call(this), c(this, o, bt).call(this));
569
+ t(this, P) && (t(this, L).call(this), c(this, o, bt).call(this));
570
570
  }), t(this, y).subscribe((e) => {
571
- e.current ? (t(this, x) && (t(this, l).length || (t(this, $).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (r(this, At, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
571
+ e.current ? (t(this, P) && (t(this, l).length || (t(this, $).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (n(this, Dt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
572
572
  }), t(this, Ct).subscribe((e) => {
573
573
  t(this, u).damping = e.current;
574
574
  }), t(this, wt).subscribe((e) => {
@@ -580,11 +580,11 @@ class Jt extends HTMLElement {
580
580
  }), t(this, st).subscribe((e) => {
581
581
  e.current || (t(this, w).direction = 1);
582
582
  }), t(this, M).subscribe((e) => {
583
- t(this, x) && c(this, o, bt).call(this);
583
+ t(this, P) && c(this, o, bt).call(this);
584
584
  }), t(this, it).subscribe((e) => {
585
- t(this, x) && t(this, M).current && c(this, o, bt).call(this);
585
+ t(this, P) && t(this, M).current && c(this, o, bt).call(this);
586
586
  }), t(this, q).subscribe((e) => {
587
- t(this, x) && t(this, M).current && c(this, o, bt).call(this);
587
+ t(this, P) && t(this, M).current && c(this, o, bt).call(this);
588
588
  }), t(this, u).isRunning.subscribe((e) => {
589
589
  this.classList.toggle("active", e.current);
590
590
  }), t(this, E).subscribe((e) => {
@@ -595,45 +595,45 @@ class Jt extends HTMLElement {
595
595
  e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, le).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, ce).call(this));
596
596
  }), t(this, ht).subscribe((e) => {
597
597
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Se).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, ge).call(this));
598
- }), t(this, vt).observe(), t(this, P).observe(), t(this, X).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, A).observe(), t(this, Y).observe(), t(this, tt).observe(), t(this, N).observe(), t(this, et).observe(), t(this, yt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, xt).observe(), t(this, It).observe(), t(this, T).observe(), t(this, T).observe(), t(this, Pt).observe(), t(this, st).observe(), t(this, M).observe(), t(this, it).observe(), t(this, q).observe(), t(this, rt).observe(), t(this, Lt).observe(), t(this, nt).observe(), t(this, ht).observe(), zt.subscribe(t(this, ee), me.LAST);
598
+ }), t(this, vt).observe(), t(this, x).observe(), t(this, X).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, A).observe(), t(this, Y).observe(), t(this, tt).observe(), t(this, N).observe(), t(this, et).observe(), t(this, yt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, Tt).observe(), t(this, T).observe(), t(this, T).observe(), t(this, xt).observe(), t(this, st).observe(), t(this, M).observe(), t(this, it).observe(), t(this, q).observe(), t(this, rt).observe(), t(this, Lt).observe(), t(this, nt).observe(), t(this, ht).observe(), It.subscribe(t(this, ee), me.LAST);
599
599
  }
600
600
  disconnectedCallback() {
601
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, P).unobserve(), t(this, X).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, A).unobserve(), t(this, Y).unobserve(), t(this, tt).unobserve(), t(this, N).unobserve(), t(this, et).unobserve(), t(this, yt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, xt).unobserve(), t(this, It).unobserve(), t(this, T).unobserve(), t(this, Pt).unobserve(), t(this, st).unobserve(), t(this, M).unobserve(), t(this, it).unobserve(), t(this, q).unobserve(), t(this, rt).unobserve(), t(this, Lt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), zt.unsubscribe(t(this, ee)), c(this, o, Se).call(this);
601
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, x).unobserve(), t(this, X).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, A).unobserve(), t(this, Y).unobserve(), t(this, tt).unobserve(), t(this, N).unobserve(), t(this, et).unobserve(), t(this, yt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, Tt).unobserve(), t(this, T).unobserve(), t(this, xt).unobserve(), t(this, st).unobserve(), t(this, M).unobserve(), t(this, it).unobserve(), t(this, q).unobserve(), t(this, rt).unobserve(), t(this, Lt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), It.unsubscribe(t(this, ee)), c(this, o, Se).call(this);
602
602
  }
603
603
  }
604
- u = new WeakMap(), vt = new WeakMap(), P = new WeakMap(), X = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), tt = new WeakMap(), N = new WeakMap(), et = new WeakMap(), yt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), xt = new WeakMap(), It = new WeakMap(), T = new WeakMap(), Pt = new WeakMap(), st = new WeakMap(), M = new WeakMap(), it = new WeakMap(), q = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), f = new WeakMap(), Tt = new WeakMap(), l = new WeakMap(), Xt = new WeakMap(), Yt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), z = new WeakMap(), V = new WeakMap(), lt = new WeakMap(), O = new WeakMap(), w = new WeakMap(), E = new WeakMap(), At = new WeakMap(), ct = new WeakMap(), U = new WeakMap(), G = new WeakMap(), at = new WeakMap(), Dt = new WeakMap(), ut = new WeakMap(), K = new WeakMap(), Mt = new WeakMap(), R = new WeakMap(), x = new WeakMap(), o = new WeakSet(), be = function() {
605
- const e = t(this, P).current, i = t(this, X).current ? "-reverse" : "";
606
- t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, et).current ? "max" : e, t(this, lt).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
604
+ u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), X = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), tt = new WeakMap(), N = new WeakMap(), et = new WeakMap(), yt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), Tt = new WeakMap(), T = new WeakMap(), xt = new WeakMap(), st = new WeakMap(), M = new WeakMap(), it = new WeakMap(), q = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), f = new WeakMap(), At = new WeakMap(), l = new WeakMap(), Xt = new WeakMap(), Yt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), z = new WeakMap(), V = new WeakMap(), lt = new WeakMap(), O = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Dt = new WeakMap(), ct = new WeakMap(), U = new WeakMap(), G = new WeakMap(), at = new WeakMap(), Mt = new WeakMap(), ut = new WeakMap(), K = new WeakMap(), Vt = new WeakMap(), R = new WeakMap(), P = new WeakMap(), o = new WeakSet(), be = function() {
605
+ const e = t(this, x).current, i = t(this, X).current ? "-reverse" : "";
606
+ t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, et).current ? "max" : e, t(this, lt).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, P) && t(this, L).call(this);
607
607
  }, Zt = function() {
608
- c(this, o, kt).call(this), t(this, Tt).assignedElements().forEach((e, i) => {
608
+ c(this, o, zt).call(this), t(this, At).assignedElements().forEach((e, i) => {
609
609
  e instanceof HTMLElement && t(this, l).push(new Je(e, i, this));
610
610
  }), t(this, f).style.transform = "", oe(this, "scrollSectionsChange", {
611
611
  custom: !0,
612
612
  composed: !0
613
613
  }), t(this, L).call(this), c(this, o, bt).call(this);
614
- }, kt = function() {
614
+ }, zt = function() {
615
615
  t(this, l).forEach((e) => {
616
616
  e.destroy();
617
- }), r(this, l, []), t(this, E).reset(), t(this, u).reset(), oe(this, "scrollSectionsChange", {
617
+ }), n(this, l, []), t(this, E).reset(), t(this, u).reset(), oe(this, "scrollSectionsChange", {
618
618
  custom: !0,
619
619
  composed: !0
620
620
  });
621
621
  }, le = function() {
622
- t(this, G) || (r(this, G, !0), t(this, u).unsubscribe(t(this, Vt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Dt)), clearInterval(t(this, ut)), t(this, K).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, lt).disconnect(), t(this, O).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
622
+ t(this, G) || (n(this, G, !0), t(this, u).unsubscribe(t(this, Ot)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Mt)), clearInterval(t(this, ut)), t(this, K).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, lt).disconnect(), t(this, O).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
623
623
  e.unsetTransform();
624
624
  }), t(this, L).call(this)));
625
625
  }, ce = function() {
626
- t(this, G) && (r(this, G, !1), t(this, u).subscribe(t(this, Vt)), t(this, V).connect(), t(this, lt).connect(), t(this, O).connect(), t(this, T).current && t(this, w).connect());
626
+ t(this, G) && (n(this, G, !1), t(this, u).subscribe(t(this, Ot)), t(this, V).connect(), t(this, lt).connect(), t(this, O).connect(), t(this, T).current && t(this, w).connect());
627
627
  }, Se = function() {
628
- t(this, at) || (r(this, at, !0), zt.unsubscribe(t(this, L)), jt.unsubscribe(t(this, L)), c(this, o, le).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, kt).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
628
+ t(this, at) || (n(this, at, !0), It.unsubscribe(t(this, L)), jt.unsubscribe(t(this, L)), c(this, o, le).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, zt).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
629
629
  }, ge = function() {
630
- t(this, at) && (r(this, at, !1), St.register(this), (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, A).current) && c(this, o, Zt).call(this), c(this, o, ce).call(this), zt.subscribe(t(this, L), me.SCROLL), jt.subscribe(this, t(this, L)));
631
- }, L = new WeakMap(), Vt = new WeakMap(), Te = function(e) {
630
+ t(this, at) && (n(this, at, !1), St.register(this), (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, A).current) && c(this, o, Zt).call(this), c(this, o, ce).call(this), It.subscribe(t(this, L), me.SCROLL), jt.subscribe(this, t(this, L)));
631
+ }, L = new WeakMap(), Ot = new WeakMap(), Te = function(e) {
632
632
  let i = t(this, E).current;
633
633
  return t(this, y).current ? i = Be(e, t(this, l).length) : i = ze(e, 0, this.limit), i;
634
- }, Ot = new WeakMap(), te = new WeakMap(), ve = function(e = 1) {
634
+ }, Rt = new WeakMap(), te = new WeakMap(), ve = function(e = 1) {
635
635
  t(this, st).current && (t(this, w).direction = e), t(this, T).current && t(this, w).pauseAndContinue(
636
- t(this, Pt).current,
636
+ t(this, xt).current,
637
637
  this.sectionalCSSProperty.current
638
638
  );
639
639
  }, ye = function(e = "current") {
@@ -645,28 +645,28 @@ u = new WeakMap(), vt = new WeakMap(), P = new WeakMap(), X = new WeakMap(), W =
645
645
  }, bt = function() {
646
646
  if (t(this, l).length) {
647
647
  const e = t(this, E).current + t(this, it).current;
648
- if (e === 0 ? r(this, R, "start") : e === this.limit ? r(this, R, "end") : r(this, R, null), oe(this, "scrollLine", {
648
+ if (e === 0 ? n(this, R, "start") : e === this.limit ? n(this, R, "end") : n(this, R, null), oe(this, "scrollLine", {
649
649
  detail: { line: t(this, R) }
650
650
  }), t(this, M).current) {
651
651
  this.classList.remove("end", "start"), t(this, R) && this.classList.add(t(this, R));
652
652
  const i = t(this, D).current + t(this, q).current;
653
- t(this, l).forEach((n, d) => {
653
+ t(this, l).forEach((r, d) => {
654
654
  const m = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
655
- d >= e && d < C || d <= m ? n.mark("current") : d >= C && d < C + I / 2 || d <= m + i ? n.mark("next") : n.mark("previous");
655
+ d >= e && d < C || d <= m ? r.mark("current") : d >= C && d < C + I / 2 || d <= m + i ? r.mark("next") : r.mark("previous");
656
656
  });
657
657
  }
658
658
  }
659
659
  }, // TODO: Учитывать loop
660
660
  ae = function() {
661
- let e = this.targetScrollValue, i = 1 / 0, n = 0;
661
+ let e = this.targetScrollValue, i = 1 / 0, r = 0;
662
662
  const d = t(this, u).direction;
663
663
  for (let m = 0; m < t(this, l).length; m++) {
664
664
  const C = t(this, l)[m];
665
- let I = t(this, Mt) ? C.size * d * -1 * 0.4 : 0, ue = C.position;
665
+ let I = t(this, Vt) ? C.size * d * -1 * 0.4 : 0, ue = C.position;
666
666
  const _t = Math.abs(ue + I - e);
667
- _t < i && (i = _t, n = m);
667
+ _t < i && (i = _t, r = m);
668
668
  }
669
- return n;
669
+ return r;
670
670
  }, ee = new WeakMap();
671
671
  H && !customElements.get("e-scroll") && customElements.define("e-scroll", Jt);
672
672
  var se;
@@ -680,11 +680,11 @@ class Ce extends HTMLElement {
680
680
  }
681
681
  connectedCallback() {
682
682
  const e = Ie(this, Jt);
683
- e instanceof Jt ? r(this, se, e) : console.error(this, "e-scroll not found");
683
+ e instanceof Jt ? n(this, se, e) : console.error(this, "e-scroll not found");
684
684
  }
685
685
  }
686
686
  se = new WeakMap();
687
- var dt, k, _, Z, Rt, Ht, pt, Bt, ie, re;
687
+ var dt, k, _, Z, Ht, Bt, pt, Wt, ie, re;
688
688
  class Xe extends Ce {
689
689
  constructor() {
690
690
  super();
@@ -692,15 +692,15 @@ class Xe extends Ce {
692
692
  s(this, k, null);
693
693
  s(this, _, !1);
694
694
  s(this, Z, 0);
695
- s(this, Rt, 0);
696
695
  s(this, Ht, 0);
696
+ s(this, Bt, 0);
697
697
  s(this, pt, () => {
698
- r(this, _, this.offsetWidth > this.offsetHeight);
698
+ n(this, _, this.offsetWidth > this.offsetHeight);
699
699
  const e = t(this, _) ? this.offsetWidth : this.offsetHeight;
700
- r(this, Z, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, Z, Math.max(t(this, Z), 30)), t(this, _) ? (t(this, k).style.width = t(this, Z) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, Z) + "px"), r(this, Rt, e - t(this, Z)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Bt).call(this);
700
+ n(this, Z, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, Z, Math.max(t(this, Z), 30)), t(this, _) ? (t(this, k).style.width = t(this, Z) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, Z) + "px"), n(this, Ht, e - t(this, Z)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Wt).call(this);
701
701
  });
702
- s(this, Bt, () => {
703
- r(this, Ht, this.scrollElement.currentProgress * t(this, Rt)), t(this, _) ? t(this, k).style.transform = `translate3d(${t(this, Ht)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Ht)}px, 0px)`;
702
+ s(this, Wt, () => {
703
+ n(this, Bt, this.scrollElement.currentProgress * t(this, Ht)), t(this, _) ? t(this, k).style.transform = `translate3d(${t(this, Bt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Bt)}px, 0px)`;
704
704
  });
705
705
  s(this, ie, () => {
706
706
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
@@ -708,14 +708,14 @@ class Xe extends Ce {
708
708
  s(this, re, (e) => {
709
709
  document.documentElement.classList.add("grabbing"), _e(
710
710
  (d) => {
711
- const m = t(this, _) ? d.x : d.y, C = this.scrollElement.distance / t(this, Rt), I = (m - n) * C;
711
+ const m = t(this, _) ? d.x : d.y, C = this.scrollElement.distance / t(this, Ht), I = (m - r) * C;
712
712
  this.scrollElement.setPosition(i + I);
713
713
  },
714
714
  () => {
715
715
  document.documentElement.classList.remove("grabbing");
716
716
  }
717
717
  );
718
- const i = this.scrollElement.damped.target, n = t(this, _) ? e.x : e.y;
718
+ const i = this.scrollElement.damped.target, r = t(this, _) ? e.x : e.y;
719
719
  });
720
720
  if (H) {
721
721
  const e = this.attachShadow({ mode: "open" });
@@ -749,7 +749,7 @@ class Xe extends Ce {
749
749
  touchAction: "none"
750
750
  }
751
751
  })
752
- ], r(this, dt, document.createElement("slot")), t(this, dt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, dt));
752
+ ], n(this, dt, document.createElement("slot")), t(this, dt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, dt));
753
753
  }
754
754
  }
755
755
  get thumbElement() {
@@ -758,65 +758,65 @@ class Xe extends Ce {
758
758
  connectedCallback() {
759
759
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
760
760
  const e = t(this, dt).assignedElements()[0] || t(this, dt).firstElementChild;
761
- r(this, k, e), t(this, k).addEventListener("pointerdown", t(this, re)), zt.subscribe(t(this, pt), me.SCROLL), jt.subscribe(this, t(this, pt)), jt.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, Bt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ie));
761
+ n(this, k, e), t(this, k).addEventListener("pointerdown", t(this, re)), It.subscribe(t(this, pt), me.SCROLL), jt.subscribe(this, t(this, pt)), jt.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, Wt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ie));
762
762
  }
763
763
  disconnectedCallback() {
764
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, re)), zt.unsubscribe(t(this, pt)), jt.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Bt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ie));
764
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, re)), It.unsubscribe(t(this, pt)), jt.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Wt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ie));
765
765
  }
766
766
  }
767
- dt = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), Rt = new WeakMap(), Ht = new WeakMap(), pt = new WeakMap(), Bt = new WeakMap(), ie = new WeakMap(), re = new WeakMap();
767
+ dt = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), pt = new WeakMap(), Wt = new WeakMap(), ie = new WeakMap(), re = new WeakMap();
768
768
  H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", Xe);
769
- var Wt, Ft, $t;
769
+ var Ft, $t, Nt;
770
770
  class Ae extends Ce {
771
771
  constructor() {
772
772
  super();
773
- s(this, Wt, new p(this, "--behaviour", "smooth"));
774
- s(this, Ft, new p(
773
+ s(this, Ft, new p(this, "--behaviour", "smooth"));
774
+ s(this, $t, new p(
775
775
  this,
776
776
  "--tween-easing",
777
777
  !1
778
778
  ));
779
- s(this, $t, new p(this, "--tween-duration", 0));
779
+ s(this, Nt, new p(this, "--tween-duration", 0));
780
780
  H && this.addEventListener("click", () => {
781
- const e = t(this, Wt).current, i = t(this, Ft).current, n = t(this, $t).current;
781
+ const e = t(this, Ft).current, i = t(this, $t).current, r = t(this, Nt).current;
782
782
  this.handleClick({
783
783
  behaviour: e,
784
- tween: i || n ? { easing: i, duration: n } : void 0
784
+ tween: i || r ? { easing: i, duration: r } : void 0
785
785
  });
786
786
  });
787
787
  }
788
788
  connectedCallback() {
789
- super.connectedCallback(), t(this, Wt).observe(), t(this, Ft).observe(), t(this, $t).observe();
789
+ super.connectedCallback(), t(this, Ft).observe(), t(this, $t).observe(), t(this, Nt).observe();
790
790
  }
791
791
  disconnectedCallback() {
792
- t(this, Wt).close(), t(this, Ft).close(), t(this, $t).close();
792
+ t(this, Ft).close(), t(this, $t).close(), t(this, Nt).close();
793
793
  }
794
794
  }
795
- Wt = new WeakMap(), Ft = new WeakMap(), $t = new WeakMap();
796
- var Nt;
795
+ Ft = new WeakMap(), $t = new WeakMap(), Nt = new WeakMap();
796
+ var qt;
797
797
  class Ye extends Ae {
798
798
  constructor() {
799
799
  super(...arguments);
800
- s(this, Nt, new p(this, "--set", 1));
800
+ s(this, qt, new p(this, "--set", 1));
801
801
  }
802
802
  handleClick(e) {
803
- this.scrollElement.scrollToSection(t(this, Nt).current, e);
803
+ this.scrollElement.scrollToSection(t(this, qt).current, e);
804
804
  }
805
805
  connectedCallback() {
806
- super.connectedCallback(), t(this, Nt).observe();
806
+ super.connectedCallback(), t(this, qt).observe();
807
807
  }
808
808
  disconnectedCallback() {
809
- super.disconnectedCallback(), t(this, Nt).close();
809
+ super.disconnectedCallback(), t(this, qt).close();
810
810
  }
811
811
  }
812
- Nt = new WeakMap();
812
+ qt = new WeakMap();
813
813
  H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Ye);
814
- var j, qt;
814
+ var j, Ut;
815
815
  class ts extends Ae {
816
816
  constructor() {
817
817
  super(...arguments);
818
818
  s(this, j, new p(this, "--step", 1));
819
- s(this, qt, () => {
819
+ s(this, Ut, () => {
820
820
  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");
821
821
  });
822
822
  }
@@ -825,77 +825,82 @@ class ts extends Ae {
825
825
  }
826
826
  connectedCallback() {
827
827
  super.connectedCallback(), this.scrollElement && (t(this, j).subscribe(() => {
828
- t(this, qt).call(this);
828
+ t(this, Ut).call(this);
829
829
  }), t(this, j).observe(), this.scrollElement.addEventListener(
830
830
  "scrollLine",
831
- t(this, qt)
832
- ), t(this, qt).call(this));
831
+ t(this, Ut)
832
+ ), t(this, Ut).call(this));
833
833
  }
834
834
  disconnectedCallback() {
835
835
  super.disconnectedCallback(), t(this, j).close(), this.removeAttribute("disabled");
836
836
  }
837
837
  }
838
- j = new WeakMap(), qt = new WeakMap();
838
+ j = new WeakMap(), Ut = new WeakMap();
839
839
  H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ts);
840
- var J, ft, Ut, ne, he, Gt;
840
+ var J, ft, Gt, ne, he, Kt;
841
841
  class es {
842
842
  constructor(h, e, i) {
843
843
  s(this, J, null);
844
844
  s(this, ft, null);
845
- s(this, Ut, null);
845
+ s(this, Gt, null);
846
846
  s(this, ne, null);
847
847
  s(this, he, () => {
848
- t(this, ft).scrollToSection(t(this, Ut), {
848
+ t(this, ft).scrollToSection(t(this, Gt), {
849
849
  behaviour: t(this, ne)
850
850
  });
851
851
  });
852
- s(this, Gt, () => {
852
+ s(this, Kt, () => {
853
853
  t(this, J).classList.toggle(
854
854
  "current",
855
- t(this, ft).counter.current === t(this, Ut)
855
+ t(this, ft).counter.current === t(this, Gt)
856
856
  );
857
857
  });
858
- H && (r(this, J, document.createElement("button")), r(this, ft, h), r(this, ne, i), r(this, Ut, e), t(this, J).addEventListener("click", t(this, he)), t(this, ft).counter.subscribe(t(this, Gt)), t(this, Gt).call(this));
858
+ H && (n(this, J, document.createElement("button")), n(this, ft, h), n(this, ne, i), n(this, Gt, e), t(this, J).addEventListener("click", t(this, he)), t(this, ft).counter.subscribe(t(this, Kt)), t(this, Kt).call(this));
859
859
  }
860
860
  get element() {
861
861
  return t(this, J);
862
862
  }
863
863
  destroy() {
864
- t(this, J).removeEventListener("click", t(this, he)), t(this, ft).counter.unsubscribe(t(this, Gt)), t(this, J).remove();
864
+ t(this, J).removeEventListener("click", t(this, he)), t(this, ft).counter.unsubscribe(t(this, Kt)), t(this, J).remove();
865
865
  }
866
866
  }
867
- J = new WeakMap(), ft = new WeakMap(), Ut = new WeakMap(), ne = new WeakMap(), he = new WeakMap(), Gt = new WeakMap();
868
- var mt, Kt;
867
+ J = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), ne = new WeakMap(), he = new WeakMap(), Kt = new WeakMap();
868
+ var mt, kt;
869
869
  class ss extends Ce {
870
870
  constructor() {
871
871
  super(...arguments);
872
872
  s(this, mt, []);
873
- s(this, Kt, Ze(() => {
874
- t(this, mt).forEach((e) => e.destroy()), r(this, mt, []);
875
- for (let e = 0; e < this.scrollElement.sections.length; e++) {
876
- const i = new es(
873
+ s(this, kt, Ze(() => {
874
+ t(this, mt).forEach((i) => i.destroy()), n(this, mt, []);
875
+ const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
876
+ for (let i = 0; i < e; i++) {
877
+ const r = new es(
877
878
  this.scrollElement,
878
- e,
879
+ i,
879
880
  this.getAttribute("behaviour") || "smooth"
880
881
  );
881
- this.appendChild(i.element), t(this, mt).push(i);
882
+ this.appendChild(r.element), t(this, mt).push(r);
882
883
  }
883
884
  }, 0));
884
885
  }
885
886
  connectedCallback() {
886
887
  super.connectedCallback(), this.scrollElement.addEventListener(
887
888
  "sectionsChange",
888
- t(this, Kt)
889
- ), t(this, Kt).call(this);
889
+ t(this, kt)
890
+ ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
891
+ t(this, kt)
892
+ );
890
893
  }
891
894
  disconnectedCallback() {
892
895
  this.scrollElement.removeEventListener(
893
896
  "sectionsChange",
894
- t(this, Kt)
895
- ), t(this, mt).forEach((e) => e.destroy()), r(this, mt, []);
897
+ t(this, kt)
898
+ ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
899
+ t(this, kt)
900
+ ), t(this, mt).forEach((e) => e.destroy()), n(this, mt, []);
896
901
  }
897
902
  }
898
- mt = new WeakMap(), Kt = new WeakMap();
903
+ mt = new WeakMap(), kt = new WeakMap();
899
904
  H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ss);
900
905
  class is extends je {
901
906
  connectedCallback() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.1",
3
+ "version": "0.50.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"