!function(){"use strict";const t=(t="")=>{try{const e=new URL(t,window.location.origin),n=e.pathname.replace(/\/+$/,"");return{origin:e.origin,path:n||"/"}}catch(t){return null}},e=()=>{const e=document.querySelectorAll(".fb-advanced-navigation-main-wrapper .advanced-navigation-wrapper");if(!e.length)return;const n=()=>{e.forEach(e=>(e=>{if(!e)return;if(e.querySelector(".wp-block-navigation-item.current-menu-item"))return;const n=t(window.location.href);n&&e.querySelectorAll(".wp-block-navigation-item .wp-block-navigation-item__content[href]").forEach(e=>{const r=(e.getAttribute("href")||"").trim();if(!r||r.startsWith("#"))return;const i=t(r),a="page"===e.getAttribute("aria-current"),o=!!i&&i.origin===n.origin&&i.path===n.path;if(a||o){const t=e.closest(".wp-block-navigation-item");t&&!t.classList.contains("current-menu-item")&&t.classList.add("current-menu-item")}})})(e))};n();const r=new MutationObserver(()=>{n()});e.forEach(t=>{r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href","class","aria-current"]})}),window.addEventListener("popstate",n),window.addEventListener("hashchange",n)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();