PageSourceSearch

https://www.theweather.com/js/bundle/MapaLeafletLugares/66b6154adbbfdb921b79.js

js theweather.com collected 2026-10-02 04:35:28 UTC 17,323 bytes, 1 lines download raw bytes

1(self.webpackChunktiempo=self.webpackChunktiempo||[]).push([[4780],{1214:function(e,t){"use strict";var s;!function(e){e[e.km=0]="km",e[e.ml=1]="ml",e[e.m=2]="m"}(s||(s={})),t.Ay=function(e,t){switch(t){case s.m:e*=1e3;break;case s.ml:e*=.621371192;case s.km:}return Math.round(100*e)/100}},1149:function(e,t){"use strict";t.A=new class{get(e){return new Promise((t,s)=>{const n=new XMLHttpRequest;this.callback(n,t,s),n.open("GET",e,!0),n.send()})}post(e,t,s={}){return new Promise((n,o)=>{const a=new XMLHttpRequest;this.callback(a,n,o),a.open("POST",e,!0);for(const e of Object.keys(s))a.setRequestHeader(e,s[e]);a.send(t)})}head(e){const t=new XMLHttpRequest;t.open("HEAD",e,!0),t.send()}callback(e,t,s){e.onreadystatechange=()=>{4==e.readyState&&(200==e.status?t(e.responseText):s({status:e.statusText,response:e.responseText,code:e.status}))}}}},635:function(e,t,s){"use strict";s.r(t),s.d(t,{MapaLeafletLugares:function(){return p}});var n=s(1403),o=s(4678),a=s(1149),i=s(8367),c=function(e,t,s,n){return new(s||(s=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})};class l{static cargaInfoLeaflet(e,t){const n=o.A.mapa_simbolos.id,c=o.A.mapa_simbolos.nivel;let r,m,d;return d=t?1:0,r=`${i.A.services}/weather/mixed/map/v4`,m=`${r}/${i.A.id}/${c}/${n}/${e}/${d}/`,new Promise((e,t)=>{a.A.get(m).then(n=>{try{const o=JSON.parse(n);o.ok?s(9048)(`./${i.A.lang}.json`).then(t=>{e(new l(o,t.mapas_leaflet))}):t("no response")}catch(e){t(e)}}).catch(e=>{t(e)})})}constructor(e,t){l.zonas=e.response.data.zonas,l.coordenadas=e.response.data.coordenadas,l.zoom=e.response.data.zoom,l.localidades=e.response.data.localidades,l.traducciones=t}static getSimboloV3(e,t){let s;switch(e){case 0:s=t.simbolo.value;break;case 1:s=t.simbolo.madrugada+"n";break;case 2:s=t.simbolo.manana;break;case 3:s=t.simbolo.tarde;break;case 4:s=t.simbolo.noche+"n"}return s}static descriptionSymbolV3(e,t){return c(this,void 0,void 0,function*(){const n=yield s(1663)(`./${i.A.lang}.json`);return 1===e||4===e?n.por_horas.simbolo_noche_2[t]:n.por_horas.simbolo_2[t]})}static descriptionWind(e){return c(this,void 0,void 0,function*(){return(yield s(1663)(`./${i.A.lang}.json`)).por_horas.viento_beaufort[e]})}static tempMin(e,t){let s;return s=i.A.minima_nocturna?t:e,s}static windIcon(e){return Math.floor((e-1)/8)}static windDirection(e){let t="N";switch(e%8){case 0:t="NW";break;case 1:t="N";break;case 2:t="NE";break;case 3:t="E";break;case 4:t="SE";break;case 5:t="S";break;case 6:t="SW";break;case 7:t="W"}return t}}l.url_tiles="https://services.meteored.com/img/maps/symbols/v1/{z}/{x}/{y}{r}.png";var r=s(684),m=s(9205),d=function(e,t,s,n){return new(s||(s=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})};class p{static isPC(){return!0}static init(){return new p,!0}constructor(){var e,t,s,n,a,i,c;this.mymap=null,this.dia=o.A.mapa_simbolos.dia,this.intervalo=parseInt(null!==(s=null===(t=null===(e=document.getElementById("selected1"))||void 0===e?void 0:e.classList.item(0))||void 0===t?void 0:t.split("intervalo")[1])&&void 0!==s?s:"0"),this.dia_seleccionado=null===(a=null===(n=document.getElementById("selected0"))||void 0===n?void 0:n.classList.item(0))||void 0===a?void 0:a.split("opcion")[1],this.intervalo_seleccionado=null===(c=null===(i=document.getElementById("selected1"))||void 0===i?void 0:i.classList.item(0))||void 0===c?void 0:c.split("intervalo")[1],this.paintMap(this.dia,this.intervalo,this.tipoSimb(),p.isPC())}paintMap(e,t,s,a){return d(this,void 0,void 0,function*(){yield l.cargaInfoLeaflet(e,a);let i,c=l.coordenadas.lon;i=o.A.mapa_simbolos.nivel<3&&a?Number(l.coordenadas.lat)+.2:l.coordenadas.lat,this.zoom=l.zoom,e>3&&document.getElementById("opcionesIntervalo").classList.add("disab"),122==o.A.mapa_simbolos.id&&2==o.A.mapa_simbolos.nivel&&(i=60,c=57,this.checkRusia()),this.mymap=(0,n.map)("mapaNew",{touchZoom:!1,boxZoom:!1,scrollWheelZoom:!1,zoomControl:!1,dragging:!1,doubleClickZoom:!1,zoomSnap:.1,zoomDelta:.1,keyboard:!1}
1).setView([i,c],this.zoom),p.isPC()||screen.width>screen.height||320==screen.width?(document.getElementsByClassName("img_map").item(0)&&document.getElementsByClassName("img_map").item(0).remove(),(0,n.tileLayer)(l.url_tiles,{minZoom:0,maxZoom:15,attribution:'&copy;<a href="http://www.openstreetmap.org/copyright" rel="nofollow" target="_blank"> OpenStreetMap</a> | <a href="https://www.ecmwf.int/" rel="nofollow" target="_blank">ECMWF</a><span> by &copy; Meteored</span>'}).addTo(this.mymap)):document.getElementsByClassName("leaflet-control-container").item(0).remove(),addEventListener("orientationchange",e=>{document.getElementsByClassName("img_map").item(0)&&document.getElementsByClassName("img_map").item(0).remove(),(0,n.tileLayer)(l.url_tiles,{minZoom:0,maxZoom:15,attribution:'&copy;<a href="http://www.openstreetmap.org/copyright" rel="nofollow" target="_blank"> OpenStreetMap</a> | <a href="https://www.ecmwf.int/" rel="nofollow" target="_blank">ECMWF</a><span> by &copy; Meteored</span>'}).addTo(this.mymap)});let r=document.getElementById("selected2");switch(s){case 1:document.getElementById("opcionesIntervalo").classList.remove("disab"),r.innerHTML=document.getElementById("simb1").innerHTML,r.classList.replace(r.classList.item(0),document.getElementById("simb1").classList.item(0));break;case 2:document.getElementById("opcionesIntervalo").classList.add("disab"),r.innerHTML=document.getElementById("simb2").innerHTML,r.classList.replace(r.classList.item(0),document.getElementById("simb2").classList.item(0))}this.infoLocs(t,s,a),this.selectMapa(),this.recogerTodos(),this.enlacesMapa(),this.enlacesProvincias()})}infoLocs(e,t,s){return d(this,void 0,void 0,function*(){let a,c=50,r=50;if(s||(c=30,r=30),p.isPC())a=24;else{const e={320:14,360:-12,375:-5,390:0,412:12,414:14,540:84},t=0,s=screen.width;a=e.hasOwnProperty(s)?e[s]:s>414?16:t}for(const d in l.localidades){const p=l.localidades[d];let u=l.getSimboloV3(e,p);0==u&&(u=1);let g=p.nombre,h=p.title,y=l.windIcon(p.viento),v=l.windDirection(p.viento),w=p.id,f=p.url;f&&f.includes("tempo.com")&&"tempo.com"!==i.A.base&&(f=f.replace("tempo.com",i.A.base));let b=l.tempMin(p.temp.min,p.temp.data_min),E=p.temp.max;m.w.cambioTemperatura();let j=yield l.descriptionSymbolV3(e,u),L=yield l.descriptionWind(p.viento);o.A.site.testing&&(f=f.replace("www","test-www"));let B="";B=`<a href="${f}" title="${h}">`,0==e?(B+=1==t?` <span class="info-loc simbolo">\n                                    <img class="icon-${u}" width="${c}" height="${r}" src="${i.A.www}/css/v3/svgs/symbols/color/${u}.svg" alt="${j}" >\n                                  `:`<span class="info-loc viento">\n                                     <span class="icono_viento">\n                                        <img class="${v}" src="${i.A.www}/css/v3/svgs/wind/newWind/${y}.svg" width="32" height="32" alt="${L}">\n                                     </span>`,B+=`    <span id="tMax${w}" class="red changeUnitT" title="${l.traducciones.temp_max}" data-weather="${E}|0|">${o.A.site.signo_temperatura&&Math.round(E)>0?"+":""}${Math.round(E)}&deg;</span>\n                                   <span id="tMin${w}" class="blue changeUnitT" title="${l.traducciones.temp_min}" data-weather="${b}|0|">${o.A.site.signo_temperatura&&Math.round(b)>0?"+":""}${Math.round(b)}&deg;</span>\n                                 </span>  `):B+=` <span class="info-loc-solo simbolo">\n                                <img class="icon-${u}" width="${c}" height="${r}" src="${i.A.www}/css/v3/svgs/symbols/color/${u}.svg" alt="${j}" >\n                            `,B+=s?` <span>${g}</span> </a>  `:" </a>  ";let I=(0,n.divIcon)({className:`content-label localidad_${w}`,iconSize:[c,r],iconAnchor:(0,n.point)(a,19),html:B});(0,n.marker)([p.coordenadas.lat,p.coordenadas.lon],{icon:I}).addTo(this.mymap)}})}infoCambioMomentoDia(e){for(const t in l.localidades){const s=l.localidades[t];let n=s.id,o=l.getSimboloV3(e,s),a=document.getElementsByClassName("localidad_"+n).item(0).getElementsByClassName("simbolo").item(0);0!=e?(a.classList.add("info-loc-solo"),a.classList.remove("info-loc")):a.classList.contains("info-loc-solo")&&(a.classList.remove("info-loc-solo"),a.classList.add("info-loc")),a.getElementsByTagName("img").item(0).src=i.A.
1www+"/css/v3/svgs/symbols/color/"+o+".svg"}}selectMapa(){let e=document.getElementById("opcionesDia"),t=document.getElementById("opcionesIntervalo"),s=document.getElementById("opcionesSimb"),n=document.getElementById("selectProv");e.getElementsByTagName("span").item(0).onclick=()=>{this.cambioEstilos("selected0",document.getElementById("selectDia"),e,"opcion","selectDia",0)},t.getElementsByTagName("span").item(0).onclick=()=>{this.cambioEstilos("selected1",document.getElementById("selectIntervalo"),t,"intervalo","selectIntervalo",1)},s.getElementsByTagName("span").item(0).onclick=()=>{this.cambioEstilos("selected2",document.getElementById("selectSimb"),s,"simb","selectSimb",2)},n&&(n.onclick=()=>{n.classList.contains("mas")?(document.getElementsByClassName("menos")&&this.recoger(),this.desplegarSelect(document.getElementById("ul_hijos"),n)):this.recoger()})}desplegarSelect(e,t){e.classList.remove("selectorNoMostrar"),t.classList.remove("mas"),t.classList.add("triangulo"),t.classList.add("menos"),t.getElementsByTagName("use").item(0).setAttribute("xlink:href","#despMenos")}recoger(){const e=document.getElementsByClassName("mapa");Array.from(e).forEach(e=>{const t=e.getElementsByClassName("menos");Array.from(t).forEach(e=>{const t=e.getElementsByClassName("hijos")[0];t&&t.classList.add("selectorNoMostrar"),e.classList.remove("menos","triangulo"),e.classList.add("mas");const s=e.getElementsByTagName("use")[0];s&&s.setAttribute("xlink:href","#despMas")})})}recogerTodos(){window.onmouseup=e=>{let t=e.target;document.getElementById("selectProv")?document.getElementsByClassName("formulario controles").item(0).contains(t)||document.getElementById("selectProv").contains(t)||this.recoger():document.getElementsByClassName("formulario controles").item(0).contains(t)||this.recoger()}}cambiarMapa(e,t,s,n,o,a){let i=document.getElementById(e);document.getElementById(i.classList.item(0)).style.backgroundColor="#99D8F3",document.getElementById(o).onclick=()=>{let e=document.getSelection().anchorNode.parentElement,t=e.classList.item(0).toString().split(n)[1];document.querySelectorAll(".selector").forEach(e=>{e.setAttribute("style","display:flex;")}),i.innerHTML=e.innerHTML,i.classList.replace(i.classList.item(0),e.classList.item(0)),this.recoger(),0==a?this.enlacesDias(parseInt(t)):1==a?(0!=parseInt(t)?document.getElementById("opcionesSimb").classList.add("disab"):document.getElementById("opcionesSimb").classList.remove("disab"),this.infoCambioMomentoDia(parseInt(t))):2==a&&(this.mymap.remove(),1==parseInt(t)?this.setCookieMapa("mapaSimb"):2==parseInt(t)&&this.setCookieMapa("mapaVien"),this.paintMap(parseInt(this.dia_seleccionado),parseInt(this.intervalo_seleccionado),parseInt(t),p.isPC()))}}cambioEstilos(e,t,s,n,o,a){s.classList.contains("mas")?(document.getElementsByClassName("menos")&&this.recoger(),this.desplegarSelect(t,s),this.cambiarMapa(e,t,s,n,o,a)):this.recoger()}tipoSimb(){switch(r.A.get("mapa_elegido")){case"mapaSimb":default:return 1;case"mapaVien":return 2}}setCookieMapa(e){let t=new Date,s=t.getTime();s+=36e5,t.setTime(s),document.cookie="mapa_elegido="+e+"; expires="+t.toUTCString()+";"}checkRusia(){let e=document.createElement("div");e.id="sig",e.setAttribute("class","map_sig"),e.innerHTML='<span class="barra-svg"><svg class="next_map" version="1.1" xmlns="http://www.w3.org/2000/svg" width="10px" height="20px"><use xlink:href="#fBlanca2" data="sp1"></use></svg></span>',document.getElementById("mapaNew").insertAdjacentElement("beforeend",e);let t=document.createElement("div");t.id="ant",t.setAttribute("class","map_ant"),t.innerHTML='<span class="barra-svg"><svg class="previous_map" version="1.1" xmlns="http://www.w3.org/2000/svg" width="10px" height="20px"><use xlink:href="#fBlanca1" data="sp1"></use></svg></span>',document.getElementById("mapaNew").insertAdjacentElement("afterbegin",t),document.getElementById("ant").style.display="none",this.changeMapRusia()}changeMapRusia(){document.getElementById("sig").addEventListener("click",()=>{this.mymap.setView([64.71,140],l.zoom),document.getElementsByClassName("img_map").item(0)&&document.getElementsByClassName("img_map").item(0).remove(),(0,n.tileLayer)(l.url_tiles,{minZoom:0,maxZoom:15,attribution:'&copy;<a href="http://www.openstreetmap.org/copyright" rel="nofollow" target="_blank"> OpenStreetMap</a> | <a href="https://www.ecmwf.int/" rel="nofollow" target="_blank">ECMWF</a><span> by &copy; Meteored</span>'}).addTo(this.mymap),document.getElementById("sig").style.display="none",document.getElementById("ant").style.display="flex"}),document.getElementById("ant").addEventListener("click",()=>
1{this.mymap.setView([60,57],l.zoom),document.getElementById("sig").style.display="flex",document.getElementById("ant").style.display="none"})}enlacesDias(e){switch(o.A.mapa_simbolos.dias){case 1:this.mymap.remove(),this.paintMap(e,this.intervalo,this.tipoSimb(),p.isPC());break;case 7:e<8?this.construirUrl(e):(this.mymap.remove(),document.getElementsByTagName("h1").item(0).innerText=document.getElementsByTagName("h1").item(0).outerText.split("-")[0],window.history.pushState("","",window.location.href.split("?d")[0]),this.paintMap(e,this.intervalo,this.tipoSimb(),p.isPC()));break;case 14:this.construirUrl(e)}}construirUrl(e){let t=document.getElementById("opcion"+e).getAttribute("data-url"),s=document.getElementById("opcion"+e).getAttribute("data-resto");""!=t&&(t="/"+atob(t)),""!=s&&(s="?"+atob(s));let n="https://"+window.location.host+t+s;window.location.assign(n)}enlacesMapa(){const e=document.getElementsByClassName("mapa");e.length>0&&e.item(0).addEventListener("click",e=>{const t=e.target;if(t&&t.classList.contains("content-label")){e.preventDefault(),e.stopPropagation();const s=t.querySelector("a");if(s){const e=s.href;window.location.assign(e)}}})}enlacesProvincias(){const e=document.getElementById("ul_hijos");e&&e.addEventListener("click",e=>{const t=e.target;if(t&&t.classList.contains("li_hijos")){e.preventDefault(),e.stopPropagation();const s=t.querySelector("a");if(s){const e=s.href;window.location.assign(e)}}})}}},8680:function(e,t,s){"use strict";s.r(t),s.d(t,{MapaLeafletLugares:function(){return o}});var n=s(635);n.MapaLeafletLugares.isPC=()=>!1;class o extends(/^1(484|839)$/.test(s.j)?null:n.MapaLeafletLugares){}},1663:function(e,t,s){var n={"./ca-ES.json":[5385,[5385]],"./da-DK.json":[7605,[7605]],"./de-AT.json":[6153,[6153]],"./de-DE.json":[4635,[4635]],"./en-CA.json":[940,[940]],"./en-GB.json":[3029,[3029]],"./en-US.json":[3520,[3520]],"./es-AR.json":[342,[342]],"./es-BO.json":[3242,[3242]],"./es-CL.json":[2398,[2398]],"./es-CR.json":[1544,[1544]],"./es-DO.json":[5780,[5780]],"./es-EC.json":[3277,[3277]],"./es-ES.json":[2109,[2109]],"./es-HN.json":[7323,[7323]],"./es-MX.json":[5504,[5504]],"./es-PA.json":[3110,[3110]],"./es-PE.json":[9658,[9658]],"./es-PY.json":[2206,[2206]],"./es-UY.json":[2859,[2859]],"./es-VE.json":[9940,[9940]],"./eu-ES.json":[647,[647]],"./fr-FR.json":[9229,[9229]],"./hi-IN.json":[1119,[1119]],"./it-IT.json":[1043,[1043]],"./nl-NL.json":[7569,[7569]],"./pt-BR.json":[5749,[5749]],"./pt-PT.json":[6745,[6745]],"./ro-RO.json":[947,[947]],"./ru-RU.json":[7091,[7091]]};function o(e){try{if(!s.o(n,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=n[e],o=t[0];return s.e(t[1][0]).then(function(){return s.t(o,19)})}o.keys=function(){return Object.keys(n)},o.id=1663,e.exports=o},9048:function(e,t,s){var n={"./ca-ES.json":[5385,[5861]],"./da-DK.json":[7605,[7129]],"./de-AT.json":[6153,[6629]],"./de-DE.json":[4635,[5111]],"./en-CA.json":[940,[464]],"./en-GB.json":[3029,[2553]],"./en-US.json":[3520,[3996]],"./es-AR.json":[342,[818]],"./es-BO.json":[3242,[385]],"./es-CL.json":[2398,[2874]],"./es-CR.json":[1544,[2020]],"./es-DO.json":[5780,[8952]],"./es-EC.json":[3277,[6449]],"./es-ES.json":[2109,[1633]],"./es-HN.json":[7323,[7799]],"./es-MX.json":[5504,[5980]],"./es-PA.json":[3110,[1205]],"./es-PE.json":[9658,[9182]],"./es-PY.json":[2206,[2682]],"./es-UY.json":[2859,[3335]],"./es-VE.json":[9940,[9464]],"./eu-ES.json":[647,[171]],"./fr-FR.json":[9229,[8753]],"./hi-IN.json":[1119,[643]],"./it-IT.json":[1043,[1519]],"./nl-NL.json":[7569,[8045]],"./pt-BR.json":[5749,[5273]],"./pt-PT.json":[6745,[7221]],"./ro-RO.json":[947,[1423]],"./ru-RU.json":[7091,[7567]]};function o(e){try{if(!s.o(n,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=n[e],o=t[0];return s.e(t[1][0]).then(function(){return s.t(o,19)})}o.keys=function(){return Object.keys(n)},o.id=9048,e.exports=o}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.