aptechka 0.75.0 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=d=>{throw TypeError(d)};var Us=(d,h,e)=>h in d?pi(d,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[h]=e,Zs=(d,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(d,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(d,e,h[e]);return d};var Is=(d,h,e)=>h.has(d)||Gs("Cannot "+e);var t=(d,h,e)=>(Is(d,h,"read from private field"),e?e.call(d):h.get(d)),i=(d,h,e)=>h.has(d)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(d):h.set(d,e),r=(d,h,e,s)=>(Is(d,h,"write to private field"),s?s.call(d,e):h.set(d,e),e),o=(d,h,e)=>(Is(d,h,"access private method"),e);var Rs=(d,h,e)=>gi(fi(d),e,h);var As=(d,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(d,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("../Store-Cd1GlEmZ.cjs"),_=require("../index-DekP7OZe.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-z9Uaw2MJ.cjs"),vi=require("../Tweened-mvHucL4Y.cjs"),Es=require("../DragControls-tVaq-vIe.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-JBOkFLTh.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 S,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,ds,Ss,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,Se,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,ds,0);i(this,Ss,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new de.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,ds)}get contentPosition(){return t(this,Ss)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,S).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,ds,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,Ss,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);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%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,S,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,Se).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,$e,0),t(this,S).max=t(this,P),t(this,S).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,S).damping=e.current}),t(this,ye).subscribe(e=>{t(this,S).mass=e.current}),t(this,ve).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,Se).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,Se).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}S=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,ds=new WeakMap,Ss=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,Se).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,S).unsubscribe(t(this,ps)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,S).subscribe(t(this,ps),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,S).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,S)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,S)[e]},Se=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{document.documentElement.classList.add("grabbing"),Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.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,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,dt,St,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,di,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,dt);i(this,St);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,dt,new l.CSSProperty(this,"--start-var","")),r(this,St,new l.CSSProperty(this,"--finish-var","")),r(this,w,new de.Store(!1)),r(this,H,new de.Store(!1)),r(this,W,new de.Store(!1)),r(this,tt,new de.Store(!1)),r(this,et,new de.Store(!1)),r(this,Z,new de.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,dt).current,t(this,O)),this.setVar(t(this,St).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,dt)}get finishVarCSSProperty(){return t(this,St)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,St).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,dt).close(),t(this,St).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,dt=new WeakMap,St=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},di=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,di).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,dt).current,t(this,St).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class Si extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",Si);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollSectionButtonElement=Si;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;exports.ScrollbarElement=ti;
1
+ "use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=d=>{throw TypeError(d)};var Us=(d,h,e)=>h in d?pi(d,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[h]=e,Zs=(d,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(d,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(d,e,h[e]);return d};var Is=(d,h,e)=>h.has(d)||Gs("Cannot "+e);var t=(d,h,e)=>(Is(d,h,"read from private field"),e?e.call(d):h.get(d)),i=(d,h,e)=>h.has(d)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(d):h.set(d,e),r=(d,h,e,s)=>(Is(d,h,"write to private field"),s?s.call(d,e):h.set(d,e),e),o=(d,h,e)=>(Is(d,h,"access private method"),e);var Rs=(d,h,e)=>gi(fi(d),e,h);var As=(d,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(d,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("../Store-Cd1GlEmZ.cjs"),_=require("../index-DekP7OZe.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-z9Uaw2MJ.cjs"),vi=require("../Tweened-mvHucL4Y.cjs"),Es=require("../DragControls-tVaq-vIe.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-JBOkFLTh.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 S,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,ds,Ss,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,Se,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,ds,0);i(this,Ss,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new de.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,ds)}get contentPosition(){return t(this,Ss)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,S).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,ds,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,Ss,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);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%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,S,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,Se).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,$e,0),t(this,S).max=t(this,P),t(this,S).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,S).damping=e.current}),t(this,ye).subscribe(e=>{t(this,S).mass=e.current}),t(this,ve).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,Se).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,Se).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}S=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,ds=new WeakMap,Ss=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,Se).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,S).unsubscribe(t(this,ps)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,S).subscribe(t(this,ps),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,S).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,S)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,S)[e]},Se=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{document.documentElement.classList.add("grabbing"),Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.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,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,dt,St,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,di,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,dt);i(this,St);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,dt,new l.CSSProperty(this,"--start-var","")),r(this,St,new l.CSSProperty(this,"--finish-var","")),r(this,w,new de.Store(!1)),r(this,H,new de.Store(!1)),r(this,W,new de.Store(!1)),r(this,tt,new de.Store(!1)),r(this,et,new de.Store(!1)),r(this,Z,new de.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,dt).current,t(this,O)),this.setVar(t(this,St).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,dt)}get finishVarCSSProperty(){return t(this,St)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,St).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,dt).close(),t(this,St).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,dt=new WeakMap,St=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},di=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,di).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,dt).current,t(this,St).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class Si extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",Si);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ti;exports.ScrollSectionButtonElement=Si;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;
@@ -1,5 +1,5 @@
1
1
  export { ScrollElement, type ScrollBehaviour, type ScrollEvents, } from './ScrollElement';
2
- export { ScrollbarElement } from './ScrollbarElement';
2
+ export { ScrollScrollbarElement } from './ScrollScrollbarElement';
3
3
  export { ScrollSetButtonElement } from './ScrollSetButtonElement';
4
4
  export { ScrollStepButtonElement } from './ScrollStepButtonElement';
5
5
  export { ScrollBulletButtonsElement } from './ScrollBulletButtonsElement';
@@ -36,7 +36,7 @@ import { q as fi } from "../easings-BEmRlrDd.js";
36
36
  import { i as pi } from "../element-CGVl1jA-.js";
37
37
  import { d as st } from "../events-CsVF98U6.js";
38
38
  import { d as xs } from "../function-C10DGppn.js";
39
- import { a as ls, g as cs, c as bi } from "../layout-DpZo-I0y.js";
39
+ import { a as ls, g as cs, b as bi } from "../layout-BSMtwCga.js";
40
40
  import { c as js, s as mi } from "../math-BOBiC4TN.js";
41
41
  import { p as Si, l as gi } from "../number-CumqY64S.js";
42
42
  import { c as Js } from "../stylesheet-DpnWNVyD.js";
@@ -894,7 +894,7 @@ class zi extends is {
894
894
  }
895
895
  }
896
896
  Yt = new WeakMap(), O = new WeakMap(), Vt = new WeakMap(), zt = new WeakMap(), Ge = new WeakMap(), Ue = new WeakMap(), _t = new WeakMap(), Ke = new WeakMap(), gs = new WeakMap(), vs = new WeakMap();
897
- q && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", zi);
897
+ q && !customElements.get("e-scroll-scrollbar") && customElements.define("e-scroll-scrollbar", zi);
898
898
  var Ze, je, Je;
899
899
  class Bs extends is {
900
900
  constructor() {
@@ -1500,10 +1500,10 @@ export {
1500
1500
  Fi as ScrollBulletButtonsElement,
1501
1501
  Hs as ScrollCounterElement,
1502
1502
  As as ScrollElement,
1503
+ zi as ScrollScrollbarElement,
1503
1504
  Ri as ScrollSectionButtonElement,
1504
1505
  Ti as ScrollSegmentElement,
1505
1506
  Ai as ScrollSetButtonElement,
1506
1507
  Ii as ScrollStepButtonElement,
1507
- $s as ScrollTotalElement,
1508
- zi as ScrollbarElement
1508
+ $s as ScrollTotalElement
1509
1509
  };
@@ -1,5 +1,5 @@
1
1
  import { g as l, f as u } from "./dom-CVWzyXPH.js";
2
- import { a as g } from "./layout-DpZo-I0y.js";
2
+ import { a as g } from "./layout-BSMtwCga.js";
3
3
  import "construct-style-sheets-polyfill";
4
4
  import "./index-Bv9zgfdb.js";
5
5
  function w(e) {
@@ -0,0 +1,38 @@
1
+ import { ElementLinkedStore } from '../element-linked-store';
2
+ export interface ScrollRegionElementEvents {
3
+ scrollRegionProgress: CustomEvent<{
4
+ scrolled: number;
5
+ progress: number;
6
+ }>;
7
+ scrollRegionEnter: CustomEvent;
8
+ scrollRegionExit: CustomEvent;
9
+ }
10
+ export declare class ScrollRegionElement extends HTMLElement {
11
+ #private;
12
+ get start(): number;
13
+ get finish(): number;
14
+ get distance(): number;
15
+ get scrolled(): number;
16
+ get progress(): number;
17
+ get status(): ElementLinkedStore<{
18
+ enabled: false;
19
+ entered: false;
20
+ enteredOnLoad: false;
21
+ activated: false;
22
+ }>;
23
+ get scrollValue(): number;
24
+ resize(): void;
25
+ tick(): void;
26
+ destroy(): void;
27
+ enable(): void;
28
+ disable(): void;
29
+ protected connectedCallback(): void;
30
+ protected disconnectedCallback(): void;
31
+ }
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ 'e-scroll-region': ScrollRegionElement;
35
+ }
36
+ interface HTMLElementEventMap extends ScrollRegionElementEvents {
37
+ }
38
+ }
@@ -1,10 +1,10 @@
1
- export declare class CustomScrollbarElement extends HTMLElement {
1
+ export declare class ScrollbarElement extends HTMLElement {
2
2
  #private;
3
3
  protected connectedCallback(): void;
4
4
  protected disconnectedCallback(): void;
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
8
- 'e-custom-scrollbar': CustomScrollbarElement;
8
+ 'e-scrollbar': ScrollbarElement;
9
9
  }
10
10
  }
@@ -0,0 +1,16 @@
1
+ import { DampedOptions } from '../animation';
2
+ export declare class SmoothScrollElement extends HTMLElement {
3
+ #private;
4
+ resize(): void;
5
+ stop(): void;
6
+ sync(): void;
7
+ shiftPosition(value: number): void;
8
+ setPosition(value: number, options?: DampedOptions): void;
9
+ protected connectedCallback(): void;
10
+ protected disconnectedCallback(): void;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'e-smooth-scroll': SmoothScrollElement;
15
+ }
16
+ }
@@ -0,0 +1 @@
1
+ "use strict";var ft=n=>{throw TypeError(n)};var ot=(n,c,e)=>c.has(n)||ft("Cannot "+e);var t=(n,c,e)=>(ot(n,c,"read from private field"),e?e.call(n):c.get(n)),s=(n,c,e)=>c.has(n)?ft("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,e),r=(n,c,e,i)=>(ot(n,c,"write to private field"),i?i.call(n,e):c.set(n,e),e),d=(n,c,e)=>(ot(n,c,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ct=require("../index-DekP7OZe.cjs"),kt=require("../dom-JBOkFLTh.cjs"),zt=require("../gestures-C7gbKx11.cjs");require("construct-style-sheets-polyfill");const j=require("../ticker/index.cjs"),lt=require("../scroll-entries/index.cjs");require("../Store-Cd1GlEmZ.cjs");const Ht=require("../Damped-z9Uaw2MJ.cjs"),g=require("../css-property/index.cjs"),qt=require("../element-linked-store/index.cjs"),bt=require("../element-resizer/index.cjs"),ht=require("../events-KVanG9sR.cjs"),gt=require("../layout-Ctc2p3uz.cjs"),Mt=require("../math-GDWEqu7y.cjs"),pt=require("../window-resizer/index.cjs");var o,f,W,x,a,O,E,at,yt,Et,B,nt,K,k,J;class St extends HTMLElement{constructor(){super(...arguments);s(this,E);s(this,o,null);s(this,f,null);s(this,W,0);s(this,x,0);s(this,a,!1);s(this,O);s(this,B,()=>{this.classList.add("active"),clearTimeout(t(this,O));const i=t(this,E,at)/t(this,x)*t(this,W);t(this,a)?t(this,f).style.transform=`translate3d(${i}px, 0px, 0px)`:t(this,f).style.transform=`translate3d(0px, ${i}px, 0px)`,r(this,O,setTimeout(()=>{this.classList.remove("active")},1e3))});s(this,nt,()=>{const e=t(this,a)?this.offsetWidth:this.offsetHeight,i=t(this,E,yt),b=t(this,E,Et);r(this,x,i-b);let v=e*e/(t(this,x)+e);v=Math.max(v,30),t(this,a)?(t(this,f).style.width=v+"px",t(this,f).style.height="100%"):(t(this,f).style.width="100%",t(this,f).style.height=v+"px"),r(this,W,e-v),i<=b?this.style.display="none":this.style.display="block"});s(this,K,e=>{document.documentElement.classList.add("grabbing");const i=t(this,E,at),b=t(this,a)?e.x:e.y;zt.setupDrag(v=>{const xt=t(this,x)/t(this,W),mt=(t(this,a)?v.x-b:v.y-b)*xt;t(this,a)?t(this,o).scroll({left:i+mt,behavior:"instant"}):t(this,o).scroll({top:i+mt,behavior:"instant"})},()=>{document.documentElement.classList.remove("grabbing")})});s(this,k,()=>{t(this,nt).call(this)});s(this,J,e=>{e.isIntersecting?(j.ticker.subscribe(t(this,k),{maxFPS:5}),t(this,k).call(this)):j.ticker.unsubscribe(t(this,k))})}connectedCallback(){const e=this.getAttribute("data-scroll");let i=null;e&&(e==="parent"?i=this.parentElement:i=document.querySelector(e)),i||(i=kt.findScrollParentElement(this),i===document.body&&(i=window)),r(this,a,this.hasAttribute("horisontal"));const b=this.querySelector("[data-thumb]");i&&b&&(r(this,o,i),r(this,f,b),t(this,o).addEventListener("scroll",t(this,B)),t(this,f).addEventListener("pointerdown",t(this,K)),ct.intersector.subscribe(this.parentElement===document.body?this:this.parentElement,t(this,J)))}disconnectedCallback(){t(this,o).removeEventListener("scroll",t(this,B)),t(this,f).removeEventListener("pointerdown",t(this,K)),clearTimeout(t(this,O)),ct.intersector.unsubscribe(t(this,J)),j.ticker.unsubscribe(t(this,k))}}o=new WeakMap,f=new WeakMap,W=new WeakMap,x=new WeakMap,a=new WeakMap,O=new WeakMap,E=new WeakSet,at=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollLeft:t(this,o).scrollTop:t(this,a)?t(this,o).scrollX:t(this,o).scrollY},yt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollWidth:t(this,o).scrollHeight:t(this,a)?Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth):Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},Et=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).offsetWidth:t(this,o).offsetHeight:t(this,a)?innerWidth:innerHeight},B=new WeakMap,nt=new WeakMap,K=new WeakMap,k=new WeakMap,J=new WeakMap;ct.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",St);const Vt=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","Space"]);var D,_,l,N,Y,z,X,Q,Z,tt,et,st;class vt extends HTMLElement{constructor(){super(...arguments);s(this,z);s(this,D,new g.CSSProperty(this,"--smooth-scroll-disabled",!1));s(this,_,new g.CSSProperty(this,"--smooth-scroll-damping",10));s(this,l,new Ht.Damped(0));s(this,N,0);s(this,Y,!1);s(this,Q,e=>{if(!d(this,z,X).call(this)){if(Math.sign(e.deltaY)<0&&t(this,l).target===0&&t(this,l).direction<0||Math.sign(e.deltaY)>0&&t(this,l).target===t(this,l).max&&t(this,l).direction>0||e.stopPropagation(),e.target instanceof Element){const i=e.target.closest("[data-prevent-smooth-scroll]");if(i){const b=i.getAttribute("data-prevent-smooth-scroll");if(b){if(matchMedia(b).matches)return}else return}}Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),this.shiftPosition(e.deltaY))}});s(this,Z,()=>{d(this,z,X).call(this)||this.stop()});s(this,tt,e=>{d(this,z,X).call(this)||e.target instanceof Element&&e.target.closest("a")&&this.stop()});s(this,et,()=>{this.resize()});s(this,st,e=>{d(this,z,X).call(this)||Vt.has(e.code)&&this.stop()})}resize(){t(this,l).min=0,t(this,l).max=this.scrollHeight-this.offsetHeight}stop(){t(this,l).unlistenAnimationFrame(),r(this,Y,!0)}sync(){const e=this.scrollTop;(t(this,Y)||Math.abs(e-t(this,l).current)>100)&&(r(this,Y,!1),t(this,l).set(e,{equalize:!0}))}shiftPosition(e){this.resize(),this.sync(),t(this,l).shift(e)}setPosition(e,i){this.resize(),this.sync(),t(this,l).set(e,i)}connectedCallback(){window.addEventListener("resize",t(this,et)),this.addEventListener("keydown",t(this,st)),this.addEventListener("pointerdown",t(this,tt)),this.addEventListener("touchstart",t(this,Z)),this.addEventListener("wheel",t(this,Q),{passive:!1}),t(this,l).subscribe(e=>{const i=Math.round(e.current);lt.scrollEntries.update(this,"y",e.current),i!==t(this,N)&&this.scroll({top:i,behavior:"instant"}),r(this,N,i)}),t(this,_).observe(),t(this,D).observe(),t(this,_).subscribe(e=>{t(this,l).damping=e.current}),lt.scrollEntries.register(this),this.resize()}disconnectedCallback(){t(this,l).close(),t(this,_).close(),t(this,D).close(),lt.scrollEntries.unregister(this),window.removeEventListener("resize",t(this,et)),this.removeEventListener("keydown",t(this,st)),this.removeEventListener("pointerdown",t(this,tt)),this.removeEventListener("touchstart",t(this,Z)),this.removeEventListener("wheel",t(this,Q))}}D=new WeakMap,_=new WeakMap,l=new WeakMap,N=new WeakMap,Y=new WeakMap,z=new WeakSet,X=function(){return t(this,D).current||getComputedStyle(this).getPropertyValue("overflow")==="hidden"},Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap;customElements.get("e-smooth-scroll")||customElements.define("e-smooth-scroll",vt);var S,H,F,w,q,M,$,L,G,y,V,u,it,m,p,T,A,P,I,h,Lt,dt,Pt,C,R,ut,Ct,rt,U;class wt extends HTMLElement{constructor(){super(...arguments);s(this,h);s(this,S,this);s(this,H,null);s(this,F,new g.CSSProperty(this,"--scroll-region-status-holder",!1));s(this,w,new g.CSSProperty(this,"--scroll-region-disabled",!1));s(this,q,new g.CSSProperty(this,"--scroll-region-start-offset",0,{rawValueCheck:!1}));s(this,M,new g.CSSProperty(this,"--scroll-region-start-offset-min",!1,{rawValueCheck:!1}));s(this,$,new g.CSSProperty(this,"--scroll-region-start-extra-offset",0,{rawValueCheck:!1}));s(this,L,new g.CSSProperty(this,"--scroll-region-distance",0,{rawValueCheck:!1}));s(this,G,new g.CSSProperty(this,"--scroll-region-distance-offset",0,{rawValueCheck:!1}));s(this,y,new g.CSSProperty(this,"--scroll-region-progress-var",""));s(this,V,new g.CSSProperty(this,"--scroll-region-enter-once",!1));s(this,u,new qt.ElementLinkedStore(this,{enabled:!1,entered:!1,enteredOnLoad:!1,activated:!1}));s(this,it,0);s(this,m,0);s(this,p,0);s(this,T,0);s(this,A,0);s(this,P,0);s(this,I,!1);s(this,C,()=>{this.resize()});s(this,R,()=>{this.tick()});s(this,U,()=>{document.readyState==="complete"&&d(this,h,Pt).call(this)})}get start(){return t(this,m)}get finish(){return t(this,p)}get distance(){return t(this,T)}get scrolled(){return t(this,A)}get progress(){return t(this,P)}get status(){return t(this,u)}get scrollValue(){return t(this,H)instanceof HTMLElement?t(this,H).scrollTop:t(this,H).scrollY}resize(){t(this,w).current||(r(this,it,gt.getCumulativeOffsetTop(this)),r(this,m,t(this,it)),typeof t(this,M).current=="number"?r(this,m,t(this,m)+Math.max(t(this,q).current,t(this,M).current)):r(this,m,t(this,m)+t(this,q).current),r(this,m,t(this,m)+t(this,$).current),r(this,m,t(this,m)-gt.getStickyOffset(this,"top")),r(this,p,t(this,m)),t(this,L).current?r(this,p,t(this,p)+t(this,L).current):r(this,p,t(this,p)+this.offsetHeight),r(this,p,t(this,p)+t(this,G).current),r(this,T,t(this,p)-t(this,m)),r(this,I,this.offsetWidth!==0&&this.offsetHeight!==0),this.tick())}tick(){if(t(this,w).current)return;const e=this.scrollValue;r(this,A,Mt.clamp(e-t(this,m),0,t(this,T))),r(this,P,t(this,A)/t(this,T)||0),t(this,y).current&&t(this,S).style.setProperty(d(this,h,rt).call(this,t(this,y).current),t(this,P).toFixed(6)),t(this,u).set("activated",e>=t(this,m)),t(this,I)&&t(this,u).isFalse("entered")&&e>=t(this,m)&&e<=t(this,p)?d(this,h,ut).call(this):t(this,I)&&!t(this,V).current&&t(this,u).isTrue("entered")&&(e<t(this,m)||e>t(this,p))&&d(this,h,Ct).call(this),t(this,V).current&&t(this,P)===1&&(t(this,u).current.entered||d(this,h,ut).call(this),this.destroy()),ht.dispatchEvent(this,"scrollRegionProgress",{detail:{progress:t(this,P),scrolled:t(this,A)}})}destroy(){document.removeEventListener("readystatechange",t(this,U)),this.disable(),t(this,F).close(),t(this,w).close(),t(this,q).close(),t(this,M).close(),t(this,$).close(),t(this,L).close(),t(this,G).close(),t(this,y).close(),t(this,V).close()}enable(){j.ticker.subscribe(t(this,R),{culling:this}),bt.elementResizer.subscribe(this,t(this,C)),pt.windowResizer.subscribe(t(this,C)),t(this,R).call(this),t(this,u).set("enabled",!0)}disable(){j.ticker.unsubscribe(t(this,R)),bt.elementResizer.unsubscribe(t(this,C)),pt.windowResizer.unsubscribe(t(this,C)),t(this,u).reset(),d(this,h,dt).call(this)}connectedCallback(){const e=this.getAttribute("data-scroll")||".page-scroll";r(this,H,document.querySelector(e)),document.readyState==="complete"?t(this,U).call(this):document.addEventListener("readystatechange",t(this,U))}disconnectedCallback(){this.destroy()}}S=new WeakMap,H=new WeakMap,F=new WeakMap,w=new WeakMap,q=new WeakMap,M=new WeakMap,$=new WeakMap,L=new WeakMap,G=new WeakMap,y=new WeakMap,V=new WeakMap,u=new WeakMap,it=new WeakMap,m=new WeakMap,p=new WeakMap,T=new WeakMap,A=new WeakMap,P=new WeakMap,I=new WeakMap,h=new WeakSet,Lt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.add(this.getAttribute("data-global-class"))},dt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.remove(this.getAttribute("data-global-class"))},Pt=function(){t(this,F).subscribe(e=>{t(this,S)&&(t(this,u).removeElement(t(this,S)),t(this,S).style.removeProperty(d(this,h,rt).call(this,t(this,y).current))),r(this,S,e.current?document.querySelector(e.current)||this:this),console.log(e.current),t(this,u).addElement(t(this,S))}),t(this,w).subscribe(e=>{e.current&&!e.previous?this.disable():this.enable()}),t(this,y).subscribe(e=>{e.current?t(this,R).call(this):e.previous&&t(this,S).style.removeProperty(d(this,h,rt).call(this,e.previous))}),t(this,L).subscribe(()=>{t(this,C).call(this)}),t(this,F).observe(),t(this,w).observe(),t(this,q).observe(),t(this,M).observe(),t(this,$).observe(),t(this,L).observe(),t(this,G).observe(),t(this,y).observe(),t(this,V).observe()},C=new WeakMap,R=new WeakMap,ut=function(){const e=this.scrollValue;t(this,u).set("entered",!0),e===0&&t(this,u).set("enteredOnLoad",!0),d(this,h,Lt).call(this),ht.dispatchEvent(this,"scrollRegionEnter")},Ct=function(){t(this,u).set("entered",!1),d(this,h,dt).call(this),ht.dispatchEvent(this,"scrollRegionExit")},rt=function(e){return`--${e}`},U=new WeakMap;customElements.get("e-scroll-region")||customElements.define("e-scroll-region",wt);exports.ScrollRegionElement=wt;exports.ScrollbarElement=St;exports.SmoothScrollElement=vt;
@@ -0,0 +1,3 @@
1
+ export { ScrollbarElement } from './ScrollbarElement';
2
+ export { SmoothScrollElement } from './SmoothScrollElement';
3
+ export { ScrollRegionElement, type ScrollRegionElementEvents, } from './ScrollRegionElement';