class PageScrollPosition extends HTMLElement{attachedCallback(){this.value=0;let e=document,t=new CustomEvent("value-changed",{detail:{value:0}});this.dispatchEvent(t),e.addEventListener("scroll",(()=>{let e=globalThis.document.documentElement.scrollTop/(globalThis.document.documentElement.scrollHeight-globalThis.document.documentElement.clientHeight)*100;this.value=e,t=new CustomEvent("value-changed",{detail:{value:this.value}}),this.dispatchEvent(t)}))}}customElements.define("page-scroll-position",PageScrollPosition);