!function(){"use strict";var e=function(){return localStorage.getItem("theme")},t=function(){var t=e();if(t)return t;var a=$("body").attr("theme-mode");return a||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},a=function(e){"auto"===e?document.documentElement.setAttribute("data-bs-theme",window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):("dark"===e&&$(".change-mode").attr("data-bs-theme-value","light"),document.documentElement.setAttribute("data-bs-theme",e))};a(t());var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=document.querySelector("#bd-theme");if(a){var r=document.querySelector("#bd-theme-text"),c=document.querySelector(".theme-icon-active use"),n=document.querySelector('[data-bs-theme-value="'.concat(e,'"]')),o=n.querySelector("svg use").getAttribute("href");document.querySelectorAll("[data-bs-theme-value]").forEach((function(e){e.classList.remove("active"),e.setAttribute("aria-pressed","false")})),n.classList.add("active"),n.setAttribute("aria-pressed","true"),c.setAttribute("href",o);var u="".concat(r.textContent," (").concat(n.dataset.bsThemeValue,")");a.setAttribute("aria-label",u),t&&a.focus()}};window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(){var r=e();"light"!==r&&"dark"!==r&&a(t())})),window.addEventListener("DOMContentLoaded",(function(){r(t()),document.querySelectorAll("[data-bs-theme-value]").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();var c=e.getAttribute("data-bs-theme-value");"dark"===c?e.setAttribute("data-bs-theme-value","light"):e.setAttribute("data-bs-theme-value","dark"),function(e){localStorage.setItem("theme",e)}(c),a(c),r(c,!0)}))}))}))}();