document.querySelectorAll(".favourite-btn").forEach(function(e){e.addEventListener("click",function(){this.classList.toggle("active")})}),document.addEventListener("DOMContentLoaded",function(){var t=document.getElementsByTagName("body")[0];document.querySelectorAll(".col-mail a").forEach(function(e){e.addEventListener("click",function(){t.classList.add("email-detail-show")})}),document.querySelectorAll(".close-btn-email").forEach(function(e){e.addEventListener("click",function(){t.classList.remove("email-detail-show")})})});var isShowMenu=!1,emailMenuSidebar=document.getElementsByClassName("email-menu-sidebar");document.querySelectorAll(".email-menu-btn").forEach(function(e){e.addEventListener("click",function(){emailMenuSidebar.forEach(function(e){e.classList.add("menubar-show"),isShowMenu=!0})})}),window.addEventListener("click",function(e){document.querySelector(".email-menu-sidebar").classList.contains("menubar-show")&&(isShowMenu||document.querySelector(".email-menu-sidebar").classList.remove("menubar-show"),isShowMenu=!1)}),ClassicEditor.create(document.querySelector("#email-editor")).then(function(e){e.ui.view.editable.element.style.height="200px"}).catch(function(e){console.error(e)}),document.querySelectorAll(".message-list .checkbox-wrapper-mail input").forEach(function(e){e.addEventListener("click",function(e){1==e.target.checked?e.target.closest("li").classList.add("active"):e.target.closest("li").classList.remove("active")})});var checkAll=document.getElementById("checkAll");function deleteMultiple(){ids_array=[];for(var e=document.querySelectorAll(".col-mail [type=checkbox]"),t=0;t<e.length;t++)1==e[t].checked&&e[t].parentNode.parentNode.parentNode.remove();document.getElementById("checkAll").checked=!1}checkAll&&(checkAll.onclick=function(){for(var e=document.querySelectorAll('.message-list .checkbox-wrapper-mail input[type="checkbox"]'),t=0;t<e.length;t++)0==e[t].checked?(e[t].parentNode.parentNode.parentNode.classList.add("active"),e[t].checked=this.checked):(e[t].parentNode.parentNode.parentNode.classList.remove("active"),e[t].checked=!1)});