!function(){"use strict";let e=0,t=!1;function r(r){const o=r.getAttribute("data-display-type"),n="true"===r.getAttribute("data-show-label"),s=(r.getAttribute("data-label-prefix"),r.getAttribute("data-label-suffix"),r.getAttribute("data-label-position")||"inside"),l=r.classList.contains("hide-on-scroll-down");let i,c,a,u;function d(){const e=function(){const e=window.pageYOffset||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-document.documentElement.clientHeight;if(0===t)return 0;const r=e/t*100;return Math.min(Math.max(r,0),100)}(),r=Math.round(e);if("linear"===o&&i&&(i.style.width=e+"%",i.setAttribute("data-progress",r)),"circular"===o&&a&&u){const t=u-e/100*u;a.style.strokeDashoffset=t,a.setAttribute("data-progress",r)}n&&c&&(c.textContent=r),t=!1}function f(){t||(window.requestAnimationFrame(function(){d(),function(){if(!l)return;const t=window.pageYOffset||document.documentElement.scrollTop;t>e&&t>100?r.classList.add("is-hidden"):r.classList.remove("is-hidden"),e=t<=0?0:t}()}),t=!0)}"linear"===o?(i=r.querySelector(".scroll-progress-bar"),n&&(c="inside"===s?r.querySelector(".scroll-progress-label .label-value"):r.querySelector(".scroll-progress-label-outside .label-value"))):"circular"===o&&(a=r.querySelector(".progress-circle"),a&&(u=parseFloat(a.getAttribute("data-circumference"))),n&&(c=r.querySelector(".scroll-progress-label-circular .label-value"))),d(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",function(){t||(window.requestAnimationFrame(d),t=!0)},{passive:!0}),r._scrollProgressCleanup=function(){window.removeEventListener("scroll",f)}}function o(){document.querySelectorAll(".cryzel-scroll-progress").forEach(r)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o(),"undefined"!=typeof MutationObserver&&new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){1===e.nodeType&&(e.classList&&e.classList.contains("cryzel-scroll-progress")?r(e):e.querySelectorAll&&e.querySelectorAll(".cryzel-scroll-progress").forEach(r))})})}).observe(document.body,{childList:!0,subtree:!0})}();