document.addEventListener('DOMContentLoaded',function(){document.querySelectorAll('[data-tab]').forEach(function(b){b.addEventListener('click',function(){document.querySelectorAll('[data-tab]').forEach(function(x){x.classList.remove('active')});b.classList.add('active');var hidden=document.getElementById('mode');if(hidden)hidden.value=b.dataset.tab;});});document.querySelectorAll('[data-confirm]').forEach(function(el){el.addEventListener('click',function(e){if(!confirm(el.dataset.confirm))e.preventDefault();});});});