aptechka 0.77.1 → 0.77.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/scroll/ScrollElement.d.ts +1 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +108 -105
- package/package.json +1 -1
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var me=Object.defineProperty,fe=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var Qt=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var Zt=(h,e)=>(e=Symbol[h])?e:Symbol.for("Symbol."+h),te=h=>{throw TypeError(h)};var _t=(h,e,s)=>e in h?me(h,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):h[e]=s,Rt=(h,e)=>{for(var s in e||(e={}))ge.call(e,s)&&_t(h,s,e[s]);if(Qt)for(var s of Qt(e))Ee.call(e,s)&&_t(h,s,e[s]);return h},qt=(h,e)=>fe(h,pe(e));var Dt=(h,e,s)=>e.has(h)||te("Cannot "+s);var t=(h,e,s)=>(Dt(h,e,"read from private field"),s?s.call(h):e.get(h)),l=(h,e,s)=>e.has(h)?te("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,s),o=(h,e,s,i)=>(Dt(h,e,"write to private field"),i?i.call(h,s):e.set(h,s),s),E=(h,e,s)=>(Dt(h,e,"access private method"),s);var G=(h,e,s)=>new Promise((i,n)=>{var S=c=>{try{g(s.next(c))}catch(v){n(v)}},p=c=>{try{g(s.throw(c))}catch(v){n(v)}},g=c=>c.done?i(c.value):Promise.resolve(c.value).then(S,p);g((s=s.apply(h,e)).next())});var ee=(h,e,s)=>(e=h[Zt("asyncIterator")])?e.call(h):(h=h[Zt("iterator")](),e={},s=(i,n)=>(n=h[i])&&(e[i]=S=>new Promise((p,g,c)=>(S=n.call(h,S),c=S.done,Promise.resolve(S.value).then(v=>p({value:v,done:c}),g)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("../index-DekP7OZe.cjs"),z=require("../events-KVanG9sR.cjs"),se=require("../scroll-CIdNtj3G.cjs");require("construct-style-sheets-polyfill");const dt=require("../url-Dns-01WU.cjs"),ve=require("../css-value-parser/index.cjs"),Le=require("../string-DUXXtU8v.cjs");class ne extends HTMLElement{connectedCallback(){const e={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(e))this.setAttribute(s,i)}}ae.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",ne);var C,a,M,st,Ht,ft,it;class zt{constructor(e,s){l(this,M);l(this,C);l(this,a);l(this,ft,e=>{var i;if(e.preventDefault(),document.documentElement.classList.contains("click-disabled"))return;if(t(this,a).hasAttribute("data-back")&&t(this,C).previousURL)history.back();else{const n=t(this,a).getAttribute("data-history-action")||"push",S=t(this,a).hasAttribute("data-center-scroll"),p=getComputedStyle(t(this,a)).getPropertyValue("--offset-scroll").trim(),g=p?ve.cssValueParser.parse(p):void 0,c=t(this,a).hasAttribute("data-revalidate")||t(this,a).hasAttribute("data-pagination-more-link")||t(this,a).hasAttribute("data-pagination-set-link"),v=t(this,a).hasAttribute("data-keep-search-parameters"),D=t(this,a).hasAttribute("data-keep-scroll-position")||t(this,a).hasAttribute("data-pagination-more-link"),ut=t(this,a).getAttribute("data-scroll-behaviour"),et=E(this,M,Ht).call(this,t(this,a).getAttribute("data-pagination-set-link")||t(this,a).getAttribute("data-pagination-more-link"));et&&(t(this,a).hasAttribute("data-pagination-set-link")?t(this,C).links.forEach(x=>{x.updatePagination(parseInt(t(this,a).getAttribute("data-value")||"1"),et.selector)}):t(this,a).hasAttribute("data-pagination-more-link")&&t(this,C).links.forEach(x=>{x.updatePagination(et.currentPage+1,et.selector)}));const oe=((i=t(this,a).getAttribute("data-submorph"))==null?void 0:i.split(",").map(x=>x.trim()))||t(this,a).hasAttribute("data-pagination-more-link")&&[t(this,a).getAttribute("data-pagination-more-link")]||t(this,a).hasAttribute("data-pagination-set-link")&&[t(this,a).getAttribute("data-pagination-set-link")]||void 0,Pt=t(this,a).hasAttribute("data-clear-state");let u=t(this,M,st);if(t(this,a).hasAttribute("data-toggle-params")){const[x,wt]=t(this,M,st).split("?"),j=new URLSearchParams(wt),O=new URLSearchParams(location.search),k=new URLSearchParams;for(const[A]of j)(!O.has(A)||O.has(A)&&O.get(A)!==j.get(A))&&k.append(A,j.get(A));if(t(this,a).hasAttribute("data-merge-params"))for(const[A]of O)j.has(A)||k.append(A,O.get(A));u=`${x}?${k.toString()}`}t(this,C).navigate(u,{historyAction:n,centerScroll:S,offsetScroll:g,revalidate:c,keepSearchParameters:v,submorph:oe,clearState:Pt,keepScrollPosition:D,scrollBehaviour:ut,submorphAppend:t(this,a).hasAttribute("data-pagination-more-link"),mergeParams:t(this,a).hasAttribute("data-merge-params")&&!t(this,a).hasAttribute("data-toggle-params")})}});l(this,it,()=>{const e=t(this,a).hasAttribute("data-revalidate");t(this,C).prefetch(t(this,M,st),e),t(this,a).removeEventListener("pointerenter",t(this,it))});o(this,C,s),o(this,a,e),t(this,a).addEventListener("click",t(this,ft)),this.checkCurrent(location.href.replace(location.origin,""));const i=E(this,M,Ht).call(this,t(this,a).getAttribute("data-pagination-set-link")||t(this,a).getAttribute("data-pagination-more-link"));i&&this.updatePagination(i.currentPage,i.selector),t(this,a).hasAttribute("data-prefetch")&&t(this,a).addEventListener("pointerenter",t(this,it))}get element(){return t(this,a)}checkCurrent(e){var v;const s=t(this,C).normalizePath(e),i=t(this,C).normalizePath(t(this,M,st));t(this,a).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?t(this,a).classList.add("current"):i.pathname===s.pathname?t(this,a).classList.add("current"):(v=t(this,a).getAttribute("data-associated-paths"))!=null&&v.split(",").find(D=>s.pathname.includes(D))?t(this,a).classList.add("current"):t(this,a).classList.remove("current"),s.path===i.path?t(this,a).classList.add("exact"):t(this,a).classList.remove("exact");const[n,S]=t(this,M,st).split("?"),p=new URLSearchParams(S),g=new URLSearchParams(location.search);let c=0;for(const[D]of g)p.has(D)&&g.get(D)===p.get(D)&&c++;c?(t(this,a).classList.toggle("all-params-matched",g.size===c),t(this,a).classList.toggle("some-params-matched",g.size!==c)):!g.size&&t(this,a).hasAttribute("data-match-no-params")?t(this,a).classList.add("all-params-matched"):(t(this,a).classList.remove("all-params-matched"),t(this,a).classList.remove("some-params-matched"))}updatePagination(e,s){const i=E(this,M,Ht).call(this,s);if(i)if(i.element.setAttribute("data-current-page",e.toString()),t(this,a).hasAttribute("data-pagination-more-link"))if(e<i.totalPages){t(this,a).style.display="";const n=t(this,a).querySelector("[data-pagination-more-link-counter]");n&&(n.textContent=(i.totalPages-e).toString());const S=t(this,a).getAttribute("href"),p=new URL(S,window.location.origin);p.searchParams.set("page",(e+1).toString());const g=p.href.replace(p.origin,"").toString();t(this,a).setAttribute("href",g),this.checkCurrent(g)}else t(this,a).style.display="none";else t(this,a).hasAttribute("data-pagination-set-link")&&(t(this,a).getAttribute("data-value")===e.toString()?t(this,a).classList.add("pagination-current"):t(this,a).classList.remove("pagination-current"))}destroy(){t(this,a).removeEventListener("click",t(this,ft)),t(this,a).removeEventListener("pointerenter",t(this,it)),t(this,a).classList.remove("current","exact","pagination-current")}}C=new WeakMap,a=new WeakMap,M=new WeakSet,st=function(){const e=new URL(t(this,a).href);return t(this,C).normalizePath(e.pathname+e.search+e.hash).path},Ht=function(e){if(!e)return;const s=document.querySelector(e);if(s){const i=parseInt(s.getAttribute("data-current-page")||"1"),n=parseInt(s.getAttribute("data-total-pages")||"1");return{element:s,currentPage:i,totalPages:n,selector:e}}},ft=new WeakMap,it=new WeakMap;const Se=new DOMParser;var I,J,R,V,Q,B,at,Z,X,pt;class ie{constructor(e,s){l(this,I);l(this,J);l(this,R,{x:0,y:0});l(this,V,null);l(this,Q,null);l(this,B,null);l(this,at,null);l(this,Z,null);l(this,X,null);l(this,pt);o(this,I,e),o(this,J,s)}get pathname(){return t(this,J)}get scrollState(){return t(this,R)}get document(){return t(this,B)}setHeaders(e){o(this,pt,e)}setInitialDocument(e){o(this,V,e.cloneNode(!0))}abort(){var e;return(e=t(this,Z))==null?void 0:e.abort(`[${t(this,J)}] page loading cancelled`)}fetch(e,s,i){return G(this,null,function*(){var n;if(!i){const g=((n=t(this,V))==null?void 0:n.documentElement.getAttribute("data-cache"))&&s!==e,c=t(this,V)&&t(this,I).isPopstateNavigation;if(t(this,X)||g||c)return t(this,X)}return o(this,X,new Promise(S=>G(this,null,function*(){try{o(this,Z,new AbortController);const g=yield(yield fetch(e,{signal:t(this,Z).signal,headers:Rt({"X-MORPH":"true","X-MORPH-CURRENT-PATH":encodeURIComponent(s),"X-MORPH-NEW-PATH":encodeURIComponent(e)},t(this,pt))})).text(),c=Se.parseFromString(g,"text/html");this.setInitialDocument(c)}catch(p){console.warn(p)}finally{o(this,Z,null),o(this,X,null),S()}}))),t(this,X)})}cloneDocument(){o(this,B,(t(this,Q)||t(this,V)).cloneNode(!0))}get title(){let e="";if(t(this,B).title)e=t(this,B).title;else{const s=t(this,B).querySelector("h1");e=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||t(this,J)}return e}clearScrollState(){t(this,R).x=0,t(this,R).y=0}clearDocumentState(){o(this,Q,null)}saveScrollState(){t(this,V).documentElement.hasAttribute("data-no-scroll-restoration")?(t(this,R).x=0,t(this,R).y=0):(t(this,R).x=t(this,I).scrollValue.left,t(this,R).y=t(this,I).scrollValue.top)}restoreScrollPosition(){t(this,I).scrollElement.scroll({top:t(this,R).y,left:t(this,R).x,behavior:"instant"})}saveDocumentState(){t(this,V).documentElement.hasAttribute("data-no-page-restoration")?o(this,Q,null):o(this,Q,document.cloneNode(!0))}renewScrollPosition(){t(this,I).scrollElement.scroll({top:0,left:0,behavior:"instant"})}saveState(e){o(this,at,e)}clearState(){const e=t(this,at);return o(this,at,null),e}}I=new WeakMap,J=new WeakMap,R=new WeakMap,V=new WeakMap,Q=new WeakMap,B=new WeakMap,at=new WeakMap,Z=new WeakMap,X=new WeakMap,pt=new WeakMap;var H,nt,gt,It,Et;class ye{constructor(e){l(this,gt);l(this,H);l(this,nt,[]);l(this,Et,()=>{E(this,gt,It).call(this)});o(this,H,e);for(const s in t(this,H).dataset){const i=Le.camelToKebab(s);if(i.startsWith("param-")){const n=i.split("param-")[1],S=t(this,H).dataset[s];t(this,nt).push({name:n,value:S})}}document.addEventListener("morphURLParametersChange",t(this,Et)),E(this,gt,It).call(this)}destroy(){document.removeEventListener("morphURLParametersChange",t(this,Et))}}H=new WeakMap,nt=new WeakMap,gt=new WeakSet,It=function(){const e=new URLSearchParams(location.search);let s=!!t(this,nt).find(n=>e.has(n.name)&&(e.get(n.name)===n.value||n.value==="*"||n.value==="all"||n.value==="any"||n.value==="vse"||e.get(n.name)==="*"||e.get(n.name)==="all"||e.get(n.name)==="any"||e.get(n.name)==="vse"));!s&&t(this,H).hasAttribute("data-match-no-params")&&(s=!t(this,nt).filter(n=>e.has(n.name)).length);const i=t(this,H).getAttribute("data-hide-class");s?i?t(this,H).classList.remove(i):t(this,H).style.display="":i?t(this,H).classList.add(i):t(this,H).style.display="none"},Et=new WeakMap;var q,rt,b,K,f,_,Y,$,U,vt,W,Lt,tt,ot,ht,St,lt,yt,m,Wt,bt,Mt,Ot,re,Ft,Bt,Xt,Kt,Tt,ct;const mt=class mt{constructor(e){l(this,m);l(this,q,null);l(this,rt,null);l(this,b,[]);l(this,K);l(this,f,null);l(this,_);l(this,Y,[]);l(this,$,!1);l(this,U,null);l(this,vt,!1);l(this,W,new Map);l(this,Lt,[]);l(this,tt,null);l(this,ot,0);l(this,ht,0);l(this,St);l(this,lt);l(this,yt);l(this,bt,e=>{var s,i;return(((s=e.getAttribute("href"))==null?void 0:s.startsWith("/"))||((i=e.getAttribute("href"))==null?void 0:i.startsWith("?")))&&!e.hasAttribute("download")&&!e.hasAttribute("data-morph-skip")&&!e.closest("[data-morph-skip]")&&e.getAttribute("target")!=="_blank"});l(this,Tt,e=>G(this,null,function*(){e.preventDefault(),o(this,$,!0),yield this.navigate(location.href.replace(location.origin,""),{historyAction:"none",submorph:t(this,lt)?void 0:t(this,St),revalidate:t(this,lt),keepScrollPosition:t(this,yt)}),o(this,$,!1)}));l(this,ct,()=>{const{left:e,top:s}=this.scrollValue,i=s-t(this,ht),n=e-t(this,ot);o(this,ht,s),o(this,ot,e),document.documentElement.classList.toggle("scroll-y",s>0),document.documentElement.classList.toggle("scroll-x",e>0),document.documentElement.classList.toggle("scroll-y-forward",i>0),document.documentElement.classList.toggle("scroll-y-backward",i<0),document.documentElement.classList.toggle("scroll-x-forward",n>0),document.documentElement.classList.toggle("scroll-x-backward",n<0),z.dispatchEvent(document,"morphScroll",{detail:{left:e,top:s}})});if(ae.isBrowser&&!mt.instance){mt.instance=this,o(this,q,{base:dt.normalizeBase(e==null?void 0:e.base),waitForHeadToLoad:(e==null?void 0:e.waitForHeadToLoad)!==!1,trailingSlash:(e==null?void 0:e.trailingSlash)||!1,scrollSelector:e==null?void 0:e.scrollSelector,morphInsideScrollContainer:(e==null?void 0:e.morphInsideScrollContainer)||!1}),o(this,rt,E(this,m,Ot).call(this,document.body));const s=this.normalizePath(location.pathname+location.search+location.hash);o(this,f,s);const i=new ie(this,t(this,f).pathname);i.setInitialDocument(document),t(this,W).set(t(this,f).pathname,i),document.documentElement.setAttribute("data-current-pathname",t(this,f).pathname),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),this.findParamsDependent(),history.scrollRestoration="manual",addEventListener("popstate",t(this,Tt)),dt.changeHistory({action:"replace",pathname:s.pathname,searchParameters:s.parameters,hash:s.hash}),o(this,tt,new ne),E(this,m,Xt).call(this,document)}}get currentURL(){return t(this,f)}get previousURL(){return t(this,_)}get links(){return t(this,b)}get scrollElement(){return t(this,U)}get isPopstateNavigation(){return t(this,$)}get scrollValue(){let e=0,s=0;return t(this,vt)?(e=window.scrollY,s=window.scrollX):(e=t(this,U).scrollTop,s=t(this,U).scrollLeft),{top:e,left:s}}saveState(e){const s=t(this,W).get(t(this,f).path);s&&s.saveState(e)}getState(){const e=t(this,W).get(t(this,f).path);return e==null?void 0:e.clearState()}normalizePath(e,s){return dt.splitPath(e,{base:t(this,q).base,trailingSlash:t(this,q).trailingSlash,mergeParams:s!=null&&s.mergeParams?location.search:""})}prefetch(e,s){return G(this,null,function*(){var n;if(t(this,Y).length)return;e=((n=this.pathnameModifier)==null?void 0:n.call(this,e))||e;const i=E(this,m,Mt).call(this,e);i==null||i.fetch(e,t(this,f).path,s)})}excludeHeadChild(e){return!1}setHeaders(e){}navigate(oe){return G(this,arguments,function*(e,{historyAction:s="push",centerScroll:i,offsetScroll:n,scrollBehaviour:S,revalidate:p,keepSearchParameters:g,submorph:c,submorphAppend:v,clearState:D,keepScrollPosition:ut,mergeParams:et}={}){var x,wt,j,O;if(t(this,Y).length)return;o(this,St,c),o(this,lt,p),o(this,yt,ut);const Pt=((x=this.pathnameModifier)==null?void 0:x.call(this,e))||e,u=this.normalizePath(Pt,{mergeParams:et});if(!p&&(((wt=t(this,K))==null?void 0:wt.pathname)===u.pathname||t(this,f).pathname===u.pathname)){ut||E(this,m,Kt).call(this,u.hash||0,{centerScroll:i,offsetScroll:n,behavior:"smooth"}),z.dispatchEvent(document,"morphSamePath",{custom:!0}),((j=t(this,f))==null?void 0:j.parameters)!==u.parameters&&(o(this,_,t(this,f)),o(this,f,u),dt.changeHistory({action:((O=t(this,f))==null?void 0:O.hash)!==u.hash?"replace":s,pathname:u.pathname,searchParameters:u.parameters,hash:u.hash}),z.dispatchEvent(document,"morphURLParametersChange",{detail:{newURL:t(this,f),previousURL:t(this,_)}})),t(this,b).forEach(k=>{k.checkCurrent(u.path)});return}else t(this,b).forEach(k=>{k.checkCurrent(u.path)});o(this,K,u);try{let k=!0;if(this.preprocessor)try{yield new Promise((r,P)=>{var T;(T=this.preprocessor)==null||T.call(this,{url:u,resolve:r,reject:P,submorph:c})})}catch(r){r?console.error(r):console.log("Route change canceled"),k=!1}if(!k||t(this,K).pathname!==u.pathname){t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)});return}const A={url:u,submorph:c};c?v||c.forEach(r=>{document.querySelectorAll(r).forEach(P=>{P.classList.add("out"),P.setAttribute("data-morph-out","")})}):t(this,rt).forEach(r=>{var P,T;(P=r.firstElementChild)==null||P.classList.add("out"),(T=r.firstElementChild)==null||T.setAttribute("data-morph-out","")}),z.dispatchEvent(document,"morphNavigation",{detail:A});const Ut=E(this,m,Mt).call(this,t(this,f).pathname),y=E(this,m,Mt).call(this,u.pathname);if(t(this,W).forEach(r=>{r.pathname!==u.pathname&&r.abort()}),yield y==null?void 0:y.fetch(Pt,t(this,f).path,p),t(this,K).pathname!==u.pathname){t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)});return}Ut.clearState(),Ut.saveScrollState(),Ut.saveDocumentState(),(!t(this,$)||p)&&(y.clearScrollState(),y.clearDocumentState()),D&&y.clearState(),y.cloneDocument(),t(this,tt).textContent=y.title,document.body.appendChild(t(this,tt));const At=qt(Rt({},A),{document:y.document});v||At.document.querySelectorAll("[data-morph-out]").forEach(r=>{r.classList.remove("out")}),z.dispatchEvent(document,"morphStart",{detail:At});const Yt=Array.from(document.head.children),$t=Array.from(y.document.head.children),jt=E(this,m,re).call(this,Yt,$t),he=E(this,m,Ft).call(this,Yt,jt),kt=E(this,m,Ft).call(this,$t,jt).filter(r=>!this.excludeHeadChild(r));kt.forEach((r,P)=>{r.tagName==="SCRIPT"&&(kt[P]=E(this,m,Wt).call(this,r))}),kt.forEach(r=>{document.head.appendChild(r)});const xt=kt.filter(r=>{if(r.hasAttribute("data-no-waiting"))return!1;if(E(this,m,Bt).call(this,r))return!0});t(this,q).waitForHeadToLoad&&xt.length&&(yield new Promise(r=>G(this,null,function*(){let P=0;try{for(var T=ee(xt),ce,F,N;ce=!(F=yield T.next()).done;ce=!1){const Ct=F.value;Ct.onload=()=>{P++,P===xt.length&&r()}}}catch(F){N=[F]}finally{try{ce&&(F=T.return)&&(yield F.call(T))}finally{if(N)throw N[0]}}}))),yield se.wait(10);const Gt=[];v||he.forEach(r=>{r.hasAttribute("data-permanent")||(E(this,m,Bt).call(this,r)?Gt.push(r):r.remove())});const le=E(this,m,Ot).call(this,y.document.body);!t(this,q).morphInsideScrollContainer&&!c&&E(this,m,Xt).call(this,y.document),document.documentElement.setAttribute("data-current-pathname",u.pathname),document.documentElement.setAttribute("data-current-leaf",u.leaf),dt.changeHistory({action:s,pathname:u.pathname,searchParameters:u.parameters||(g?location.search:""),hash:u.hash}),t(this,tt).remove(),o(this,_,t(this,f)),o(this,f,u);const Nt=[];t(this,rt).forEach((r,P)=>{const T=le[P],ce=getComputedStyle(r).getPropertyValue("--morph-duration");let F=[],N=[];c?(c.forEach(d=>{const L=r.querySelector(d),w=T.querySelector(d);L&&w&&(N.push(L),F.push(w))}),N.forEach(d=>{d.parentElement&&Nt.push(d.parentElement)})):(F.push(...T.childNodes),N.push(...r.childNodes),Nt.push(r));const Ct=[];v||N.forEach(d=>{d instanceof HTMLElement&&(this.destroyOldLinks(d),d.classList.add("old"),d.querySelectorAll("[data-morph-transfer]").forEach(w=>{const de=w.getAttribute("data-morph-transfer");Ct.push({element:w,selector:de})}))}),F.forEach(d=>{d instanceof HTMLElement&&(Ct.forEach(L=>{const w=d.querySelector(L.selector);w&&w.replaceWith(L.element)}),this.findNewLinks(d),d.classList.add("new"))}),c?v?F.forEach((d,L)=>{N[L]instanceof HTMLElement&&N[L].append(...d.childNodes)}):F.forEach((d,L)=>{var w;(w=N[L].parentElement)==null||w.insertBefore(d,N[L])}):r.prepend(...F),setTimeout(()=>{v||N.forEach(d=>{d instanceof HTMLElement&&d.classList.add("old-idle")}),F.forEach(d=>{var L;d instanceof HTMLElement&&((L=d.parentElement)==null||L.style.setProperty("--new-content-height",d.offsetHeight+"px"),d.classList.add("new-idle"))})},0);const Jt=qt(Rt({},At),{morphElement:r});z.dispatchEvent(document,"morphNewChildrenAdded",{detail:Jt});const ue=new Promise(d=>{setTimeout(()=>{v||N.forEach(L=>{L.remove()}),F.forEach(L=>{var w;L instanceof HTMLElement&&((w=L.parentElement)==null||w.style.removeProperty("--new-content-height"),L.classList.remove("new-idle","new"))}),v||z.dispatchEvent(document,"morphOldChildrenRemoved",{detail:Jt}),d()},(parseFloat(ce)||0)*1e3+10)});t(this,Y).push(ue)}),this.isPopstateNavigation?document.documentElement.style.setProperty("--new-document-scroll-position",(this.scrollValue.top-y.scrollState.y)*1+"px"):document.documentElement.style.setProperty("--new-document-scroll-position",this.scrollValue.top+"px"),z.dispatchEvent(document,"morphBeforeNavigationScroll",{detail:y.scrollState}),u.hash?(y.clearScrollState(),E(this,m,Kt).call(this,u.hash,{centerScroll:i,offsetScroll:n,behavior:S})):t(this,$)?y.restoreScrollPosition():ut||y.renewScrollPosition(),yield Promise.all(t(this,Y)),v||Gt.forEach(r=>r.remove()),o(this,Y,[]),Nt.forEach(r=>{r.querySelectorAll("script").forEach(T=>{T.replaceWith(E(this,m,Wt).call(this,T))})}),t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)}),this.findParamsDependent(),z.dispatchEvent(document,"morphComplete",{detail:At}),document.documentElement.style.removeProperty("--new-document-scroll-position"),window.dispatchEvent(new Event("resize"))}catch(k){console.error(k)}o(this,K,void 0)})}addLink(e){t(this,b).push(new zt(e,this))}addLinks(e){e.forEach(s=>{this.addLink(s)})}removeLink(e){o(this,b,t(this,b).filter(s=>s.element===e?(s.destroy(),!1):!0))}destroyOldLinks(e){o(this,b,t(this,b).filter(s=>e.contains(s.element)?(s.destroy(),!1):!0))}findNewLinks(e){const s=[...e.querySelectorAll("a")].filter(t(this,bt));t(this,b).push(...s.map(i=>new zt(i,this)))}findLinks(){const e=[...document.documentElement.querySelectorAll("a")].filter(t(this,bt));t(this,b).forEach(s=>s.destroy()),o(this,b,e.map(s=>new zt(s,this)))}findParamsDependent(){const e=[...document.documentElement.querySelectorAll("[data-morph-params-dependent]")];t(this,Lt).forEach(s=>s.destroy()),o(this,Lt,e.map(s=>new ye(s)))}};q=new WeakMap,rt=new WeakMap,b=new WeakMap,K=new WeakMap,f=new WeakMap,_=new WeakMap,Y=new WeakMap,$=new WeakMap,U=new WeakMap,vt=new WeakMap,W=new WeakMap,Lt=new WeakMap,tt=new WeakMap,ot=new WeakMap,ht=new WeakMap,St=new WeakMap,lt=new WeakMap,yt=new WeakMap,m=new WeakSet,Wt=function(e){const s=document.createElement("script");for(let i=0;i<e.attributes.length;i++){const n=e.attributes[i];s.setAttribute(n.name,n.value)}return e.hasAttribute("src")||(s.innerHTML=e.innerHTML),s},bt=new WeakMap,Mt=function(e){const s=this.normalizePath(e);let i=t(this,W).get(s.pathname);return i||(i=new ie(this,s.pathname),t(this,W).set(s.pathname,i)),i},Ot=function(e){const s=[...e.querySelectorAll("[data-morph]")];return s.length?s:[e]},re=function(e,s){return e.filter(i=>s.find(n=>n.outerHTML===i.outerHTML))},Ft=function(e,s){return e.filter(i=>!s.find(n=>n.outerHTML===i.outerHTML))},Bt=function(e){return e.tagName==="SCRIPT"||e.tagName==="STYLE"||e.tagName==="LINK"&&e.getAttribute("rel")==="stylesheet"},Xt=function(e){var s,i;(s=t(this,U))==null||s.removeEventListener("scroll",t(this,ct)),o(this,ht,0),o(this,ot,0),o(this,U,t(this,q).scrollSelector&&e.querySelector(t(this,q).scrollSelector)||window),o(this,vt,t(this,U)===window),(i=t(this,U))==null||i.addEventListener("scroll",t(this,ct)),t(this,ct).call(this)},Kt=function(e,s){const i=typeof e=="string"?document.getElementById(e):e;(typeof i=="number"||i)&&se.scrollToElement(i,{scrollElement:t(this,U),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},Tt=new WeakMap,ct=new WeakMap,mt.instance=null;let Vt=mt;exports.Morph=Vt;
|
|
1
|
+
"use strict";var me=Object.defineProperty,fe=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var Qt=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var Zt=(h,e)=>(e=Symbol[h])?e:Symbol.for("Symbol."+h),te=h=>{throw TypeError(h)};var _t=(h,e,s)=>e in h?me(h,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):h[e]=s,Rt=(h,e)=>{for(var s in e||(e={}))ge.call(e,s)&&_t(h,s,e[s]);if(Qt)for(var s of Qt(e))Ee.call(e,s)&&_t(h,s,e[s]);return h},qt=(h,e)=>fe(h,pe(e));var Dt=(h,e,s)=>e.has(h)||te("Cannot "+s);var t=(h,e,s)=>(Dt(h,e,"read from private field"),s?s.call(h):e.get(h)),l=(h,e,s)=>e.has(h)?te("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,s),o=(h,e,s,i)=>(Dt(h,e,"write to private field"),i?i.call(h,s):e.set(h,s),s),E=(h,e,s)=>(Dt(h,e,"access private method"),s);var G=(h,e,s)=>new Promise((i,n)=>{var S=c=>{try{g(s.next(c))}catch(v){n(v)}},p=c=>{try{g(s.throw(c))}catch(v){n(v)}},g=c=>c.done?i(c.value):Promise.resolve(c.value).then(S,p);g((s=s.apply(h,e)).next())});var ee=(h,e,s)=>(e=h[Zt("asyncIterator")])?e.call(h):(h=h[Zt("iterator")](),e={},s=(i,n)=>(n=h[i])&&(e[i]=S=>new Promise((p,g,c)=>(S=n.call(h,S),c=S.done,Promise.resolve(S.value).then(v=>p({value:v,done:c}),g)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ae=require("../index-DekP7OZe.cjs"),z=require("../events-KVanG9sR.cjs"),se=require("../scroll-CIdNtj3G.cjs");require("construct-style-sheets-polyfill");const dt=require("../url-Dns-01WU.cjs"),ve=require("../css-value-parser/index.cjs"),Le=require("../string-DUXXtU8v.cjs");class ne extends HTMLElement{connectedCallback(){const e={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(e))this.setAttribute(s,i)}}ae.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",ne);var C,a,M,st,Ht,ft,it;class zt{constructor(e,s){l(this,M);l(this,C);l(this,a);l(this,ft,e=>{var i;if(e.preventDefault(),document.documentElement.classList.contains("click-disabled"))return;if(t(this,a).hasAttribute("data-back")&&t(this,C).previousURL)history.back();else{const n=t(this,a).getAttribute("data-history-action")||"push",S=t(this,a).hasAttribute("data-center-scroll"),p=getComputedStyle(t(this,a)).getPropertyValue("--offset-scroll").trim(),g=p?ve.cssValueParser.parse(p):void 0,c=t(this,a).hasAttribute("data-revalidate")||t(this,a).hasAttribute("data-pagination-more-link")||t(this,a).hasAttribute("data-pagination-set-link"),v=t(this,a).hasAttribute("data-keep-search-parameters"),D=t(this,a).hasAttribute("data-keep-scroll-position")||t(this,a).hasAttribute("data-pagination-more-link"),ut=t(this,a).getAttribute("data-scroll-behaviour"),et=E(this,M,Ht).call(this,t(this,a).getAttribute("data-pagination-set-link")||t(this,a).getAttribute("data-pagination-more-link"));et&&(t(this,a).hasAttribute("data-pagination-set-link")?t(this,C).links.forEach(x=>{x.updatePagination(parseInt(t(this,a).getAttribute("data-value")||"1"),et.selector)}):t(this,a).hasAttribute("data-pagination-more-link")&&t(this,C).links.forEach(x=>{x.updatePagination(et.currentPage+1,et.selector)}));const oe=((i=t(this,a).getAttribute("data-submorph"))==null?void 0:i.split(",").map(x=>x.trim()))||t(this,a).hasAttribute("data-pagination-more-link")&&[t(this,a).getAttribute("data-pagination-more-link")]||t(this,a).hasAttribute("data-pagination-set-link")&&[t(this,a).getAttribute("data-pagination-set-link")]||void 0,Pt=t(this,a).hasAttribute("data-clear-state");let u=t(this,M,st);if(t(this,a).hasAttribute("data-toggle-params")){const[x,wt]=t(this,M,st).split("?"),j=new URLSearchParams(wt),O=new URLSearchParams(location.search),k=new URLSearchParams;for(const[A]of j)(!O.has(A)||O.has(A)&&O.get(A)!==j.get(A))&&k.append(A,j.get(A));if(t(this,a).hasAttribute("data-merge-params"))for(const[A]of O)j.has(A)||k.append(A,O.get(A));u=`${x}?${k.toString()}`}t(this,C).navigate(u,{historyAction:n,centerScroll:S,offsetScroll:g,revalidate:c,keepSearchParameters:v,submorph:oe,clearState:Pt,keepScrollPosition:D,scrollBehaviour:ut,submorphAppend:t(this,a).hasAttribute("data-pagination-more-link"),mergeParams:t(this,a).hasAttribute("data-merge-params")&&!t(this,a).hasAttribute("data-toggle-params")})}});l(this,it,()=>{const e=t(this,a).hasAttribute("data-revalidate");t(this,C).prefetch(t(this,M,st),e),t(this,a).removeEventListener("pointerenter",t(this,it))});o(this,C,s),o(this,a,e),t(this,a).addEventListener("click",t(this,ft)),this.checkCurrent(location.href.replace(location.origin,""));const i=E(this,M,Ht).call(this,t(this,a).getAttribute("data-pagination-set-link")||t(this,a).getAttribute("data-pagination-more-link"));i&&this.updatePagination(i.currentPage,i.selector),t(this,a).hasAttribute("data-prefetch")&&t(this,a).addEventListener("pointerenter",t(this,it))}get element(){return t(this,a)}checkCurrent(e){var v;const s=t(this,C).normalizePath(e),i=t(this,C).normalizePath(t(this,M,st));t(this,a).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?t(this,a).classList.add("current"):i.pathname===s.pathname?t(this,a).classList.add("current"):(v=t(this,a).getAttribute("data-associated-paths"))!=null&&v.split(",").find(D=>s.pathname.includes(D))?t(this,a).classList.add("current"):t(this,a).classList.remove("current"),s.path===i.path?t(this,a).classList.add("exact"):t(this,a).classList.remove("exact");const[n,S]=t(this,M,st).split("?"),p=new URLSearchParams(S),g=new URLSearchParams(location.search);let c=0;for(const[D]of g)p.has(D)&&g.get(D)===p.get(D)&&c++;c?(t(this,a).classList.toggle("all-params-matched",g.size===c),t(this,a).classList.toggle("some-params-matched",g.size!==c)):!g.size&&t(this,a).hasAttribute("data-match-no-params")?t(this,a).classList.add("all-params-matched"):(t(this,a).classList.remove("all-params-matched"),t(this,a).classList.remove("some-params-matched"))}updatePagination(e,s){const i=E(this,M,Ht).call(this,s);if(i)if(i.element.setAttribute("data-current-page",e.toString()),t(this,a).hasAttribute("data-pagination-more-link"))if(e<i.totalPages){t(this,a).style.display="";const n=t(this,a).querySelector("[data-pagination-more-link-counter]");n&&(n.textContent=(i.totalPages-e).toString());const S=t(this,a).getAttribute("href"),p=new URL(S,window.location.origin);p.searchParams.set("page",(e+1).toString());const g=p.href.replace(p.origin,"").toString();t(this,a).setAttribute("href",g),this.checkCurrent(g)}else t(this,a).style.display="none";else t(this,a).hasAttribute("data-pagination-set-link")&&(t(this,a).getAttribute("data-value")===e.toString()?t(this,a).classList.add("pagination-current"):t(this,a).classList.remove("pagination-current"))}destroy(){t(this,a).removeEventListener("click",t(this,ft)),t(this,a).removeEventListener("pointerenter",t(this,it)),t(this,a).classList.remove("current","exact","pagination-current")}}C=new WeakMap,a=new WeakMap,M=new WeakSet,st=function(){const e=new URL(t(this,a).href);return t(this,C).normalizePath(e.pathname+e.search+e.hash).path},Ht=function(e){if(!e)return;const s=document.querySelector(e);if(s){const i=parseInt(s.getAttribute("data-current-page")||"1"),n=parseInt(s.getAttribute("data-total-pages")||"1");return{element:s,currentPage:i,totalPages:n,selector:e}}},ft=new WeakMap,it=new WeakMap;const Se=new DOMParser;var I,J,R,V,Q,B,at,Z,X,pt;class ie{constructor(e,s){l(this,I);l(this,J);l(this,R,{x:0,y:0});l(this,V,null);l(this,Q,null);l(this,B,null);l(this,at,null);l(this,Z,null);l(this,X,null);l(this,pt);o(this,I,e),o(this,J,s)}get pathname(){return t(this,J)}get scrollState(){return t(this,R)}get document(){return t(this,B)}setHeaders(e){o(this,pt,e)}setInitialDocument(e){o(this,V,e.cloneNode(!0))}abort(){var e;return(e=t(this,Z))==null?void 0:e.abort(`[${t(this,J)}] page loading cancelled`)}fetch(e,s,i){return G(this,null,function*(){var n;if(!i){const g=((n=t(this,V))==null?void 0:n.documentElement.getAttribute("data-cache"))&&s!==e,c=t(this,V)&&t(this,I).isPopstateNavigation;if(t(this,X)||g||c)return t(this,X)}return o(this,X,new Promise(S=>G(this,null,function*(){try{o(this,Z,new AbortController);const g=yield(yield fetch(e,{signal:t(this,Z).signal,headers:Rt({"X-MORPH":"true","X-MORPH-CURRENT-PATH":encodeURIComponent(s),"X-MORPH-NEW-PATH":encodeURIComponent(e)},t(this,pt))})).text(),c=Se.parseFromString(g,"text/html");this.setInitialDocument(c)}catch(p){console.warn(p)}finally{o(this,Z,null),o(this,X,null),S()}}))),t(this,X)})}cloneDocument(){o(this,B,(t(this,Q)||t(this,V)).cloneNode(!0))}get title(){let e="";if(t(this,B).title)e=t(this,B).title;else{const s=t(this,B).querySelector("h1");e=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||t(this,J)}return e}clearScrollState(){t(this,R).x=0,t(this,R).y=0}clearDocumentState(){o(this,Q,null)}saveScrollState(){t(this,V).documentElement.hasAttribute("data-no-scroll-restoration")?(t(this,R).x=0,t(this,R).y=0):(t(this,R).x=t(this,I).scrollValue.left,t(this,R).y=t(this,I).scrollValue.top)}restoreScrollPosition(){t(this,I).scrollElement.scroll({top:t(this,R).y,left:t(this,R).x,behavior:"instant"})}saveDocumentState(){t(this,V).documentElement.hasAttribute("data-no-page-restoration")?o(this,Q,null):o(this,Q,document.cloneNode(!0))}renewScrollPosition(){t(this,I).scrollElement.scroll({top:0,left:0,behavior:"instant"})}saveState(e){o(this,at,e)}clearState(){const e=t(this,at);return o(this,at,null),e}}I=new WeakMap,J=new WeakMap,R=new WeakMap,V=new WeakMap,Q=new WeakMap,B=new WeakMap,at=new WeakMap,Z=new WeakMap,X=new WeakMap,pt=new WeakMap;var H,nt,gt,It,Et;class ye{constructor(e){l(this,gt);l(this,H);l(this,nt,[]);l(this,Et,()=>{E(this,gt,It).call(this)});o(this,H,e);for(const s in t(this,H).dataset){const i=Le.camelToKebab(s);if(i.startsWith("param-")){const n=i.split("param-")[1],S=t(this,H).dataset[s];t(this,nt).push({name:n,value:S})}}document.addEventListener("morphURLParametersChange",t(this,Et)),E(this,gt,It).call(this)}destroy(){document.removeEventListener("morphURLParametersChange",t(this,Et))}}H=new WeakMap,nt=new WeakMap,gt=new WeakSet,It=function(){const e=new URLSearchParams(location.search);let s=!!t(this,nt).find(n=>e.has(n.name)&&(e.get(n.name)===n.value||n.value==="*"||n.value==="all"||n.value==="any"||n.value==="vse"||e.get(n.name)==="*"||e.get(n.name)==="all"||e.get(n.name)==="any"||e.get(n.name)==="vse"));!s&&t(this,H).hasAttribute("data-match-no-params")&&(s=!t(this,nt).filter(n=>e.has(n.name)).length);const i=t(this,H).getAttribute("data-hide-class");s?i?t(this,H).classList.remove(i):t(this,H).style.display="":i?t(this,H).classList.add(i):t(this,H).style.display="none"},Et=new WeakMap;var q,rt,b,K,f,_,Y,$,U,vt,W,Lt,tt,ot,ht,St,lt,yt,m,Wt,bt,Mt,Ot,re,Ft,Bt,Xt,Kt,Tt,ct;const mt=class mt{constructor(e){l(this,m);l(this,q,null);l(this,rt,null);l(this,b,[]);l(this,K);l(this,f,null);l(this,_);l(this,Y,[]);l(this,$,!1);l(this,U,null);l(this,vt,!1);l(this,W,new Map);l(this,Lt,[]);l(this,tt,null);l(this,ot,0);l(this,ht,0);l(this,St);l(this,lt);l(this,yt);l(this,bt,e=>{var s,i;return(((s=e.getAttribute("href"))==null?void 0:s.startsWith("/"))||((i=e.getAttribute("href"))==null?void 0:i.startsWith("?")))&&!e.hasAttribute("download")&&!e.hasAttribute("data-morph-skip")&&!e.closest("[data-morph-skip]")&&e.getAttribute("target")!=="_blank"});l(this,Tt,e=>G(this,null,function*(){e.preventDefault(),o(this,$,!0),yield this.navigate(location.href.replace(location.origin,""),{historyAction:"none",submorph:t(this,lt)?void 0:t(this,St),revalidate:t(this,lt),keepScrollPosition:t(this,yt)}),o(this,$,!1)}));l(this,ct,()=>{const{left:e,top:s}=this.scrollValue,i=s-t(this,ht),n=e-t(this,ot);o(this,ht,s),o(this,ot,e),document.documentElement.classList.toggle("scroll-y",s>0),document.documentElement.classList.toggle("scroll-x",e>0),document.documentElement.classList.toggle("scroll-y-forward",i>0),document.documentElement.classList.toggle("scroll-y-backward",i<0),document.documentElement.classList.toggle("scroll-x-forward",n>0),document.documentElement.classList.toggle("scroll-x-backward",n<0),z.dispatchEvent(document,"morphScroll",{detail:{left:e,top:s}})});if(ae.isBrowser&&!mt.instance){mt.instance=this,o(this,q,{base:dt.normalizeBase(e==null?void 0:e.base),waitForHeadToLoad:(e==null?void 0:e.waitForHeadToLoad)!==!1,trailingSlash:(e==null?void 0:e.trailingSlash)||!1,scrollSelector:e==null?void 0:e.scrollSelector,morphInsideScrollContainer:(e==null?void 0:e.morphInsideScrollContainer)||!1}),o(this,rt,E(this,m,Ot).call(this,document.body));const s=this.normalizePath(location.pathname+location.search+location.hash);o(this,f,s);const i=new ie(this,t(this,f).pathname);i.setInitialDocument(document),t(this,W).set(t(this,f).pathname,i),document.documentElement.setAttribute("data-current-pathname",t(this,f).pathname),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),this.findParamsDependent(),history.scrollRestoration="manual",addEventListener("popstate",t(this,Tt)),dt.changeHistory({action:"replace",pathname:s.pathname,searchParameters:s.parameters,hash:s.hash}),o(this,tt,new ne),E(this,m,Xt).call(this,document)}}get currentURL(){return t(this,f)}get previousURL(){return t(this,_)}get links(){return t(this,b)}get scrollElement(){return t(this,U)}get isPopstateNavigation(){return t(this,$)}get scrollValue(){let e=0,s=0;return t(this,vt)?(e=window.scrollY,s=window.scrollX):(e=t(this,U).scrollTop,s=t(this,U).scrollLeft),{top:e,left:s}}saveState(e){const s=t(this,W).get(t(this,f).path);s&&s.saveState(e)}getState(){const e=t(this,W).get(t(this,f).path);return e==null?void 0:e.clearState()}normalizePath(e,s){return dt.splitPath(e,{base:t(this,q).base,trailingSlash:t(this,q).trailingSlash,mergeParams:s!=null&&s.mergeParams?location.search:""})}prefetch(e,s){return G(this,null,function*(){var n;if(t(this,Y).length)return;e=((n=this.pathnameModifier)==null?void 0:n.call(this,e))||e;const i=E(this,m,Mt).call(this,e);i==null||i.fetch(e,t(this,f).path,s)})}excludeHeadChild(e){return!1}setHeaders(e){}navigate(oe){return G(this,arguments,function*(e,{historyAction:s="push",centerScroll:i,offsetScroll:n,scrollBehaviour:S,revalidate:p,keepSearchParameters:g,submorph:c,submorphAppend:v,clearState:D,keepScrollPosition:ut,mergeParams:et}={}){var x,wt,j,O;if(t(this,Y).length)return;o(this,St,c),o(this,lt,p),o(this,yt,ut);const Pt=((x=this.pathnameModifier)==null?void 0:x.call(this,e))||e,u=this.normalizePath(Pt,{mergeParams:et});if(!p&&(((wt=t(this,K))==null?void 0:wt.pathname)===u.pathname||t(this,f).pathname===u.pathname)){ut||E(this,m,Kt).call(this,u.hash||0,{centerScroll:i,offsetScroll:n,behavior:"smooth"}),z.dispatchEvent(document,"morphSamePath",{custom:!0}),((j=t(this,f))==null?void 0:j.parameters)!==u.parameters&&(o(this,_,t(this,f)),o(this,f,u),dt.changeHistory({action:((O=t(this,f))==null?void 0:O.hash)!==u.hash?"replace":s,pathname:u.pathname,searchParameters:u.parameters,hash:u.hash}),z.dispatchEvent(document,"morphURLParametersChange",{detail:{newURL:t(this,f),previousURL:t(this,_)}})),t(this,b).forEach(k=>{k.checkCurrent(u.path)});return}else t(this,b).forEach(k=>{k.checkCurrent(u.path)});o(this,K,u);try{let k=!0;if(this.preprocessor)try{yield new Promise((r,P)=>{var T;(T=this.preprocessor)==null||T.call(this,{url:u,resolve:r,reject:P,submorph:c})})}catch(r){r?console.error(r):console.log("Route change canceled"),k=!1}if(!k||t(this,K).pathname!==u.pathname){t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)});return}const A={url:u,submorph:c};c?v||c.forEach(r=>{document.querySelectorAll(r).forEach(P=>{P.classList.add("out"),P.setAttribute("data-morph-out","")})}):t(this,rt).forEach(r=>{var P,T;(P=r.firstElementChild)==null||P.classList.add("out"),(T=r.firstElementChild)==null||T.setAttribute("data-morph-out","")}),z.dispatchEvent(document,"morphNavigation",{detail:A});const Ut=E(this,m,Mt).call(this,t(this,f).pathname),y=E(this,m,Mt).call(this,u.pathname);if(t(this,W).forEach(r=>{r.pathname!==u.pathname&&r.abort()}),yield y==null?void 0:y.fetch(Pt,t(this,f).path,p),t(this,K).pathname!==u.pathname){t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)});return}Ut.clearState(),Ut.saveScrollState(),Ut.saveDocumentState(),(!t(this,$)||p)&&(y.clearScrollState(),y.clearDocumentState()),D&&y.clearState(),y.cloneDocument(),t(this,tt).textContent=y.title,document.body.appendChild(t(this,tt));const At=qt(Rt({},A),{document:y.document});v||At.document.querySelectorAll("[data-morph-out]").forEach(r=>{r.classList.remove("out")}),z.dispatchEvent(document,"morphStart",{detail:At});const Yt=Array.from(document.head.children),$t=Array.from(y.document.head.children),jt=E(this,m,re).call(this,Yt,$t),he=E(this,m,Ft).call(this,Yt,jt),kt=E(this,m,Ft).call(this,$t,jt).filter(r=>!this.excludeHeadChild(r));kt.forEach((r,P)=>{r.tagName==="SCRIPT"&&(kt[P]=E(this,m,Wt).call(this,r))}),kt.forEach(r=>{document.head.appendChild(r)});const xt=kt.filter(r=>{if(r.hasAttribute("data-no-waiting"))return!1;if(E(this,m,Bt).call(this,r))return!0});t(this,q).waitForHeadToLoad&&xt.length&&(yield new Promise(r=>G(this,null,function*(){let P=0;try{for(var T=ee(xt),ce,F,N;ce=!(F=yield T.next()).done;ce=!1){const Ct=F.value;Ct.onload=()=>{P++,P===xt.length&&r()}}}catch(F){N=[F]}finally{try{ce&&(F=T.return)&&(yield F.call(T))}finally{if(N)throw N[0]}}}))),yield se.wait(10);const Gt=[];v||he.forEach(r=>{r.hasAttribute("data-permanent")||(E(this,m,Bt).call(this,r)?Gt.push(r):r.remove())});const le=E(this,m,Ot).call(this,y.document.body);!t(this,q).morphInsideScrollContainer&&!c&&E(this,m,Xt).call(this,y.document),document.documentElement.setAttribute("data-current-pathname",u.pathname),document.documentElement.setAttribute("data-current-leaf",u.leaf),dt.changeHistory({action:s,pathname:u.pathname,searchParameters:u.parameters||(g?location.search:""),hash:u.hash}),t(this,tt).remove(),o(this,_,t(this,f)),o(this,f,u);const Nt=[];t(this,rt).forEach((r,P)=>{const T=le[P],ce=getComputedStyle(r).getPropertyValue("--morph-duration");let F=[],N=[];c?(c.forEach(d=>{const L=r.querySelector(d),w=T.querySelector(d);L&&w&&(N.push(L),F.push(w))}),N.forEach(d=>{d.parentElement&&Nt.push(d.parentElement)})):(F.push(...T.childNodes),N.push(...r.childNodes),Nt.push(r));const Ct=[];v||N.forEach(d=>{d instanceof HTMLElement&&(this.destroyOldLinks(d),d.classList.add("old"),d.querySelectorAll("[data-morph-transfer]").forEach(w=>{const de=w.getAttribute("data-morph-transfer");Ct.push({element:w.cloneNode(!0),selector:de})}))}),F.forEach(d=>{d instanceof HTMLElement&&(Ct.forEach(L=>{const w=d.querySelector(L.selector);w&&w.replaceWith(L.element)}),this.findNewLinks(d),d.classList.add("new"))}),c?v?F.forEach((d,L)=>{N[L]instanceof HTMLElement&&N[L].append(...d.childNodes)}):F.forEach((d,L)=>{var w;(w=N[L].parentElement)==null||w.insertBefore(d,N[L])}):r.prepend(...F),setTimeout(()=>{v||N.forEach(d=>{d instanceof HTMLElement&&d.classList.add("old-idle")}),F.forEach(d=>{var L;d instanceof HTMLElement&&((L=d.parentElement)==null||L.style.setProperty("--new-content-height",d.offsetHeight+"px"),d.classList.add("new-idle"))})},0);const Jt=qt(Rt({},At),{morphElement:r});z.dispatchEvent(document,"morphNewChildrenAdded",{detail:Jt});const ue=new Promise(d=>{setTimeout(()=>{v||N.forEach(L=>{L.remove()}),F.forEach(L=>{var w;L instanceof HTMLElement&&((w=L.parentElement)==null||w.style.removeProperty("--new-content-height"),L.classList.remove("new-idle","new"))}),v||z.dispatchEvent(document,"morphOldChildrenRemoved",{detail:Jt}),d()},(parseFloat(ce)||0)*1e3+10)});t(this,Y).push(ue)}),this.isPopstateNavigation?document.documentElement.style.setProperty("--new-document-scroll-position",(this.scrollValue.top-y.scrollState.y)*1+"px"):document.documentElement.style.setProperty("--new-document-scroll-position",this.scrollValue.top+"px"),z.dispatchEvent(document,"morphBeforeNavigationScroll",{detail:y.scrollState}),u.hash?(y.clearScrollState(),E(this,m,Kt).call(this,u.hash,{centerScroll:i,offsetScroll:n,behavior:S})):t(this,$)?y.restoreScrollPosition():ut||y.renewScrollPosition(),yield Promise.all(t(this,Y)),v||Gt.forEach(r=>r.remove()),o(this,Y,[]),Nt.forEach(r=>{r.querySelectorAll("script").forEach(T=>{T.replaceWith(E(this,m,Wt).call(this,T))})}),t(this,b).forEach(r=>{r.checkCurrent(t(this,f).path)}),this.findParamsDependent(),z.dispatchEvent(document,"morphComplete",{detail:At}),document.documentElement.style.removeProperty("--new-document-scroll-position"),window.dispatchEvent(new Event("resize"))}catch(k){console.error(k)}o(this,K,void 0)})}addLink(e){t(this,b).push(new zt(e,this))}addLinks(e){e.forEach(s=>{this.addLink(s)})}removeLink(e){o(this,b,t(this,b).filter(s=>s.element===e?(s.destroy(),!1):!0))}destroyOldLinks(e){o(this,b,t(this,b).filter(s=>e.contains(s.element)?(s.destroy(),!1):!0))}findNewLinks(e){const s=[...e.querySelectorAll("a")].filter(t(this,bt));t(this,b).push(...s.map(i=>new zt(i,this)))}findLinks(){const e=[...document.documentElement.querySelectorAll("a")].filter(t(this,bt));t(this,b).forEach(s=>s.destroy()),o(this,b,e.map(s=>new zt(s,this)))}findParamsDependent(){const e=[...document.documentElement.querySelectorAll("[data-morph-params-dependent]")];t(this,Lt).forEach(s=>s.destroy()),o(this,Lt,e.map(s=>new ye(s)))}};q=new WeakMap,rt=new WeakMap,b=new WeakMap,K=new WeakMap,f=new WeakMap,_=new WeakMap,Y=new WeakMap,$=new WeakMap,U=new WeakMap,vt=new WeakMap,W=new WeakMap,Lt=new WeakMap,tt=new WeakMap,ot=new WeakMap,ht=new WeakMap,St=new WeakMap,lt=new WeakMap,yt=new WeakMap,m=new WeakSet,Wt=function(e){const s=document.createElement("script");for(let i=0;i<e.attributes.length;i++){const n=e.attributes[i];s.setAttribute(n.name,n.value)}return e.hasAttribute("src")||(s.innerHTML=e.innerHTML),s},bt=new WeakMap,Mt=function(e){const s=this.normalizePath(e);let i=t(this,W).get(s.pathname);return i||(i=new ie(this,s.pathname),t(this,W).set(s.pathname,i)),i},Ot=function(e){const s=[...e.querySelectorAll("[data-morph]")];return s.length?s:[e]},re=function(e,s){return e.filter(i=>s.find(n=>n.outerHTML===i.outerHTML))},Ft=function(e,s){return e.filter(i=>!s.find(n=>n.outerHTML===i.outerHTML))},Bt=function(e){return e.tagName==="SCRIPT"||e.tagName==="STYLE"||e.tagName==="LINK"&&e.getAttribute("rel")==="stylesheet"},Xt=function(e){var s,i;(s=t(this,U))==null||s.removeEventListener("scroll",t(this,ct)),o(this,ht,0),o(this,ot,0),o(this,U,t(this,q).scrollSelector&&e.querySelector(t(this,q).scrollSelector)||window),o(this,vt,t(this,U)===window),(i=t(this,U))==null||i.addEventListener("scroll",t(this,ct)),t(this,ct).call(this)},Kt=function(e,s){const i=typeof e=="string"?document.getElementById(e):e;(typeof i=="number"||i)&&se.scrollToElement(i,{scrollElement:t(this,U),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},Tt=new WeakMap,ct=new WeakMap,mt.instance=null;let Vt=mt;exports.Morph=Vt;
|
package/lib/morph/index.js
CHANGED
|
@@ -90,6 +90,7 @@ export declare class ScrollElement extends HTMLElement {
|
|
|
90
90
|
shiftPosition(value: number, options?: ScrollSetOptions): void;
|
|
91
91
|
resize(): void;
|
|
92
92
|
protected connectedCallback(): void;
|
|
93
|
+
protected adoptedCallback(): void;
|
|
93
94
|
protected disconnectedCallback(): void;
|
|
94
95
|
}
|
|
95
96
|
declare global {
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -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-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
|
+
"use strict";var fi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,bi=Object.getPrototypeOf,mi=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,Ci=Reflect.get;var Gs=d=>{throw TypeError(d)};var Us=(d,h,e)=>h in d?fi(d,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[h]=e,Zs=(d,h)=>{for(var e in h||(h={}))mi.call(h,e)&&Us(d,e,h[e]);if(Ns)for(var e of Ns(h))gi.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)=>Ci(bi(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"),yi=require("../easings-GegIwET5.cjs"),vi=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"),Qs=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Xs=require("../Damped-z9Uaw2MJ.cjs"),Pi=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"),Ei=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),wi=require("../gestures-C7gbKx11.cjs"),xi=require("../dom-JBOkFLTh.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class Li{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 js=Qs.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,k,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,V,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,kt,ke,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Ys,Ne,fs,Ts,Ds,Se,ti,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,k,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,V,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 Pi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,kt,[]);i(this,ke,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,ke)){r(this,ke,!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,V).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,ti).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:yi.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Ei.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,kt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,ke,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,ke,!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=[js];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,k)}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,V)}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,k).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,k).current||t(this,Ct).current||t(this,k).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,V).current,u=o(this,c,Ys).call(this,e);t(this,zt)||(t(this,V).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,k).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,V).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=>vi.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,V).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,k).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,k).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 Xs.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,k).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,V).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,k).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})}adoptedCallback(){this.shadowRoot.adoptedStyleSheets=[js]}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,k).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,k=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,V=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,kt=new WeakMap,ke=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 Li(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,V).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,V).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,Ys=function(e){let s=t(this,V).current;return t(this,k).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,k).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,V).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,kt,[]),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,kt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},ti=function(){if(t(this,X).current){const e=Math.floor(t(this,kt).length/2);t(this,kt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,kt).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,V).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=xi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,Vt,It,Ge,Ze,te,Ke,gs,Cs;class ei extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,Vt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,Vt,this.offsetWidth>this.offsetHeight);const e=t(this,Vt)?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,Vt)?(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,Vt)?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"),wi.setupDrag(u=>{const g=t(this,Vt)?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,Vt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Qs.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,Vt=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",ei);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 si 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",si);var Rt,Ye;class ii 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",ii);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 Ve,se,lt;class ri extends ns{constructor(){super(...arguments);i(this,Ve,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,Ve).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,Ve,document.createElement("div")),this.appendChild(t(this,Ve)),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,Ve).remove()}}Ve=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ri);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,hi,oi,li,ci,ui,ai,rs,Ae,qs,pe,di,Si,Bs;class ni 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 Xs.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,li).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ui).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,ci).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ai).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,hi).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,oi).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,hi=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)},oi=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)},li=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)},ci=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)},ui=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)},ai=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)},di=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},Si=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,di).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,Si).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",ni);class pi 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",pi);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 ks=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",ks);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 Vs=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",Vs);exports.ScrollBulletButtonsElement=ri;exports.ScrollCounterElement=ks;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ei;exports.ScrollSectionButtonElement=pi;exports.ScrollSegmentElement=ni;exports.ScrollSetButtonElement=si;exports.ScrollStepButtonElement=ii;exports.ScrollTotalElement=Vs;
|
package/lib/scroll/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var qs = Object.getOwnPropertySymbols,
|
|
1
|
+
var ci = Object.defineProperty;
|
|
2
|
+
var qs = Object.getOwnPropertySymbols, ui = Object.getPrototypeOf, ai = Object.prototype.hasOwnProperty, di = Object.prototype.propertyIsEnumerable, fi = Reflect.get;
|
|
3
3
|
var Us = (d) => {
|
|
4
4
|
throw TypeError(d);
|
|
5
5
|
};
|
|
6
|
-
var Gs = (d, n, e) => n in d ?
|
|
6
|
+
var Gs = (d, n, e) => n in d ? ci(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, Ks = (d, n) => {
|
|
7
7
|
for (var e in n || (n = {}))
|
|
8
|
-
|
|
8
|
+
ai.call(n, e) && Gs(d, e, n[e]);
|
|
9
9
|
if (qs)
|
|
10
10
|
for (var e of qs(n))
|
|
11
|
-
|
|
11
|
+
di.call(n, e) && Gs(d, e, n[e]);
|
|
12
12
|
return d;
|
|
13
13
|
};
|
|
14
14
|
var ks = (d, n, e) => n.has(d) || Us("Cannot " + e);
|
|
15
15
|
var t = (d, n, e) => (ks(d, n, "read from private field"), e ? e.call(d) : n.get(d)), i = (d, n, e) => n.has(d) ? Us("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), r = (d, n, e, s) => (ks(d, n, "write to private field"), s ? s.call(d, e) : n.set(d, e), e), o = (d, n, e) => (ks(d, n, "access private method"), e);
|
|
16
|
-
var Vs = (d, n, e) =>
|
|
16
|
+
var Vs = (d, n, e) => fi(ui(d), e, n);
|
|
17
17
|
var zs = (d, n, e) => new Promise((s, h) => {
|
|
18
18
|
var u = (C) => {
|
|
19
19
|
try {
|
|
@@ -32,34 +32,34 @@ var zs = (d, n, e) => new Promise((s, h) => {
|
|
|
32
32
|
});
|
|
33
33
|
import { S as ae } from "../Store-0BVty6AZ.js";
|
|
34
34
|
import { i as q } from "../index-Bv9zgfdb.js";
|
|
35
|
-
import { q as
|
|
36
|
-
import { i as
|
|
35
|
+
import { q as pi } from "../easings-BEmRlrDd.js";
|
|
36
|
+
import { i as bi } 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, b as
|
|
40
|
-
import { c as
|
|
41
|
-
import { p as
|
|
42
|
-
import { c as
|
|
39
|
+
import { a as ls, g as cs, b as mi } from "../layout-BSMtwCga.js";
|
|
40
|
+
import { c as Js, s as Si } from "../math-BOBiC4TN.js";
|
|
41
|
+
import { p as gi, l as vi } from "../number-CumqY64S.js";
|
|
42
|
+
import { c as Qs } from "../stylesheet-DpnWNVyD.js";
|
|
43
43
|
import "../ticker/index.js";
|
|
44
|
-
import { TICK_ORDER as
|
|
45
|
-
import { D as
|
|
46
|
-
import { T as
|
|
47
|
-
import { W as
|
|
44
|
+
import { TICK_ORDER as Xs, RESIZE_ORDER as Ls } from "../order/index.js";
|
|
45
|
+
import { D as Ys } from "../Damped-CtQmJ52v.js";
|
|
46
|
+
import { T as yi } from "../Tweened-BlZB0vl4.js";
|
|
47
|
+
import { W as Ci, K as Pi, D as Ei, A as wi } from "../DragControls-B7q22wzw.js";
|
|
48
48
|
import { windowResizer as pt } from "../window-resizer/index.js";
|
|
49
49
|
import { scrollEntries as ce } from "../scroll-entries/index.js";
|
|
50
50
|
import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
|
|
51
51
|
import { CSSProperty as l } from "../css-property/index.js";
|
|
52
|
-
import { d as
|
|
52
|
+
import { d as xi } from "../Viewport-DA10iWAO.js";
|
|
53
53
|
import "construct-style-sheets-polyfill";
|
|
54
54
|
import { elementResizer as os } from "../element-resizer/index.js";
|
|
55
|
-
import { s as
|
|
56
|
-
import { b as
|
|
57
|
-
var p,
|
|
58
|
-
class
|
|
55
|
+
import { s as Li } from "../gestures-CcXV6fCp.js";
|
|
56
|
+
import { b as ki } from "../dom-CVWzyXPH.js";
|
|
57
|
+
var p, Te, E, us, as, pe, bt, $t, be, Bt, Fe;
|
|
58
|
+
class Vi {
|
|
59
59
|
constructor(n, e, s) {
|
|
60
60
|
i(this, Bt);
|
|
61
61
|
i(this, p);
|
|
62
|
-
i(this,
|
|
62
|
+
i(this, Te);
|
|
63
63
|
i(this, E);
|
|
64
64
|
i(this, us, 0);
|
|
65
65
|
i(this, as, 0);
|
|
@@ -67,13 +67,13 @@ class ki {
|
|
|
67
67
|
i(this, bt, 0);
|
|
68
68
|
i(this, $t, null);
|
|
69
69
|
i(this, be, 0);
|
|
70
|
-
r(this, p, n), r(this,
|
|
70
|
+
r(this, p, n), r(this, Te, e), r(this, E, s), ce.register(t(this, p)), this.setIndex(t(this, Te));
|
|
71
71
|
}
|
|
72
72
|
get element() {
|
|
73
73
|
return t(this, p);
|
|
74
74
|
}
|
|
75
75
|
get index() {
|
|
76
|
-
return t(this,
|
|
76
|
+
return t(this, Te);
|
|
77
77
|
}
|
|
78
78
|
get size() {
|
|
79
79
|
return t(this, pe);
|
|
@@ -111,7 +111,7 @@ class ki {
|
|
|
111
111
|
t(this, E).axisCSSProperty.current,
|
|
112
112
|
e
|
|
113
113
|
);
|
|
114
|
-
const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this, pe) + s, v =
|
|
114
|
+
const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this, pe) + s, v = gi(Js(h, u, g), 3);
|
|
115
115
|
r(this, be, v * -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)`;
|
|
116
116
|
}
|
|
117
117
|
setMark(n) {
|
|
@@ -142,10 +142,10 @@ class ki {
|
|
|
142
142
|
o(this, Bt, Fe).call(this, "current-index-arc-abs", n);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
p = new WeakMap(),
|
|
145
|
+
p = new WeakMap(), Te = new WeakMap(), E = new WeakMap(), us = new WeakMap(), as = new WeakMap(), pe = new WeakMap(), bt = new WeakMap(), $t = new WeakMap(), be = new WeakMap(), Bt = new WeakSet(), Fe = function(n, e) {
|
|
146
146
|
e !== null ? (t(this, p).style.setProperty(`--${n}`, e.toString()), t(this, p).setAttribute(`data-${n}`, e.toString())) : (t(this, p).style.removeProperty(`--${n}`), t(this, p).removeAttribute(`data-${n}`));
|
|
147
147
|
};
|
|
148
|
-
const
|
|
148
|
+
const js = Qs({
|
|
149
149
|
":host": {
|
|
150
150
|
position: "relative",
|
|
151
151
|
width: "100%",
|
|
@@ -184,7 +184,7 @@ const Vi = Js({
|
|
|
184
184
|
flexShrink: "0"
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
|
-
var f, me, D, Wt, mt, St, gt, J, Nt, qt, vt, Gt, Se, Q, V, ge, ve, ye, Ce, De, Pe, X, Ee, Ut, Y, yt, Ct, we, Kt, xe, Le, Zt, jt, Jt, b, Oe, G, a, ds, fs, L, P, U, it, Qt, rt, F, z, He, Pt, Et, wt, K, $e, xt, Xt, Lt, ht, A, Be, kt, ke, We, c, Is, hs,
|
|
187
|
+
var f, me, D, Wt, mt, St, gt, J, Nt, qt, vt, Gt, Se, Q, V, ge, ve, ye, Ce, De, Pe, X, Ee, Ut, Y, yt, Ct, we, Kt, xe, Le, Zt, jt, Jt, b, Oe, G, a, ds, fs, L, P, U, it, Qt, rt, F, z, He, Pt, Et, wt, K, $e, xt, Xt, Lt, ht, A, Be, kt, ke, We, c, Is, hs, Re, Es, ws, Ms, Fs, R, ps, _s, Ne, bs, Rs, Ts, de, ti, ms, ns, qe;
|
|
188
188
|
class As extends HTMLElement {
|
|
189
189
|
constructor() {
|
|
190
190
|
super();
|
|
@@ -291,7 +291,7 @@ class As extends HTMLElement {
|
|
|
291
291
|
i(this, K, !0);
|
|
292
292
|
i(this, $e);
|
|
293
293
|
i(this, xt);
|
|
294
|
-
i(this, Xt, new
|
|
294
|
+
i(this, Xt, new yi());
|
|
295
295
|
i(this, Lt, !1);
|
|
296
296
|
i(this, ht, null);
|
|
297
297
|
i(this, A, !1);
|
|
@@ -299,7 +299,7 @@ class As extends HTMLElement {
|
|
|
299
299
|
i(this, kt, []);
|
|
300
300
|
i(this, ke, !1);
|
|
301
301
|
i(this, We);
|
|
302
|
-
i(this,
|
|
302
|
+
i(this, R, (e) => {
|
|
303
303
|
if (e && t(this, ke)) {
|
|
304
304
|
r(this, ke, !1);
|
|
305
305
|
return;
|
|
@@ -316,14 +316,14 @@ class As extends HTMLElement {
|
|
|
316
316
|
(t(this, Lt) || !t(this, J).current) && (t(this, z).current = o(this, c, ns).call(this));
|
|
317
317
|
} else
|
|
318
318
|
this.vertical ? t(this, b).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
319
|
-
o(this, c,
|
|
319
|
+
o(this, c, ti).call(this), ce.update(
|
|
320
320
|
this,
|
|
321
321
|
t(this, D).current,
|
|
322
322
|
e
|
|
323
323
|
);
|
|
324
324
|
});
|
|
325
325
|
i(this, Ne, (e, s) => {
|
|
326
|
-
t(this, me).current && (o(this, c,
|
|
326
|
+
t(this, me).current && (o(this, c, Rs).call(this, Math.sign(s) || 1), t(this, bs).call(this, e, s));
|
|
327
327
|
});
|
|
328
328
|
i(this, bs, (e, s) => {
|
|
329
329
|
if (!t(this, xt)) {
|
|
@@ -338,10 +338,10 @@ class As extends HTMLElement {
|
|
|
338
338
|
h && this.scrollToSection(h.index, {
|
|
339
339
|
tween: {
|
|
340
340
|
duration: t(this, xe).current,
|
|
341
|
-
easing:
|
|
341
|
+
easing: pi
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
|
-
}, t(this, Kt).current))), !(e.includes("drag") && !
|
|
344
|
+
}, t(this, Kt).current))), !(e.includes("drag") && !xi.isTouch && !t(this, Ce).current)) {
|
|
345
345
|
if (t(this, J).current && e !== "drag") {
|
|
346
346
|
const h = Math.sign(s);
|
|
347
347
|
t(this, a).length ? t(this, Lt) ? this.scrollToSection(o(this, c, ns).call(this, !0)) : this.shiftSections(h, {
|
|
@@ -366,11 +366,11 @@ class As extends HTMLElement {
|
|
|
366
366
|
}, 10));
|
|
367
367
|
}, 20));
|
|
368
368
|
i(this, qe, () => {
|
|
369
|
-
r(this, A, !0), this.hibernatedCSSProperty.current || o(this, c, Fs).call(this), os.subscribe(this, t(this,
|
|
369
|
+
r(this, A, !0), this.hibernatedCSSProperty.current || o(this, c, Fs).call(this), os.subscribe(this, t(this, R)), pt.unsubscribe(t(this, qe));
|
|
370
370
|
});
|
|
371
371
|
if (q) {
|
|
372
372
|
const e = this.attachShadow({ mode: "open" });
|
|
373
|
-
e.adoptedStyleSheets = [
|
|
373
|
+
e.adoptedStyleSheets = [js];
|
|
374
374
|
const s = document.createElement("div");
|
|
375
375
|
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, b, document.createElement("div")), t(this, b).className = "content", r(this, Oe, document.createElement("slot")), t(this, b).appendChild(t(this, Oe)), t(this, Jt).appendChild(t(this, b)), e.appendChild(t(this, Jt)), r(this, Be, new MutationObserver(
|
|
376
376
|
xs(() => {
|
|
@@ -479,10 +479,10 @@ class As extends HTMLElement {
|
|
|
479
479
|
return t(this, jt);
|
|
480
480
|
}
|
|
481
481
|
get currentScrollValue() {
|
|
482
|
-
return o(this, c,
|
|
482
|
+
return o(this, c, Ts).call(this, "current");
|
|
483
483
|
}
|
|
484
484
|
get targetScrollValue() {
|
|
485
|
-
return o(this, c,
|
|
485
|
+
return o(this, c, Ts).call(this, "target");
|
|
486
486
|
}
|
|
487
487
|
get contentWrapperElement() {
|
|
488
488
|
return t(this, Jt);
|
|
@@ -573,7 +573,7 @@ class As extends HTMLElement {
|
|
|
573
573
|
scrollToSection(e, s) {
|
|
574
574
|
if (!t(this, a).length || t(this, K) || t(this, xt))
|
|
575
575
|
return;
|
|
576
|
-
const h = t(this, z).current, u = o(this, c,
|
|
576
|
+
const h = t(this, z).current, u = o(this, c, _s).call(this, e);
|
|
577
577
|
t(this, Lt) || (t(this, z).current = u);
|
|
578
578
|
const g = t(this, a)[h], v = t(this, a)[u];
|
|
579
579
|
if (g && v) {
|
|
@@ -587,7 +587,7 @@ class As extends HTMLElement {
|
|
|
587
587
|
t(this, a).length && this.scrollToSection(t(this, z).current + e, s);
|
|
588
588
|
}
|
|
589
589
|
setPosition(e, s) {
|
|
590
|
-
t(this, K) || (o(this, c,
|
|
590
|
+
t(this, K) || (o(this, c, Rs).call(this, Math.sign(e) || 1), s != null && s.tween ? (clearTimeout(t(this, xt)), t(this, Xt).set(t(this, f).current, { equalize: !0 }), t(this, Xt).set(e, Ks({}, s.tween)), r(this, xt, setTimeout(() => {
|
|
591
591
|
r(this, xt, void 0);
|
|
592
592
|
}, s.tween.duration || 0))) : t(this, f).set(e, {
|
|
593
593
|
equalize: (s == null ? void 0 : s.behaviour) === "instant"
|
|
@@ -600,7 +600,7 @@ class As extends HTMLElement {
|
|
|
600
600
|
if (t(this, jt).current)
|
|
601
601
|
return;
|
|
602
602
|
r(this, a, t(this, G).filter(
|
|
603
|
-
(h) =>
|
|
603
|
+
(h) => bi(h.element)
|
|
604
604
|
)), this.style.setProperty(
|
|
605
605
|
"--sections",
|
|
606
606
|
t(this, a).length.toString()
|
|
@@ -648,18 +648,18 @@ class As extends HTMLElement {
|
|
|
648
648
|
r(this, Et, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, L)), this.classList.toggle("has-overflow", t(this, Et)), t(this, Et) ? t(this, Zt).current || o(this, c, ws).call(this) : o(this, c, Es).call(this), t(this, ms).call(this), st(this, "scrollResize", { custom: !0 }), t(this, f).notify();
|
|
649
649
|
}
|
|
650
650
|
connectedCallback() {
|
|
651
|
-
ce.register(this), r(this, f, new
|
|
651
|
+
ce.register(this), r(this, f, new Ys(0, {
|
|
652
652
|
damping: 0.01,
|
|
653
653
|
min: 0,
|
|
654
|
-
order:
|
|
655
|
-
})), this.setAttribute("tabindex", "0"), r(this, it, new
|
|
654
|
+
order: Xs.SCROLL
|
|
655
|
+
})), this.setAttribute("tabindex", "0"), r(this, it, new Ci({ element: t(this, b) })), t(this, it).changeEvent.subscribe(t(this, Ne)), r(this, Qt, new Pi({
|
|
656
656
|
element: this
|
|
657
657
|
})), t(this, Qt).changeEvent.subscribe(
|
|
658
658
|
t(this, Ne)
|
|
659
|
-
), r(this, rt, new
|
|
659
|
+
), r(this, rt, new Ei({
|
|
660
660
|
element: t(this, b),
|
|
661
661
|
rootElement: this
|
|
662
|
-
})), t(this, rt).changeEvent.subscribe(t(this, Ne)), r(this, F, new
|
|
662
|
+
})), t(this, rt).changeEvent.subscribe(t(this, Ne)), r(this, F, new wi({
|
|
663
663
|
culling: this
|
|
664
664
|
})), t(this, F).changeEvent.subscribe(t(this, bs)), t(this, D).subscribe(() => {
|
|
665
665
|
o(this, c, Is).call(this);
|
|
@@ -670,15 +670,15 @@ class As extends HTMLElement {
|
|
|
670
670
|
}), t(this, Se).subscribe((e) => {
|
|
671
671
|
t(this, rt).inertion = typeof e.current == "number" ? e.current : 1;
|
|
672
672
|
}), t(this, St).subscribe(() => {
|
|
673
|
-
t(this, A) && t(this,
|
|
673
|
+
t(this, A) && t(this, R).call(this);
|
|
674
674
|
}), t(this, gt).subscribe(({ current: e }) => {
|
|
675
|
-
t(this, A) && (e ? o(this, c, hs).call(this) : o(this, c,
|
|
675
|
+
t(this, A) && (e ? o(this, c, hs).call(this) : o(this, c, Re).call(this));
|
|
676
676
|
}), t(this, J).subscribe((e) => {
|
|
677
|
-
t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this, F).interval = e.current, t(this, A) && (e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c,
|
|
677
|
+
t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this, F).interval = e.current, t(this, A) && (e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Re).call(this));
|
|
678
678
|
}), t(this, vt).subscribe((e) => {
|
|
679
|
-
t(this, A) && (t(this,
|
|
679
|
+
t(this, A) && (t(this, R).call(this), e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Re).call(this));
|
|
680
680
|
}), t(this, Q).subscribe((e) => {
|
|
681
|
-
t(this, A) && (t(this,
|
|
681
|
+
t(this, A) && (t(this, R).call(this), o(this, c, de).call(this));
|
|
682
682
|
}), t(this, V).subscribe((e) => {
|
|
683
683
|
e.current ? (t(this, A) && (t(this, a).length || (t(this, gt).current = !0)), t(this, f).max = 1 / 0, t(this, f).min = -1 / 0) : (r(this, He, 0), t(this, f).max = t(this, P), t(this, f).min = 0), this.classList.toggle("loop", !!e.current);
|
|
684
684
|
}), t(this, ge).subscribe((e) => {
|
|
@@ -711,21 +711,24 @@ class As extends HTMLElement {
|
|
|
711
711
|
e.current && !e.previous ? (this.classList.add("hibernated"), o(this, c, Ms).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), o(this, c, Fs).call(this));
|
|
712
712
|
}), t(this, me).observe(), t(this, D).observe(), t(this, Wt).observe(), t(this, mt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, J).observe(), t(this, Nt).observe(), t(this, qt).observe(), t(this, vt).observe(), t(this, Gt).observe(), t(this, Se).observe(), t(this, Q).observe(), t(this, V).observe(), t(this, ge).observe(), t(this, ve).observe(), t(this, ye).observe(), t(this, Ce).observe(), t(this, De).observe(), t(this, Pe).observe(), t(this, X).observe(), t(this, X).observe(), t(this, Ee).observe(), t(this, Ut).observe(), t(this, Y).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, we).observe(), t(this, Kt).observe(), t(this, xe).observe(), t(this, Le).observe(), t(this, Zt).observe(), t(this, jt).observe(), pt.subscribe(t(this, qe), Ls.LAST), t(this, Be).observe(this, { childList: !0 });
|
|
713
713
|
}
|
|
714
|
+
adoptedCallback() {
|
|
715
|
+
this.shadowRoot.adoptedStyleSheets = [js];
|
|
716
|
+
}
|
|
714
717
|
disconnectedCallback() {
|
|
715
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, me).unobserve(), t(this, D).unobserve(), t(this, Wt).unobserve(), t(this, mt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, J).unobserve(), t(this, Nt).unobserve(), t(this, qt).unobserve(), t(this, vt).unobserve(), t(this, Gt).unobserve(), t(this, Se).unobserve(), t(this, Q).unobserve(), t(this, V).unobserve(), t(this, ge).unobserve(), t(this, ve).unobserve(), t(this, ye).unobserve(), t(this, Ce).unobserve(), t(this, De).unobserve(), t(this, Pe).unobserve(), t(this, X).unobserve(), t(this, Ee).unobserve(), t(this, Ut).unobserve(), t(this, Y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, we).unobserve(), t(this, Kt).unobserve(), t(this, xe).unobserve(), t(this, Le).unobserve(), t(this, Zt).unobserve(), t(this, jt).unobserve(), pt.unsubscribe(t(this, qe)), pt.unsubscribe(t(this,
|
|
718
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, me).unobserve(), t(this, D).unobserve(), t(this, Wt).unobserve(), t(this, mt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, J).unobserve(), t(this, Nt).unobserve(), t(this, qt).unobserve(), t(this, vt).unobserve(), t(this, Gt).unobserve(), t(this, Se).unobserve(), t(this, Q).unobserve(), t(this, V).unobserve(), t(this, ge).unobserve(), t(this, ve).unobserve(), t(this, ye).unobserve(), t(this, Ce).unobserve(), t(this, De).unobserve(), t(this, Pe).unobserve(), t(this, X).unobserve(), t(this, Ee).unobserve(), t(this, Ut).unobserve(), t(this, Y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, we).unobserve(), t(this, Kt).unobserve(), t(this, xe).unobserve(), t(this, Le).unobserve(), t(this, Zt).unobserve(), t(this, jt).unobserve(), pt.unsubscribe(t(this, qe)), pt.unsubscribe(t(this, R)), os.unsubscribe(t(this, R)), o(this, c, Ms).call(this), t(this, Be).disconnect();
|
|
716
719
|
}
|
|
717
720
|
}
|
|
718
721
|
f = new WeakMap(), me = new WeakMap(), D = new WeakMap(), Wt = new WeakMap(), mt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), J = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), vt = new WeakMap(), Gt = new WeakMap(), Se = new WeakMap(), Q = new WeakMap(), V = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap(), De = new WeakMap(), Pe = new WeakMap(), X = new WeakMap(), Ee = new WeakMap(), Ut = new WeakMap(), Y = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), we = new WeakMap(), Kt = new WeakMap(), xe = new WeakMap(), Le = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), b = new WeakMap(), Oe = new WeakMap(), G = new WeakMap(), a = new WeakMap(), ds = new WeakMap(), fs = new WeakMap(), L = new WeakMap(), P = new WeakMap(), U = new WeakMap(), it = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), z = new WeakMap(), He = new WeakMap(), Pt = new WeakMap(), Et = new WeakMap(), wt = new WeakMap(), K = new WeakMap(), $e = new WeakMap(), xt = new WeakMap(), Xt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), A = new WeakMap(), Be = new WeakMap(), kt = new WeakMap(), ke = new WeakMap(), We = new WeakMap(), c = new WeakSet(), Is = function() {
|
|
719
722
|
const e = t(this, D).current, s = t(this, Wt).current ? "-reverse" : "";
|
|
720
|
-
t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this, Gt).current ? "max" : e, t(this, Qt).dimension = e === "x" ? "width" : "height", t(this, rt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, A) && t(this,
|
|
723
|
+
t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this, Gt).current ? "max" : e, t(this, Qt).dimension = e === "x" ? "width" : "height", t(this, rt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, A) && t(this, R).call(this);
|
|
721
724
|
}, hs = function() {
|
|
722
|
-
o(this, c,
|
|
723
|
-
e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, G).push(new
|
|
725
|
+
o(this, c, Re).call(this), t(this, Oe).assignedElements().forEach((e, s) => {
|
|
726
|
+
e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, G).push(new Vi(e, s, this));
|
|
724
727
|
}), r(this, a, [...t(this, G)]), t(this, b).style.transform = "", st(this, "scrollSectionsChange", {
|
|
725
728
|
custom: !0,
|
|
726
729
|
composed: !0
|
|
727
|
-
}), t(this,
|
|
728
|
-
},
|
|
730
|
+
}), t(this, R).call(this), o(this, c, de).call(this);
|
|
731
|
+
}, Re = function() {
|
|
729
732
|
t(this, G).forEach((e) => {
|
|
730
733
|
e.destroy();
|
|
731
734
|
}), r(this, G, []), r(this, a, []), t(this, z).reset(), t(this, f).reset(), this.style.removeProperty("--max-section-size"), st(this, "scrollSectionsChange", {
|
|
@@ -735,24 +738,24 @@ f = new WeakMap(), me = new WeakMap(), D = new WeakMap(), Wt = new WeakMap(), mt
|
|
|
735
738
|
}, Es = function() {
|
|
736
739
|
t(this, wt) || (r(this, wt, !0), t(this, f).unsubscribe(t(this, ps)), t(this, f).unlistenAnimationFrame(), clearInterval(t(this, $e)), clearInterval(t(this, xt)), t(this, Xt).unlistenAnimationFrame(), t(this, it).disconnect(), t(this, Qt).disconnect(), t(this, rt).disconnect(), t(this, F).disconnect(), t(this, Et) || (this.sections.forEach((e) => {
|
|
737
740
|
e.unsetTransform();
|
|
738
|
-
}), t(this,
|
|
741
|
+
}), t(this, R).call(this)));
|
|
739
742
|
}, ws = function() {
|
|
740
743
|
t(this, wt) && (r(this, wt, !1), t(this, f).subscribe(t(this, ps), -1e4), t(this, f).notify(), t(this, it).connect(), t(this, Qt).connect(), t(this, rt).connect(), t(this, X).current && t(this, F).connect());
|
|
741
744
|
}, Ms = function() {
|
|
742
|
-
t(this, K) || (r(this, K, !0), clearTimeout(t(this, We)), pt.unsubscribe(t(this,
|
|
745
|
+
t(this, K) || (r(this, K, !0), clearTimeout(t(this, We)), pt.unsubscribe(t(this, R)), o(this, c, Es).call(this), t(this, b).style.transform = "", t(this, b).style.height = "", t(this, b).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), t(this, G).length ? o(this, c, Re).call(this) : (t(this, z).reset(), t(this, f).reset()), ce.unregister(this));
|
|
743
746
|
}, Fs = function() {
|
|
744
747
|
t(this, K) && (r(this, K, !1), ce.register(this), this.tryResplit(), o(this, c, ws).call(this), this.scrollToSection(t(this, Pe).current, {
|
|
745
748
|
behaviour: "instant"
|
|
746
|
-
}), pt.subscribe(t(this,
|
|
747
|
-
},
|
|
749
|
+
}), pt.subscribe(t(this, R), Ls.SCROLL));
|
|
750
|
+
}, R = new WeakMap(), ps = new WeakMap(), _s = function(e) {
|
|
748
751
|
let s = t(this, z).current;
|
|
749
|
-
return t(this, V).current ? s =
|
|
750
|
-
}, Ne = new WeakMap(), bs = new WeakMap(),
|
|
752
|
+
return t(this, V).current ? s = vi(e, t(this, a).length) : s = Js(e, 0, this.limit), s;
|
|
753
|
+
}, Ne = new WeakMap(), bs = new WeakMap(), Rs = function(e = 1) {
|
|
751
754
|
t(this, Ut).current && (t(this, F).direction = e), t(this, X).current && t(this, F).pauseAndContinue(
|
|
752
755
|
t(this, Ee).current,
|
|
753
756
|
this.sectionalCSSProperty.current
|
|
754
757
|
);
|
|
755
|
-
},
|
|
758
|
+
}, Ts = function(e = "current") {
|
|
756
759
|
if (t(this, V).current && t(this, a).length) {
|
|
757
760
|
const s = Math.floor(t(this, f)[e]) % Math.floor(t(this, P) + t(this, L) + t(this, U));
|
|
758
761
|
return s < 0 ? t(this, P) + s + t(this, L) + t(this, U) : s;
|
|
@@ -773,7 +776,7 @@ f = new WeakMap(), me = new WeakMap(), D = new WeakMap(), Wt = new WeakMap(), mt
|
|
|
773
776
|
}), t(this, ms).call(this);
|
|
774
777
|
}
|
|
775
778
|
}
|
|
776
|
-
},
|
|
779
|
+
}, ti = function() {
|
|
777
780
|
if (t(this, Y).current) {
|
|
778
781
|
const e = Math.floor(t(this, kt).length / 2);
|
|
779
782
|
t(this, kt).sort((s, h) => s.element.getBoundingClientRect().left - h.element.getBoundingClientRect().left), t(this, kt).forEach((s, h) => {
|
|
@@ -808,7 +811,7 @@ class is extends HTMLElement {
|
|
|
808
811
|
return t(this, Ss);
|
|
809
812
|
}
|
|
810
813
|
connectedCallback() {
|
|
811
|
-
const e =
|
|
814
|
+
const e = ki(this, As);
|
|
812
815
|
e instanceof As ? r(this, Ss, e) : console.error(this, "e-scroll not found");
|
|
813
816
|
}
|
|
814
817
|
}
|
|
@@ -835,7 +838,7 @@ class zi extends is {
|
|
|
835
838
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
836
839
|
});
|
|
837
840
|
i(this, vs, (e) => {
|
|
838
|
-
document.documentElement.classList.add("grabbing"),
|
|
841
|
+
document.documentElement.classList.add("grabbing"), Li(
|
|
839
842
|
(u) => {
|
|
840
843
|
const g = t(this, Vt) ? u.x : u.y, v = this.scrollElement.distance / t(this, Ge), C = (g - h) * v;
|
|
841
844
|
this.scrollElement.setPosition(s + C);
|
|
@@ -849,7 +852,7 @@ class zi extends is {
|
|
|
849
852
|
if (q) {
|
|
850
853
|
const e = this.attachShadow({ mode: "open" });
|
|
851
854
|
e.adoptedStyleSheets = [
|
|
852
|
-
|
|
855
|
+
Qs({
|
|
853
856
|
":host": {
|
|
854
857
|
display: "inline-block",
|
|
855
858
|
zIndex: "1",
|
|
@@ -1033,8 +1036,8 @@ class Fi extends is {
|
|
|
1033
1036
|
}
|
|
1034
1037
|
Ve = new WeakMap(), ee = new WeakMap(), ot = new WeakMap();
|
|
1035
1038
|
q && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Fi);
|
|
1036
|
-
var se, ie, re, he, It, Mt, Ft,
|
|
1037
|
-
class
|
|
1039
|
+
var se, ie, re, he, It, Mt, Ft, Rt, I, H, $, B, Tt, k, lt, ct, _, Dt, ze, ut, at, dt, w, W, N, tt, et, Z, ts, S, Ot, ne, es, x, ft, T, M, j, Ae, Ht, y, oe, m, ei, si, ii, ri, hi, ni, ss, Ie, Ds, fe, oi, li, Os;
|
|
1040
|
+
class Ri extends is {
|
|
1038
1041
|
constructor() {
|
|
1039
1042
|
super(...arguments);
|
|
1040
1043
|
i(this, m);
|
|
@@ -1045,12 +1048,12 @@ class Ti extends is {
|
|
|
1045
1048
|
i(this, It);
|
|
1046
1049
|
i(this, Mt);
|
|
1047
1050
|
i(this, Ft);
|
|
1048
|
-
i(this,
|
|
1051
|
+
i(this, Rt);
|
|
1049
1052
|
i(this, I);
|
|
1050
1053
|
i(this, H);
|
|
1051
1054
|
i(this, $);
|
|
1052
1055
|
i(this, B);
|
|
1053
|
-
i(this,
|
|
1056
|
+
i(this, Tt);
|
|
1054
1057
|
i(this, k);
|
|
1055
1058
|
i(this, lt);
|
|
1056
1059
|
i(this, ct);
|
|
@@ -1073,7 +1076,7 @@ class Ti extends is {
|
|
|
1073
1076
|
i(this, es);
|
|
1074
1077
|
i(this, x);
|
|
1075
1078
|
i(this, ft);
|
|
1076
|
-
i(this,
|
|
1079
|
+
i(this, T);
|
|
1077
1080
|
i(this, M);
|
|
1078
1081
|
i(this, j);
|
|
1079
1082
|
i(this, Ae);
|
|
@@ -1089,7 +1092,7 @@ class Ti extends is {
|
|
|
1089
1092
|
{ rawValueCheck: !1 }
|
|
1090
1093
|
)), r(this, Ft, new l(this, "--start-offset", 0, {
|
|
1091
1094
|
rawValueCheck: !1
|
|
1092
|
-
})), r(this,
|
|
1095
|
+
})), r(this, Rt, new l(
|
|
1093
1096
|
this,
|
|
1094
1097
|
"--capture-once",
|
|
1095
1098
|
!1
|
|
@@ -1101,7 +1104,7 @@ class Ti extends is {
|
|
|
1101
1104
|
this,
|
|
1102
1105
|
"--captured-from-finish",
|
|
1103
1106
|
""
|
|
1104
|
-
)), r(this,
|
|
1107
|
+
)), r(this, Tt, new l(
|
|
1105
1108
|
this,
|
|
1106
1109
|
"--released-from-start",
|
|
1107
1110
|
""
|
|
@@ -1121,13 +1124,13 @@ class Ti extends is {
|
|
|
1121
1124
|
this,
|
|
1122
1125
|
"--animation-var-type",
|
|
1123
1126
|
"target"
|
|
1124
|
-
)), r(this, ut, new l(this, "--distance-var", "")), r(this, at, new l(this, "--start-var", "")), r(this, dt, new l(this, "--finish-var", "")), r(this, w, new ae(!1)), r(this, W, new ae(!1)), r(this, N, new ae(!1)), r(this, tt, new ae(!1)), r(this, et, new ae(!1)), r(this, Z, new ae(!1)), r(this, ts, []), r(this, S, this), r(this, Ot, 0), r(this, ne, 0), r(this, es, 0), r(this, x, new
|
|
1127
|
+
)), r(this, ut, new l(this, "--distance-var", "")), r(this, at, new l(this, "--start-var", "")), r(this, dt, new l(this, "--finish-var", "")), r(this, w, new ae(!1)), r(this, W, new ae(!1)), r(this, N, new ae(!1)), r(this, tt, new ae(!1)), r(this, et, new ae(!1)), r(this, Z, new ae(!1)), r(this, ts, []), r(this, S, this), r(this, Ot, 0), r(this, ne, 0), r(this, es, 0), r(this, x, new Ys(0, { order: Xs.SEGMENT, min: 0, max: 1 })), r(this, ft, 0), r(this, T, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), r(this, Ht, !1), r(this, y, !0), r(this, oe, !1), this.resize = () => {
|
|
1125
1128
|
r(this, ne, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), r(this, Ot, this.scrollElement.vertical ? ls(this, this.scrollElement) : cs(this, this.scrollElement));
|
|
1126
|
-
const e =
|
|
1129
|
+
const e = mi(
|
|
1127
1130
|
this,
|
|
1128
1131
|
this.scrollElement.vertical ? "top" : "left"
|
|
1129
1132
|
);
|
|
1130
|
-
r(this, Ot, t(this, Ot) - e), r(this,
|
|
1133
|
+
r(this, Ot, t(this, Ot) - e), r(this, T, this.getStart()), r(this, M, this.getDistance()), r(this, T, t(this, T) + t(this, Ft).current), r(this, M, t(this, M) + t(this, Mt).current), r(this, j, t(this, T) + t(this, M)), this.scrollElement.currentScrollValue > t(this, j) && !t(this, w).current && !t(this, W).current && (t(this, w).current = !0), this.setVar(t(this, at).current, t(this, T)), this.setVar(t(this, dt).current, t(this, j)), this.setVar(t(this, ut).current, t(this, M)), t(this, x).max = t(this, M), r(this, Ae, !0), t(this, Ie).call(this);
|
|
1131
1134
|
}, this.findAnotherScrollEntries = xs(() => {
|
|
1132
1135
|
const e = ce.getAll(this).reverse();
|
|
1133
1136
|
let s = 0;
|
|
@@ -1147,7 +1150,7 @@ class Ti extends is {
|
|
|
1147
1150
|
return t(this, Ft);
|
|
1148
1151
|
}
|
|
1149
1152
|
get captureOnceCSSProperty() {
|
|
1150
|
-
return t(this,
|
|
1153
|
+
return t(this, Rt);
|
|
1151
1154
|
}
|
|
1152
1155
|
get capturedCSSProperty() {
|
|
1153
1156
|
return t(this, I);
|
|
@@ -1162,7 +1165,7 @@ class Ti extends is {
|
|
|
1162
1165
|
return t(this, B);
|
|
1163
1166
|
}
|
|
1164
1167
|
get releasedFromStartCSSProperty() {
|
|
1165
|
-
return t(this,
|
|
1168
|
+
return t(this, Tt);
|
|
1166
1169
|
}
|
|
1167
1170
|
get releasedFromFinishCSSProperty() {
|
|
1168
1171
|
return t(this, k);
|
|
@@ -1240,7 +1243,7 @@ class Ti extends is {
|
|
|
1240
1243
|
return Math.abs(Math.cos(t(this, ft) * Math.PI)) * t(this, Dt).current;
|
|
1241
1244
|
}
|
|
1242
1245
|
get start() {
|
|
1243
|
-
return t(this,
|
|
1246
|
+
return t(this, T);
|
|
1244
1247
|
}
|
|
1245
1248
|
get finish() {
|
|
1246
1249
|
return t(this, j);
|
|
@@ -1259,15 +1262,15 @@ class Ti extends is {
|
|
|
1259
1262
|
t(this, ts).forEach((u) => {
|
|
1260
1263
|
e += u.value;
|
|
1261
1264
|
});
|
|
1262
|
-
const s = e - t(this,
|
|
1265
|
+
const s = e - t(this, T);
|
|
1263
1266
|
t(this, oe) || r(this, oe, t(this, x).previous ? Math.abs(t(this, x).previous - s) > 1e3 : !1), t(this, x).set(s);
|
|
1264
1267
|
const h = Math.round(e);
|
|
1265
|
-
t(this, w).current && (h >= t(this,
|
|
1266
|
-
|
|
1267
|
-
), o(this, m,
|
|
1268
|
+
t(this, w).current && (h >= t(this, T) ? t(this, N).current || o(this, m, ii).call(this) : t(this, N).current && !t(this, tt).current && o(this, m, hi).call(this), h < t(this, j) ? t(this, Z).current && !t(this, et).current && o(this, m, ri).call(this) : t(this, N).current && !t(this, Z).current && o(this, m, ni).call(this)), h >= t(this, T) && h < t(this, j) ? t(this, w).current || o(this, m, ei).call(this) : t(this, w).current && (t(this, x).set(
|
|
1269
|
+
Si(t(this, M) / 2, t(this, x).target, 0, t(this, M))
|
|
1270
|
+
), o(this, m, si).call(this)), t(this, Ht) && t(this, Rt).current && (t(this, I).current && t(this, S).classList.add(t(this, I).current), r(this, y, !0));
|
|
1268
1271
|
}
|
|
1269
1272
|
disable() {
|
|
1270
|
-
this.style.cssText = "", r(this, Ot, 0), r(this, ne, 0), t(this, x).reset(), r(this, ft, 0), r(this,
|
|
1273
|
+
this.style.cssText = "", r(this, Ot, 0), r(this, ne, 0), t(this, x).reset(), r(this, ft, 0), r(this, T, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), t(this, w).current = !1, t(this, W).current = !1, t(this, N).current = !1, t(this, tt).current = !1, t(this, et).current = !1, t(this, Z).current = !1, r(this, Ht, !1), r(this, y, !0), o(this, m, Os).call(this);
|
|
1271
1274
|
}
|
|
1272
1275
|
enable() {
|
|
1273
1276
|
r(this, y, !1);
|
|
@@ -1303,7 +1306,7 @@ class Ti extends is {
|
|
|
1303
1306
|
composed: !0,
|
|
1304
1307
|
custom: !0
|
|
1305
1308
|
});
|
|
1306
|
-
}), t(this, se).observe(), t(this, ie).observe(), t(this, re).observe(), t(this, he).observe(), t(this, It).observe(), t(this, Mt).observe(), t(this, Ft).observe(), t(this,
|
|
1309
|
+
}), t(this, se).observe(), t(this, ie).observe(), t(this, re).observe(), t(this, he).observe(), t(this, It).observe(), t(this, Mt).observe(), t(this, Ft).observe(), t(this, Rt).observe(), t(this, I).observe(), t(this, H).observe(), t(this, $).observe(), t(this, B).observe(), t(this, Tt).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, _).observe(), t(this, Dt).observe(), t(this, ze).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, dt).observe();
|
|
1307
1310
|
let e = !1;
|
|
1308
1311
|
this.findAnotherScrollEntries(), t(this, It).current || this.enable(), t(this, se).subscribe((s) => {
|
|
1309
1312
|
t(this, x).damping = s.current;
|
|
@@ -1327,11 +1330,11 @@ class Ti extends is {
|
|
|
1327
1330
|
o(this, m, fe).call(this, s);
|
|
1328
1331
|
}), t(this, H).subscribe((s) => {
|
|
1329
1332
|
o(this, m, fe).call(this, s);
|
|
1330
|
-
}), t(this,
|
|
1333
|
+
}), t(this, Tt).subscribe((s) => {
|
|
1331
1334
|
o(this, m, fe).call(this, s);
|
|
1332
1335
|
}), t(this, k).subscribe((s) => {
|
|
1333
1336
|
o(this, m, fe).call(this, s);
|
|
1334
|
-
}), t(this,
|
|
1337
|
+
}), t(this, Rt).subscribe((s) => {
|
|
1335
1338
|
t(this, y) || !s.current && s.previous && (this.resize(), this.enable());
|
|
1336
1339
|
}), t(this, lt).subscribe((s) => {
|
|
1337
1340
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
@@ -1342,7 +1345,7 @@ class Ti extends is {
|
|
|
1342
1345
|
}), t(this, Dt).subscribe((s) => {
|
|
1343
1346
|
t(this, y) || o(this, m, Ds).call(this);
|
|
1344
1347
|
}), t(this, at).subscribe((s) => {
|
|
1345
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
1348
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
|
|
1346
1349
|
}), t(this, dt).subscribe((s) => {
|
|
1347
1350
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, j)));
|
|
1348
1351
|
}), t(this, ut).subscribe((s) => {
|
|
@@ -1362,7 +1365,7 @@ class Ti extends is {
|
|
|
1362
1365
|
pt.unsubscribe(t(this, ss)), this.scrollElement.offScroll(t(this, Ie)), this.scrollElement.removeEventListener(
|
|
1363
1366
|
"scrollSectionsChange",
|
|
1364
1367
|
this.findAnotherScrollEntries
|
|
1365
|
-
), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this, se).close(), t(this, ie).close(), t(this, re).close(), t(this, he).close(), t(this, It).close(), t(this, Mt).close(), t(this, Ft).close(), t(this,
|
|
1368
|
+
), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this, se).close(), t(this, ie).close(), t(this, re).close(), t(this, he).close(), t(this, It).close(), t(this, Mt).close(), t(this, Ft).close(), t(this, Rt).close(), t(this, I).close(), t(this, H).close(), t(this, $).close(), t(this, B).close(), t(this, Tt).close(), t(this, k).close(), t(this, lt).close(), t(this, ct).close(), t(this, _).close(), t(this, Dt).close(), t(this, ut).close(), t(this, at).close(), t(this, dt).close(), t(this, w).close(), t(this, W).close(), t(this, N).close(), t(this, tt).close(), t(this, et).close(), t(this, Z).close(), this.disable(), t(this, x).close();
|
|
1366
1369
|
}
|
|
1367
1370
|
removeVar(e) {
|
|
1368
1371
|
e && t(this, S).style.removeProperty(`--${e}`);
|
|
@@ -1380,31 +1383,31 @@ class Ti extends is {
|
|
|
1380
1383
|
return t(this, Ot) - t(this, es);
|
|
1381
1384
|
}
|
|
1382
1385
|
}
|
|
1383
|
-
se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), he = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(),
|
|
1386
|
+
se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), he = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), Rt = new WeakMap(), I = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), B = new WeakMap(), Tt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), _ = new WeakMap(), Dt = new WeakMap(), ze = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), w = new WeakMap(), W = new WeakMap(), N = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Z = new WeakMap(), ts = new WeakMap(), S = new WeakMap(), Ot = new WeakMap(), ne = new WeakMap(), es = new WeakMap(), x = new WeakMap(), ft = new WeakMap(), T = new WeakMap(), M = new WeakMap(), j = new WeakMap(), Ae = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), oe = new WeakMap(), m = new WeakSet(), ei = function() {
|
|
1384
1387
|
t(this, w).current = !0, t(this, W).current = !1, r(this, Ht, !0), t(this, H).current && t(this, S).classList.remove(t(this, H).current), t(this, k).current && t(this, S).classList.remove(
|
|
1385
1388
|
t(this, k).current
|
|
1386
1389
|
), t(this, k).current && t(this, S).classList.remove(
|
|
1387
1390
|
t(this, k).current
|
|
1388
1391
|
), t(this, I).current && t(this, S).classList.add(t(this, I).current);
|
|
1389
|
-
},
|
|
1392
|
+
}, si = function() {
|
|
1390
1393
|
t(this, W).current = !0, t(this, w).current = !1, r(this, Ht, !0), t(this, I).current && t(this, S).classList.remove(t(this, I).current), t(this, $).current && t(this, S).classList.remove(
|
|
1391
1394
|
t(this, $).current
|
|
1392
1395
|
), t(this, B).current && t(this, S).classList.remove(
|
|
1393
1396
|
t(this, B).current
|
|
1394
1397
|
), t(this, H).current && t(this, S).classList.add(t(this, H).current);
|
|
1395
|
-
},
|
|
1398
|
+
}, ii = function() {
|
|
1396
1399
|
t(this, w).current = !0, t(this, N).current = !0, t(this, tt).current = !1, t(this, $).current && t(this, S).classList.add(
|
|
1397
1400
|
t(this, $).current
|
|
1398
1401
|
);
|
|
1399
|
-
},
|
|
1402
|
+
}, ri = function() {
|
|
1400
1403
|
t(this, w).current = !0, t(this, et).current = !0, t(this, Z).current = !1, t(this, B).current && t(this, S).classList.add(
|
|
1401
1404
|
t(this, B).current
|
|
1402
1405
|
);
|
|
1403
|
-
},
|
|
1406
|
+
}, hi = function() {
|
|
1404
1407
|
t(this, W).current = !0, t(this, tt).current = !0, t(this, N).current = !1, t(this, k).current && t(this, S).classList.add(
|
|
1405
1408
|
t(this, k).current
|
|
1406
1409
|
);
|
|
1407
|
-
},
|
|
1410
|
+
}, ni = function() {
|
|
1408
1411
|
t(this, W).current = !0, t(this, Z).current = !0, t(this, et).current = !1, t(this, k).current && t(this, S).classList.add(
|
|
1409
1412
|
t(this, k).current
|
|
1410
1413
|
);
|
|
@@ -1417,19 +1420,19 @@ se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), he = new WeakMap(),
|
|
|
1417
1420
|
return;
|
|
1418
1421
|
}
|
|
1419
1422
|
e.current && t(this, w).current ? (e.previous && t(this, S).classList.remove(e.previous), t(this, S).classList.add(e.current)) : !e.current && e.previous && t(this, S).classList.remove(e.previous);
|
|
1420
|
-
},
|
|
1423
|
+
}, oi = function(...e) {
|
|
1421
1424
|
e.forEach((s) => {
|
|
1422
1425
|
s && t(this, S).classList.remove(s);
|
|
1423
1426
|
});
|
|
1424
|
-
},
|
|
1427
|
+
}, li = function(...e) {
|
|
1425
1428
|
e.forEach((s) => {
|
|
1426
1429
|
s && t(this, S).style.removeProperty(`--${s}`);
|
|
1427
1430
|
});
|
|
1428
1431
|
}, Os = function() {
|
|
1429
|
-
o(this, m,
|
|
1432
|
+
o(this, m, oi).call(this, t(this, I).current, t(this, $).current, t(this, B).current, t(this, H).current, t(this, Tt).current, t(this, k).current), o(this, m, li).call(this, t(this, lt).current, t(this, ct).current, t(this, _).current, t(this, ut).current, t(this, at).current, t(this, dt).current);
|
|
1430
1433
|
};
|
|
1431
|
-
q && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment",
|
|
1432
|
-
class
|
|
1434
|
+
q && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ri);
|
|
1435
|
+
class Ti extends Bs {
|
|
1433
1436
|
handleClick(n) {
|
|
1434
1437
|
this.scrollElement.setPosition(
|
|
1435
1438
|
this.scrollElement.vertical ? ls(this) : cs(this),
|
|
@@ -1443,7 +1446,7 @@ class Ri extends Bs {
|
|
|
1443
1446
|
super.disconnectedCallback();
|
|
1444
1447
|
}
|
|
1445
1448
|
}
|
|
1446
|
-
q && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button",
|
|
1449
|
+
q && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", Ti);
|
|
1447
1450
|
var Ps;
|
|
1448
1451
|
const Ws = class Ws extends is {
|
|
1449
1452
|
constructor() {
|
|
@@ -1501,8 +1504,8 @@ export {
|
|
|
1501
1504
|
Hs as ScrollCounterElement,
|
|
1502
1505
|
As as ScrollElement,
|
|
1503
1506
|
zi as ScrollScrollbarElement,
|
|
1504
|
-
|
|
1505
|
-
|
|
1507
|
+
Ti as ScrollSectionButtonElement,
|
|
1508
|
+
Ri as ScrollSegmentElement,
|
|
1506
1509
|
Ai as ScrollSetButtonElement,
|
|
1507
1510
|
Ii as ScrollStepButtonElement,
|
|
1508
1511
|
$s as ScrollTotalElement
|