// Show the ElevenLabs widget only on public pages. Hide it on admin,
// client portal, login, register and checkout routes, including /de/... .
(function () {
function applyWidgetVisibility() {
if (window.__sovranIsAppPath && window.__sovranIsAppPath(window.location.pathname)) {
document.documentElement.classList.add('sovran-app-route');
} else {
document.documentElement.classList.remove('sovran-app-route');
}
}
window.addEventListener('popstate', applyWidgetVisibility);
var pushState = history.pushState;
var replaceState = history.replaceState;
history.pushState = function () {
var result = pushState.apply(this, arguments);
applyWidgetVisibility();
return result;
};
history.replaceState = function () {
var result = replaceState.apply(this, arguments);
applyWidgetVisibility();
return result;
};
applyWidgetVisibility();
})();