import{c as e}from"./chunk/util.js";const t=document.getElementById(`min`),n=document.getElementById(`max`),r=document.getElementById(`exit`),i=document.getElementById(`confirm`);window.addEventListener(`message`,a=>{if(a.data===`port`){let o=a.ports[0];o.onmessage=a=>{if(typeof a.data==`object`&&`isFocused`in a.data){Array.from(document.getElementsByTagName(`button`)).forEach(e=>{a.data.isFocused?e.classList.remove(`blurred`):e.classList.add(`blurred`)});return}let s=a.data;t.value=e(s[0]).toString(),n.value=e(s[1]).toString(),n.select();function c(){let e=Number(t.value),r=Number(n.value);e>=r?alert(`Maximum must be greater than minimum.`):o.postMessage([e,r])}r.addEventListener(`click`,()=>{o.postMessage(s)}),i.addEventListener(`click`,c),window.addEventListener(`keydown`,e=>{e.code===`Enter`&&c()})}}});