setTimeout((()=>{(window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: minimal-ui)").matches)&&document.addEventListener("click",(function(e){const o=e.target.closest("a");if(!o)return;const t=o.getAttribute("download"),n=o.getAttribute("href");if(!t||!n)return;e.preventDefault();const d=new XMLHttpRequest;d.open("GET",n,!0),d.responseType="blob",d.onload=function(){if(200===d.status){const e=d.response,o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)}else console.error(`Failed to download file. Status: ${d.status}`)},d.onerror=function(){console.error("Download failed due to a network error.")},d.send()}))}),1e3),document.addEventListener("DOMContentLoaded",(function(){if(pwaforwp_download_js_obj&&pwaforwp_download_js_obj.hasOwnProperty("force_rememberme")&&1==pwaforwp_download_js_obj.force_rememberme){var e=document.getElementById("rememberme"),o=document.querySelector('[name="rememberme"]');e&&(e.checked=!0),o&&(o.checked=!0)}}));