\n
').concat(r,'° ').concat(l,"°
\n")}console.log(n),n+="",t.innerHTML=n})}function a(e){var t="https://api.openweathermap.org/data/2.5/onecall?lat=".concat(e.lat,"&lon=").concat(e.lon,"&appid=").concat("cd173a006b0e51dac58c6d8064c94178","&units=metric");console.log(t),axios.get("".concat(t)).then(n)}function c(t){console.log(t);var o=Math.round(t.data.main.humidity);console.log(o),document.querySelector("#humidity").innerHTML="".concat(o);var n=Math.round(t.data.wind.speed);console.log(n),document.querySelector("#wind").innerHTML="".concat(n);var c=Math.round(t.data.clouds.all);console.log(c),document.querySelector("#chance").innerHTML="".concat(c);var r=Math.round(t.data.main.temp);console.log(r),e=r,document.querySelector("#cur-temp").innerHTML="".concat(r);var l=t.data.weather[0].main;console.log(l),document.querySelector("#type-weather").innerHTML="".concat(l);var i=t.data.name;document.querySelector("#city").innerHTML="".concat(i),console.log(i);var d=t.data.weather[0].icon;console.log(d),document.querySelector("#picture-wearthe").src="http://openweathermap.org/img/wn/".concat(d,"@2x.png"),a(t.data.coord)}var r=document.querySelector(".btn-form");r.addEventListener("submit",function(e){e.preventDefault();var o=document.querySelector("#citys").value;console.log(o);var n="https://api.openweathermap.org/data/2.5/weather?q=".concat(o,"&units=metric");axios.get("".concat(n,"&appid=").concat(t)).then(c)});var l=null,i=null;function d(){navigator.geolocation.getCurrentPosition(function(e){var o=e.coords.latitude;console.log(o),l=o;var n=e.coords.longitude;console.log(n),i=n;var a="https://api.openweathermap.org/data/2.5/weather?lat=".concat(o,"&lon=").concat(n,"&units=metric");axios.get("".concat(a,"&appid=").concat(t)).then(c)})}d();var u=document.querySelector("#cur-btn");function s(t){t.preventDefault(),document.querySelector("#cur-temp").innerHTML=e,p.classList.remove("active"),v.classList.add("active")}function m(t){t.preventDefault(),document.querySelector("#cur-temp").innerHTML=Math.round(9*e/5+32),v.classList.remove("active"),p.classList.add("active")}u.addEventListener("click",d);var v=document.querySelector(".graduse");v.addEventListener("click",s);var p=document.querySelector(".farengete");p.addEventListener("click",m);