document.addEventListener('DOMContentLoaded', function (){
var countryInput=document.querySelector('[data-ramiro-country]');
if(!countryInput||typeof fetch!=='function'){
return;
}
fetch('https://get.geojs.io/v1/ip/country.json')
.then(function (response){
if(!response.ok){
throw new Error('Country request failed');
}
return response.json();
})
.then(function (data){
if(data&&data.country){
countryInput.value=data.country;
}})
.catch(function (){
countryInput.value='Unknown';
});
});