text: document.addEventListener("DOMContentLoaded",function(){const n=document.querySelector(".upload-documents-btn");n&&n.addEventListener("click",n=>{n.preventDefault();const t=document.querySelector(".upload-documents-input");t.addEventListener("change",n=>{n.target.files.length>0&&document.querySelector(".documents-form").submit()});t.click()});const t=document.querySelector(".t-close");t&&t.addEventListener("click",()=>{document.querySelector(".toaster-container").style.display="none"});const i=document.querySelector(".toaster-container");i&&setTimeout(function(){setTimeout(function(){i.style.display="none"},350)},5e3);document.querySelector(".withdraw-button").addEventListener("click",n=>{n.preventDefault();const t=document.querySelector("p.withdraw-error-message"),i=Number(document.querySelector(".desired-amount").value);i==0?(t.textContent="Please enter a valid amount",t.hidden=!1,n.target.disabled=!0):(t.hidden=!0,n.target.disabled=!1,document.querySelector("#withdraw-modal form").submit())});document.querySelector(".desired-amount").addEventListener("keyup",n=>{const u=Number(n.target.value),i=Number(document.querySelector("#withdraw-modal form>input").value),t=document.querySelector("p.withdraw-error-message"),r=document.querySelector("#withdraw-modal form button");u>i?(t.textContent=`You can withdraw up to ${i.toFixed(2)}`,t.hidden=!1,r.disabled=!0):(t.hidden=!0,r.disabled=!1)});const r=document.querySelector(".card-number");r&&r.addEventListener("input",function(){var n=this.value.split("-").join("");n.length>0&&(n=n.match(new RegExp(".{1,4}","g")).join("-"));this.value=n});$(function(){$('[data-toggle="popover"]').popover()})});