document.addEventListener("DOMContentLoaded",function(){function t(){return document.querySelector('[data-botsauto-role="attachments"][data-botsauto-section="attachments"]')||document.getElementById("botsauto-attachments-overview")}function e(){var e=t();e&&e.querySelectorAll(".botsauto-overview-attachments li").forEach(function(t){if(!t.querySelector(".botsauto-jump-to-item")){var e=t.closest(".botsauto-overview-item[data-item-hash]");if(e){var a=e.getAttribute("data-item-hash");if(function(t){return!(!t||"global"===t||"ai_kansenscan"===t||!document.getElementById("botsauto-item-"+t))}(a)){var o=t.querySelector(".botsauto-overview-file-actions");if(o){var s=document.createElement("a");s.href="#botsauto-item-"+a,s.className="botsauto-jump-to-item",s.title="Ga naar checklist item",s.setAttribute("aria-label","Ga naar checklist item"),s.innerHTML='<i class="fas fa-arrow-up-right-from-square" aria-hidden="true"></i>',o.appendChild(s)}}}}})}e();var a=t();a&&"undefined"!=typeof MutationObserver&&new MutationObserver(function(){e()}).observe(a,{childList:!0,subtree:!0});document.addEventListener("click",function(t){var e=t.target;if(e&&"function"==typeof e.closest){var a=e.closest(".botsauto-jump-to-item");if(a){var o=a.getAttribute("href");if(o&&"#"===o.charAt(0)){var s=document.querySelector(o);if(s){t.preventDefault();var i=s.closest(".botsauto-phase, .botsauto-phase-container, .botsauto-phase-wrapper, .botsauto-phase-section");if(i){var n=i.querySelector("summary.phase-toggle, .botsauto-phase-toggle"),r=i.querySelector(".botsauto-phase-content"),c=!1;if(i.tagName&&"details"===i.tagName.toLowerCase()&&(c=!i.open),!c&&i.classList&&(i.classList.contains("collapsed")||i.classList.contains("closed"))&&(c=!0),!c&&n&&n.getAttribute&&"false"===n.getAttribute("aria-expanded")&&(c=!0),!c&&r&&null===r.offsetParent&&(c=!0),c&&n&&"function"==typeof n.click)return n.click(),void setTimeout(function(){u()},300);u()}else u()}}}}function u(){s.scrollIntoView({behavior:"smooth",block:"center"}),s.classList.add("botsauto-item-highlight"),setTimeout(function(){s.classList.remove("botsauto-item-highlight")},5e3)}})});