const formData=document.getElementById("formData"),mss=document.getElementById("mss"),messageError1=document.getElementById("messageError1"),sendButton=document.getElementById("buttonSendData"),div1=document.getElementById("div1");let validationLogin=!1;formData.addEventListener("submit",e=>{!0===div1.classList.contains("success")&&(validationLogin=!0),!1===validationLogin&&e.preventDefault()}),sendButton.addEventListener("click",()=>{let e=mss.value.trim();0===e.length?(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message")):e.length>=6?(div1.classList.add("success"),mss.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):e.length<6&&(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message"))}),mss.addEventListener("input",function(){let e=mss.value.trim();0===e.length?(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message")):e.length>=6?(div1.classList.add("success"),mss.classList.remove("error-input"),messageError1.classList.remove("show-error-message")):e.length<6&&(div1.classList.remove("success"),mss.classList.add("error-input"),messageError1.classList.add("show-error-message"))}),mss.addEventListener("input",function(){mss.value=mss.value.replace(/[^0-9]/g,"")});const expiryTime=300;let remainingTime=300;function updateCounter(){let e=Math.floor(remainingTime/60),s=remainingTime%60;document.getElementById("minutes").textContent=e.toString().padStart(2,"0"),document.getElementById("seconds").textContent=s.toString().padStart(2,"0"),"00"===document.getElementById("minutes").textContent&&"00"===document.getElementById("seconds").textContent&&window.location.reload()}function countdown(){remainingTime>0?(remainingTime--,updateCounter()):(clearInterval(interval),document.querySelector(".counter").textContent="Expired")}updateCounter();const interval=setInterval(countdown,1e3);