(()=>{let e=null;function t(e){if(a(e))try{chrome.runtime.sendMessage({action:"getTempEmail",inputDataId:e.target.getAttribute("data-temp-mail-org")})}catch(e){return!1}}function n(e){a(e)?e.target.style.cursor="pointer":e.target.style.cursor="auto"}function o(e){i(e.target)}function a(e){return(e.clientX-e.target.getBoundingClientRect().left)/(e.target.scrollWidth-20)*100>97}function l(){return Array.from(document.querySelectorAll('input[type=email]:enabled:not([readonly]),input[name*="email"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="mail"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="Mail"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="почта"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="пошта"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*=\'דוא"ל\']:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="البريد"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="correo electrónico"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="อีเมล"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="ईमेल"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="E-poçta"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="E-posta"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="E-post"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="E-mel"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="پست الکترونیک"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="이메일"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="Eメール"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="R-phost"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="Surel"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="Tölvupóstur"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="Sähköposti"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"]),input[placeholder*="电邮"]:enabled:not([readonly]):not([type="checkbox"]):not([type="radio"])'))}function i(e){e.setAttribute("style","background-image: url(data:image/png;base64,[encoded data, 4892 characters]) !important"),e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="20px",e.style.backgroundPosition="97% center",e.style.cursor="auto",e.addEventListener("mousemove",n),e.addEventListener("click",t)}function c(){l().forEach((function(e,t){e.hasAttribute("data-temp-mail-org")||(i(e),e.addEventListener("mouseenter",o),e.addEventListener("mouseout",o),e.setAttribute("data-temp-mail-org",t.toString()))}))}chrome.runtime.onMessage.addListener((function(a){if(a.email&&a.contextMenu&&function(e){const t=document.activeElement;t.value=e;const n=new Event("input",{bubbles:!0});t.dispatchEvent(n)}(a.email),a.email&&a.inputDataId){const e=document.querySelector(`input[data-temp-mail-org='${a.inputDataId}']`);if(e){e.value=a.email;const t=new Event("input",{bubbles:!0});e.dispatchEvent(t)}}a.action&&"autofillEnabled"===a.action&&(a.autofill?(c(),function(){if(null===e){const t=document.querySelector("body"),n={childList:!0,subtree:!0};e=new MutationObserver(c),e.observe(t,n)}}()):(null!==e&&(e.disconnect(),e=null),l().forEach((function(e){e.hasAttribute("data-temp-mail-org")&&(e.removeEventListener("mousemove",n),e.removeEventListener("mouseenter",o),e.removeEventListener("mouseout",o),e.removeEventListener("click",t),e.style.backgroundImage=e.style.backgroundRepeat=e.style.backgroundSize=e.style.backgroundPosition=e.style.cursor="",e.removeAttribute("data-temp-mail-org"))}))))}))})();