(()=>{"use strict";const t={};function e(o){if(t[o])return t[o];let n={};if(Array.isArray(o)&&(n=[]),"object"==typeof o)return Object.keys(o).forEach((t=>{n[e(t)]=e(o[t])})),n;if(n=o,"string"==typeof n)try{n=decodeURIComponent(n),n=n.replace(/_u002d__u002d_/gm,"--")}catch(t){console.warn(t)}return t[o]=n,n}const o=document.documentElement,{events:n}=window.GHOSTKIT;"scrollBehavior"in o.style&&"smooth"===window.getComputedStyle(o)["scroll-behavior"]||n.on(document,"click",".ghostkit-toc a",(t=>{t.preventDefault();const n=t.delegateTarget;if(!n||!n.hash)return;const i=document.getElementById(e(n.hash).substring(1));if(!i)return;let{top:r}=i.getBoundingClientRect();const c=parseFloat(window.getComputedStyle(o)["scroll-padding-top"]);if(c)r-=c;else{const t=document.getElementById("wpadminbar");t&&"fixed"===window.getComputedStyle(t).position&&(r-=t.getBoundingClientRect().height)}r=Math.max(0,r),window.scrollTo({top:r,behavior:"smooth"})}))})();