@vlci/cdmciutat 36.0.0 → 37.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.energia=e():t.energia=e()}(self,()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{MONTHS_YEAR:()=>a,MONTHS_YEAR_SHORT:()=>r,TEXTS_COMMON:()=>i,THRESHOLDS:()=>At,addPointInteger:()=>b,buildCamarasTrafico:()=>Et,buildTableCalidadAire:()=>vt,calculateMaxYAxis:()=>L,calculatePentahoPath:()=>Mt,calculateXAxisStart:()=>F,capitalizarTexto:()=>M,checkAllGroupsCollapsed:()=>bt,configureDataBar:()=>H,configureDataGaugeCommon:()=>O,configureDataGaugeMonthCommon:()=>_,configureDataLine:()=>k,configureDataValidate:()=>Vt,configureLinesChartValidates:()=>Gt,convertDateToInteger:()=>y,convertToLanguageSelectorDateRange:()=>ct,convertToTableTreeView:()=>yt,downloadCSVTable:()=>St,downloadPDFTable:()=>xt,formatCellMultiplesLines:()=>ht,formatDayMonthYear:()=>u,formatMilMillionEuros:()=>W,formatMonthAnyo:()=>c,formatName:()=>v,formatNameHeaderColumn:()=>mt,formatRoundTooltip:()=>T,formatShortMonthShortYear:()=>f,formatShortMonthYear:()=>d,formatToMillions:()=>S,formatToTons:()=>x,formatTooltip:()=>$,formatTooltipPie:()=>z,formatTrimestre:()=>m,formatWithPrefix:()=>A,getEnvironment:()=>wt,getMaxFieldNumberFromData:()=>V,getMonth:()=>n,getMonthList:()=>h,getSelectCommonOptions:()=>nt,getSelectTwoColumnsOptions:()=>at,initBarChart:()=>Wt,initBarChartComparationMonth:()=>kt,initChart:()=>D,initElement:()=>w,initStackedBarChart:()=>Lt,initStackedBarChartMonthSeries:()=>Tt,initTable:()=>ft,initValueDefaultDate:()=>lt,initialCalls:()=>Ct,loadIframeOnClickEvent:()=>Ht,printDataChart:()=>E,printDataInHTMLElements:()=>q,printEchart:()=>P,printNoDataChart:()=>C,resetFilter:()=>ot,resetFilterDate:()=>it,resetFilterDates:()=>rt,resetFilterToDefault:()=>ut,resultsetWithFields:()=>B,selectConfigDatasource:()=>tt,selectConfigDatasourceAllValue:()=>et,selectFilterAll:()=>K,selectFilterNumItemsDefault:()=>dt,selectValueDefaultInFilter:()=>st,separateDayMonthYearToSlash:()=>l,splitDataset:()=>U,subtractOneDay:()=>g,subtractOneMonth:()=>p,traverseRows:()=>pt,updateDomElement:()=>G,updateObject:()=>R,updateStackedBarOptions:()=>zt});const o={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function n(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}const a={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])},r={es_ES:new Map([["1","Ene"],["2","Feb"],["3","Mar"],["4","Abr"],["5","May"],["6","Jun"],["7","Jul"],["8","Ago"],["9","Sep"],["10","Oct"],["11","Nov"],["12","Dic"]]),ca_ES:new Map([["1","Gen"],["2","Feb"],["3","Mar"],["4","Abr"],["5","Mai"],["6","Jun"],["7","Jul"],["8","Ago"],["9","Set"],["10","Oct"],["11","Nov"],["12","Des"]])},i={es_ES:new Map([["last_update","Última actualización"]]),ca_ES:new Map([["last_update","Última actualització"]])};function l(t){return`${t.substring(6,8)}/${t.substring(4,6)}/${t.substring(0,4)}`}function s(t){return[t.substring(0,4),o[t.substring(4,6)]]}function c(t){const[e,o]=s(t);return`${o} ${e}`}function u(t){const[e,n,a]=function(t){return[t.substring(0,4),o[t.substring(4,6)],t.substring(6,8)]}(t);return`${a} ${n} ${e}`}function d(t){const[e,o]=s(t);return`${o.substring(0,3)} ${e}`}function f(t){const[e,o]=s(t);return`${o.substring(0,3)} '${e.substring(2,4)}`}function m(t){const[e,o]=t.split("-");return`${parseFloat(o)/3}T ${e}`}function h(t,e){const o=t[e];return Array.from(o.values()).map(t=>t.slice(0,3))}function g(t){const e=Math.floor(t/1e4),o=new Date(e,t%1e4/100-1,t%100);return o.setDate(o.getDate()-1),`${o.getFullYear()}${(o.getMonth()+1).toString().padStart(2,"0")}${o.getDate().toString().padStart(2,"0")}`}function p(t){let e;const o=new Date(Math.floor(t/100),t%100-1,0);return e=`${o.getFullYear()}${(o.getMonth()+1).toString().padStart(2,"0")}`,e}function y(t){return"string"==typeof t?parseInt(t.replace("-",""),10):t}function b(t,e=2){let o=navigator.language||navigator.userLanguage;o=o.length<=2?`${o}-${o.toUpperCase()}`:o;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===o?t.toLocaleString("de-DE",n):t.toLocaleString(o,n)}function S(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function x(t){return t>=1e3?t/1e3+" Tn":t.toString()}function A(t){let e,o;return t>=1e6?(e=t/1e6,o="G"):t>=1e3?(e=t/1e3,o="M"):(e=t,o="k"),{value:Math.round(100*e)/100,prefix:o}}function v(t,e=29){if(t.length>=e){const o=t.split(" ");let n="",a="";return o.forEach(t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(a+=`${n}\n`,n=t)}),a+=n,a}return t}function M(t){return t.includes("N/D")?t:t.toLowerCase().replace(/(^|\s|[.,;:!?¡¿(){}[\]])([^\s])/gu,(t,e,o)=>e+o[0].toUpperCase())}function w(t,e,o="MainContentLoadedCustom"){let n=document.getElementById(t);return n?Promise.resolve(e(n)):new Promise(a=>{document.body.addEventListener(o,()=>{n=document.getElementById(t),n?a(e(n)):(console.error(`El elemento con ID ${t} aún no está disponible después del evento.`),a(null))})})}function D(t,e){return w(t,t=>{const o=echarts.init(t);o.setOption(e,!0),window.addEventListener("resize",()=>{null!=o&&void 0!==o&&o.resize()});const n=document.getElementById("main-content");return n&&(n.addEventListener("shown.bs.collapse",()=>{o.resize()}),n.addEventListener("hidden.bs.collapse",()=>{o.resize()})),o})}function C(t,e){const o=t?document.querySelector(t):null,n=e?document.querySelector(e):null;o&&(o.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function E(t,e){const o=t?document.querySelector(t):null,n=e?document.querySelector(e):null;o&&(o.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function $(t,e=!1,o=!0,n=""){let a=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach(t=>{const r=e?Math.round(t.data):t.data,i=o?`<div style="font-weight: 400;color: #666;">${l=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${l}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${b(r)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${b(r)} ${n}`:"-"}\n </span>\n </div>`;var l;a+=i}),a}function F(t){return 100*(t-120)/t}function L(t,e){const o=Math.max(...t);return o+(e-o%e)}function z(t,e=!1){const o=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:b(t.value);return`<div> ${o} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function T(t,e){let o=`${t.name} : `;return o+=`<span style="font-weight:500">${b(Math.round(t.value))}</span>`,e&&(o+=`<span> (${t.percent}%)</span>`),t.marker+o}function W(t){const e=1e6,o=Number(t);return o>=0&&o<e?`${b(o)} €`:o>=e?`${b(o/e)} M €`:"-"}function P(t,e,o){return 0===t.length?(C(`#${e}`,`#${o}`),!1):(E(`#${o}`,`#${e}`),!0)}function N(t,e,o=1){const n=Math.max(...t.map(t=>t[e]))*o;return 5e3*Math.ceil(n/5e3)}function O(t,e,o,n=30,a=15,r=30,i=-70,l=70,s=3){const c=N(t,e.data,1.1),u=l,d=o.slice(),f=[];let m=a,h=r,g=i;for(let o=0;o<t.length;o+=1)f.push({value:t[o][e.data],name:v(String(t[o][e.type]).replace(/\[.*?\]/g,"")),color:d.shift(),title:{offsetCenter:[`${String(g)}%`,`${String(m)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(g)}%`,`${String(h)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>b(Math.round(t))}}),g+=u,(o+1)%s===0&&(h+=r,m+=2*a,g=i);return[c,f]}function _(t,e,o,a=0){return[N(e,o.data,1),t=>function(t,e,o){const a=b(Math.round(e)),r=n(t[o][0]),i=t[o][1],l=`\n${r} ${i} : ${a}`,s=`${a}\n${r} ${i}`;return window.innerWidth<=1710?l:s}(e,t,a),[{value:e[a][o.data]}]]}function I(t,e){const{resultset:o}={resultset:t},n=new Set,a=new Set,r=o.map(([t,o,r])=>{const i=e?Math.round(r):r;return n.add(t),a.add(o),{day:o,type:t,value:i}}),i=Array.from(a.values()),l=Array.from(n.values());return l.sort((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0})),[l.map(t=>{const e=r.filter(e=>e.type===t).map(({day:e,value:o})=>[e,t,o]),o=i.map(t=>{const o=e.find(([e])=>e===t);return o?o[2]:null});return{name:t,data:o}}),l,a]}function k(t,e=[],o=!1){const[n,a,r]=I(t,o);return n.forEach(t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())}),[n,r,a]}function H(t,e,o=!1){const[n,a,r]=I(t,o);return n.forEach(t=>{t.type="bar",t.color=e.shift(),t.smooth=!1}),[n,r,a]}function B(t){const{resultset:e,metadata:o}=t,n=[];return e.forEach(t=>{const e={};t.forEach((t,n)=>{e[o[n].colName]=t}),n.push(e)}),n}function R(t,e){const o={...t};return Object.keys(e).forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n&&Array.isArray(e[n])?o[n]=e[n].map((e,o)=>({...Array.isArray(t[n])&&t[n][o]||{},...e})):"object"!=typeof e[n]||null===e[n]||Array.isArray(e[n])?t[n]!==e[n]&&(o[n]=e[n]):o[n]=R(t[n]||{},e[n]))}),o}function q(t,e){const o=()=>{t.forEach(t=>{t.id in e&&Object.entries(e[t.id]).forEach(o=>{const n=o[0],a=o[1];"object"==typeof a?a.className?document.querySelector(a.className).className=t[n]:a.element&&a.format&&(document.querySelector(a.element).textContent=e[t.id][n].format(t[n])):document.querySelector(a).textContent=t[n]})})};try{o()}catch(t){document.body.addEventListener("MainContentLoadedCustom",()=>{o()})}}function V(t,e){const o=B(t),n=[];let a=null;return o.forEach(t=>{const o=t[e];"number"!=typeof o||Number.isNaN(o)||n.push(o)}),n.length>0&&(a=Math.max(...n)),a}function G(t,e){const o=document.querySelector(t);o?o.textContent=e:console.warn(`Elemento ${t} no encontrado en el DOM`)}function U(t,e=!0){const o={Cont:[],Mob:[]};return t.forEach(t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?o.Cont.push([t[3],t[4],t[2]]):o.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?o.Mob.push([t[3],t[4],t[2]]):o.Mob.push([t[3],t[2]]))}),o}const j=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],J=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],Y=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],Z=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],X=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function K(t){const e=t.resultset.map(t=>t[0]);return this.dashboard.fireChange(this.parameter,e),t}function Q(t){for(const e of t)if(Array.isArray(e)){if(!Q(e))return!1}else if("All"!==e)return!1;return!0}function tt(t,e,o,n){return Q(e)?(t.queryDefinition.dataAccessId=o,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function et(t){return t.dashboard.setParameter(t.parameter,["All"]),!0}function ot(t){t.forEach(t=>{Dashboards.fireChange(t,["All"])})}function nt(t="Todos"){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:t,noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function at(t="Todos"){const e=nt(t);return e.input.indexes.id=1,e.input.indexes.label=0,e}function rt(t,e,o,n){const a=Dashboards.getParameterValue(o),r=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[a]),Dashboards.fireChange(e,[r]),!0}function it(t,e){const o=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[o]),!0}function lt(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function st(t,e){const o=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[o])}function ct(t){t.regional.es={monthNames:j,abbreviatedMonthNames:J,dayNames:Y,abbreviatedDayNames:Z,dayNamesMin:X,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function ut(t,e){const o=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,Array.isArray(o)?o:[o]),!0}function dt(t,e,o,n=0){const a=t.resultset.slice(0,o).map(t=>t[n]);return Dashboards.setParameter(e,a),t}function ft(t,e){return w(t,t=>new Tabulator(t,e))}function mt(t,e){let o=t.getValue();return o.length>e&&(o=`${o.substr(0,e)}<br>${o.substr(e)}`),o}function ht(t,e){const o=t.getValue().split(" ");let n="",a="";return o.forEach(t=>{(a+t).length<=e?a+=`${t} `:(n+=`${a}<br>`,a=`${t} `)}),n+=`${a}<br>`,n}function gt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const o=t.getTreeChildren();o.length>0&&o.forEach(t=>{t.getTreeChildren().length>0&&gt(t,e)})}function pt(t,e){t.getRows().forEach(t=>{t.getTreeChildren().length>0&&gt(t,e)})}function yt(t,e,o,n){const a=[];for(const r in t)if(t.hasOwnProperty(r)){const i=t[r],l={[e]:i[0],_children:[]};i.shift(),i.forEach((t,a)=>{const r={[e]:o[a],[n]:t};l._children.push(r)}),a.push(l)}return a}function bt(t){let e=!0;return t.getGroups().forEach(t=>{t._group.visible&&(e=!1)}),e}function St(t,e,o){const n=document.getElementById(o),a=n.cloneNode(!0);n.parentNode.replaceChild(a,n),a.addEventListener("click",()=>{t.download("csv",`${e}.csv`,{delimiter:";"})})}function xt(t,e,o){const n=document.getElementById(o),a=n.cloneNode(!0);n.parentNode.replaceChild(a,n),a.addEventListener("click",()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})})}const At={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function vt(t){const e=[],o={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function n(t,e,n){const a=document.createElement("td");if(a.setAttribute("id",t),null!=e){a.innerHTML=e;const t=function(t,e){let n;return void 0===e?n=6:"ND"===e?n=7:(n=5,t.forEach((t,o)=>{e<=t&&5===n&&(n=o)})),o[n]}(n,e);a.classList.add(t)}return a}return t.forEach(t=>{const o=t;"noData"===o.operationalstatus&&(o.so2value="ND",o.no2value="ND",o.o3value="ND",o.pm10value="ND",o.pm25value="ND");const a=document.createElement("tr"),r=document.createElement("td");r.innerHTML=o.address,a.appendChild(r),a.appendChild(n(`${o.entityid}_so2`,o.so2value,At.SO2)),a.appendChild(n(`${o.entityid}_no2`,o.no2value,At.NO2)),a.appendChild(n(`${o.entityid}_o3`,o.o3value,At.O3)),a.appendChild(n(`${o.entityid}_pm10`,o.pm10value,At.PM10)),a.appendChild(n(`${o.entityid}_pm25`,o.pm25value,At.PM25)),e.push(a)}),e}function Mt(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function wt(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function Dt(t,e){document.querySelectorAll(`[${t}]`).forEach(o=>{!function(t,e,o){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,o&&o()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(o.getAttribute(t),o,e)})}function Ct(t){Dt("include-html-cabecera",function(){!function(){const t=wt();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=wt();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()}),Dt("include-html-menu"),Dt("include-html-main-container",function(){document.body.dispatchEvent(new Event("MainContentLoadedCustom")),function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])}(),t&&t()}),Dt("include-html-copyright")}function Et(t,e,o,n,a,r){let i=!1,l=!1;const s=document.querySelector(t),c=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function d(t=!0){const e=document.querySelector(o);t?(s&&(s.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),l=!0):(e.classList.remove("blur"),u(),l=!1)}const f=t=>{new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(l||u(),i||(i=!0,window.setTimeout(d,r)))})}).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(s&&(s.setAttribute("sandbox","allow-scripts"),f(s)),c&&(c.setAttribute("sandbox","allow-scripts"),f(c)),document.querySelector(a).addEventListener("click",()=>{d(!1),window.setTimeout(d,r)})):document.querySelectorAll(n)[0].style.display="none"}const $t={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${S(t)}€`}}]},Ft=(t,e)=>{e.sort((t,e)=>parseInt(t.anyo)-parseInt(e.anyo));const o={};e.forEach(e=>{const n=e[1],a=e[0];a!==t.seriesName||o[n]||(o[n]=0),a===t.seriesName&&(o[n]+=e[2])});let n=`<p>${t.seriesName}</p>`;for(const[e,a]of Object.entries(o))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${b(a)}</span></div>`;return n};function Lt(t,e,o=void 0,n=void 0){const a=null===n?void 0:n,r=new Set(e.map(t=>t[1]));let i;const l={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>Ft(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,o,n,a){const r={},i=a.contentSize[1]/2,l=a.viewSize[1],s=t[1];return s<i?r.top=10:s+i>l?r.bottom=10:r.top=s-i,t[0]<a.viewSize[0]/2?r.left=t[0]+20:r.right=a.viewSize[0]-t[0]+20,r}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>b(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(r),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>b(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};a&&a.itemStyle&&Array.isArray(a.itemStyle.borderColor)&&(i=[...a.itemStyle.borderColor],delete a.itemStyle.borderColor);const o=function(t){return t.reduce((t,e)=>{const o=e[0];return t[o]||(t[o]=[]),t[o].push(e),t},{})}(e),n=Object.keys(o);r.forEach(t=>{n.forEach(e=>{void 0===o[e].find(e=>e[1]===t)&&(o[e].push([o[e][0][0],t,void 0]),o[e].sort())})});const l=[];return Object.keys(o).forEach(e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=o[e].map(t=>t[2]);let n={};n=void 0!==a?R(t,a):t,l.push({...n})}),l})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let s={};s=void 0!==o?R(l,o):l,D(t,s)}function zt(t){let e={};return e=R($t,t),e}function Tt(t,e,o={},a={}){let r={};r=R(o,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach(e=>{t.add(e[1])}),Array.from(t).sort((t,e)=>t-e)}()}});const i={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},l=null===a?i:R(a,i),s=e;s.forEach((t,e)=>{s[e][0]=n(t[0])}),Lt(t,s,r,l)}function Wt(t,e=void 0){const o={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>T(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?R(o,e):o,D(t,n)}const Pt="es_ES",Nt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function Ot(t){return Math.max(...t.map(t=>Number(t[0])))}function _t(t){const e=t.filter(e=>Number(e[0])===Ot(t)),o=Array.from({length:12},()=>0);return e.forEach(([t,e,n])=>{const a=parseInt(e,10)-1;o[a]=n}),o}function It(t){const e=t.filter(e=>Number(e[0])===Ot(t)-1),o=Array.from({length:12},()=>0);return e.forEach(([t,e,n])=>{const a=parseInt(e,10)-1;o[a]=n}),o}function kt(t,e,o=void 0){const n=Ot(e).toString(),a=(Ot(e)-1).toString();Wt(t,R({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[a,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:h(Nt,Pt),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:a,type:"bar",data:It(e)},{name:n,type:"bar",barGap:0,data:_t(e)}]},o))}function Ht(t,e,o){const n=document.querySelector(e),a=document.querySelector(t);let r=!1;a.addEventListener("click",()=>{!1===r&&(r=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",o),n.onload=()=>{r=!1})}),a.disabled=!1}const Bt="id",Rt="fecha",qt="value";function Vt(t,e,o,n,a="es_ES"){const[r,i]=function(t,e,o){const n=[],a=[];return t.forEach(t=>{e.includes(`${t[Bt]}`)?n.push(`${t[Rt]}`):o.includes(`${t[Bt]}`)&&a.push(`${t[Rt]}`)}),[n.map(t=>[t,0]),a.map(t=>[t,0])]}(t,o,n);let l="es_ES"==a?"Datos sin validar":"Dades sense validar";0===i.length&&(l="");const s={name:"Datos validados",type:"line",data:[...r,i[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let c="",u="";if(0===i.length){const e=t[t.length-1].fecha;c=e,u=e}else c=i[0][0],u=i[i.length-1][0];return[...e,s,{name:"Datos NO validados",type:"line",data:i,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:l,xAxis:c,yAxis:0},{name:"end",xAxis:u,yAxis:Math.max(...t.filter(t=>null!==t[qt]).map(t=>parseInt(`${t[qt]}`,10)))}]]}}]}function Gt(t,e,o=void 0){D(t,R({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>$(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},o))}return e})(),t.exports=e()}},e={};function o(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{echartBarEvolucion:()=>C,echartBarEvolucionDesagregada:()=>E,echartGaugeEnergiaMedia:()=>y,echartLineAnual:()=>W,echartLineDiaria:()=>z,echartLineMensual:()=>T,echartPie:()=>S,echartTop10:()=>b,getSelectCommonOptions:()=>t.getSelectCommonOptions,getSelectTwoColumnsOptions:()=>t.getSelectTwoColumnsOptions,indicadorEnergiaTotal:()=>s,initElement:()=>t.initElement,initValueDefaultDates:()=>t.initValueDefaultDates,resetFilter:()=>t.resetFilter,resetFilterDate:()=>t.resetFilterDate,resetFilterToDefault:()=>t.resetFilterToDefault,selectConfigDatasourceAllValue:()=>t.selectConfigDatasourceAllValue,setFechaDatosRecientes:()=>l});var t=o(2725);const e="Wh";function a(o){const{value:n,prefix:a}=(0,t.formatWithPrefix)(o);return`${n.toLocaleString("es-ES")} ${a}${e}`}function r(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.map(r):Object.entries(t).reduce((t,[e,o])=>({...t,[e]:"function"==typeof o?o:r(o)}),{})}function i(t){return`${t.substring(0,4)}/${t.substring(4,6)}`}function l(e,o){const n=(0,t.resultsetWithFields)(e);(0,t.initElement)(o,t=>{t.textContent=n[0].fecha_maxima})}function s(e){const o=(0,t.resultsetWithFields)(e),n=o[0].id,r={[n]:{value:{element:"#consumoTotal",format:a},id:{element:"#tipoEnergia",format:t=>`Total ${t}`}}};(0,t.printDataInHTMLElements)(o,r)}const c={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:"",margin:0,padding:0,top:"0",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"100%"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{show:!0,trigger:"none"},series:[{type:"gauge",center:["50%","75%"],radius:"85%",startAngle:200,endAngle:-20,data:[{value:null}],detail:{width:"50%",borderRadius:0,offsetCenter:[0,0],valueAnimation:!0,color:"#284B63",fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat",fontSize:18,lineHeight:18,formatter:a},progress:{show:!0,width:20,itemStyle:{color:"#B9D9EB"}},axisLine:{lineStyle:{width:20}},axisTick:{distance:-25,splitNumber:5,length:3,lineStyle:{width:1,color:"#ccc"}},splitLine:{distance:-28,length:2,lineStyle:{width:1,color:"#ccc"}},axisLabel:{distance:6,fontSize:10,fontWeight:"400",fontFamily:"Montserrat",color:"#666"},anchor:{show:!1},pointer:{show:!1}}],media:[{query:{maxHeight:145},option:{title:{itemGap:2},series:[{detail:{fontSize:14,lineHeight:14}}]}},{query:{minWidth:420},option:{series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:40},axisLine:{lineStyle:{width:40}},axisTick:{distance:-45},splitLine:{distance:-50,length:5},axisLabel:{distance:15,fontSize:12}}]}},{query:{minWidth:420,minHeight:360},option:{series:[{detail:{fontSize:32,lineHeight:32}}]}},{query:{minWidth:420,minHeight:345},option:{series:[{detail:{fontSize:40,lineHeight:40}}]}},{query:{minWidth:460,maxHeight:230},option:{series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:30},axisLine:{lineStyle:{width:30}},axisTick:{distance:-35},splitLine:{distance:-40,length:5},axisLabel:{distance:15,fontSize:12}}]}},{query:{minWidth:326,minHeight:214},option:{title:{top:"10"},series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:30},axisLine:{lineStyle:{width:30}},axisTick:{distance:-35},splitLine:{distance:-40,length:5},axisLabel:{distance:15,fontSize:12}}]}}]},u={grid:{left:"0",right:"0",bottom:"0",top:"60",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"0",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:"15",lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"290",overflow:"break"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,textStyle:{fontFamily:"Montserrat",fontSize:12,color:"#666",textAlight:"right"},formatter(t){const e=a(t.value);return`\n <div style="display: block;width: 260px;white-space: wrap;line-height: 130%; font-weight: 500;color: #666;">${t.name}:</div>\n <div style="text-align: right;display: block;font-weight: 600;color: #333;">\n ${e}\n </div>\n `}},xAxis:{show:!1,axisLabel:{show:!1},type:"value"},yAxis:{show:!1,axisLabel:{show:!1},type:"category",data:[]},series:[{type:"bar",data:[],itemStyle:{color:"#B9D9EB"},yAxisIndex:"0",barMinWidth:"15",barGap:0,label:{show:!0,position:"insideLeft",textStyle:{fontSize:10,lineHeight:11,fontWeight:600,fontFamily:"Montserrat",color:"#333"},width:"280",padding:3,overflow:"break",formatter(t){const e=a(t.value);return`{name|${t.name}}\n${e}`},rich:{name:{fontSize:8,padding:[2,0,2,0]}}}}],media:[{query:{minWidth:310},option:{series:[{label:{width:"310",rich:{name:{fontSize:9}}}}]}},{query:{minWidth:339},option:{series:[{label:{width:"339"}}]}},{query:{minWidth:420},option:{series:[{label:{width:"auto",overflow:"none",formatter(t){const e=a(t.value);return`{name|${t.name}}: ${e}`},rich:{name:{fontSize:11,padding:[2,0,0,0]}}}}]}},{query:{minHeight:320},option:{series:[{barMinWidth:"20",label:{textStyle:{fontSize:14,lineHeight:14}}}]}},{query:{minWidth:695},option:{series:[{label:{textStyle:{fontSize:16,lineHeight:16},rich:{name:{fontSize:13}}}}]}},{query:{minWidth:420,maxHeight:310},option:{grid:{top:"50"},title:{subtextStyle:{width:"auto",overflow:"none"}}}},{query:{minWidth:465,minHeight:343},option:{title:{top:"5",subtextStyle:{width:"auto",overflow:"none"}},series:[{barMinWidth:"20",label:{textStyle:{fontSize:14,lineHeight:14},width:"auto",overflow:"none",formatter(t){const e=a(t.value);return`{name|${t.name}}: ${e}`},rich:{name:{fontSize:11,padding:[2,0,0,0]}}}}]}}]},d={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"100%"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,textStyle:{fontFamily:"Montserrat",fontSize:12},formatter(t){const e=a(t.value.toFixed(1));return`<span style="font-weight: 500;color: #666;">${t.name}:</span><br />${e} `}},series:[{type:"pie",radius:"30%",center:["50%","55%"],startAngle:60,label:{show:!0,textStyle:{fontFamily:"Montserrat",fontSize:9,lineHeight:11,fontWeight:500},formatter(t){const e=a(t.value);return`${t.name}:\n{value|${e}}`},rich:{value:{fontFamily:"Montserrat",fontWeight:600,fontSize:10}}},labelLine:{show:!0,length:3},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},data:[]}],media:[{query:{minWidth:420},option:{series:[{radius:"35%",label:{textStyle:{fontSize:11,lineHeight:13},rich:{value:{fontSize:13}}},labelLine:{length:5}}]}},{query:{minWidth:500},option:{series:[{radius:"40%",label:{textStyle:{fontSize:12,lineHeight:14},rich:{value:{fontSize:14}}},labelLine:{length:10}}]}},{query:{minWidth:950},option:{series:[{radius:"50%"}]}}]},f={grid:{left:"0",right:"1%",bottom:"0",top:"65",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666",width:"300",overflow:"break"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"300",overflow:"break"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"-5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat",fontSize:12,fontWeight:600},formatter:t=>t},xAxis:{data:[],axisTick:{show:!1},boundaryGap:["20%","20%"],gridIndex:0,offset:0,axisLine:{lineStyle:{color:"#ccc"}},axisLabel:{show:!0,interval:"auto",textStyle:{fontFamily:"Montserrat",fontSize:8,color:"#333"}}},yAxis:{type:"value",gridIndex:0,min:0,offset:0,axisLabel:{formatter:a,margin:5,textStyle:{fontSize:8,fontFamily:"Montserrat",fontWeight:400}}},series:[{type:"bar",barWidth:"auto",barMinWidth:3,barMaxWidth:8,color:"#ccc",data:[]}],media:[{query:{minWidth:670},option:{series:[{barMinWidth:5,barMaxWidth:15}]}},{query:{minWidth:950},option:{xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}}}},{query:{minWidth:673,minHeight:343},option:{xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}}}}]},m={color:Object.values(["#F1AB86","#48A9A6","#ffbf69","#4BA3C3","#e56b6f","#284B63","#F96E46","#307473","#F6AE2D","#05668d","#A23E48","#0B3948"]),grid:{left:"0",right:"1%",bottom:"120",top:"65",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:5,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666",width:"280",overflow:"break"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"300",overflow:"break"}},legend:{show:!0,orient:"horizontal",bottom:"50",left:"0",data:[],padding:[0,5],itemWidth:6,itemGap:3,icon:"circle",textStyle:{fontSize:"10",fontFamily:"Montserrat",fontWeight:"400",color:"#666",width:"290",overflow:"truncate"}},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat",fontSize:12,fontWeight:500},renderMode:"html",formatter:t=>t},xAxis:{data:[],axisTick:{show:!1},boundaryGap:["20%","20%"],gridIndex:0,offset:0,axisLine:{lineStyle:{color:"#ccc"}},axisLabel:{show:!0,interval:"auto",textStyle:{fontFamily:"Montserrat",fontSize:8,color:"#333"}}},yAxis:{type:"value",axisLabel:{formatter:a,margin:5,textStyle:{fontSize:8,fontFamily:"Montserrat",fontWeight:400}}},series:[{value:null}],dataZoom:{left:0,right:5,start:95,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#72A0C1"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"#72A0C1"},moveHandleStyle:{color:"#5D8AA8"}}},media:[{query:{minWidth:420},option:{grid:{bottom:"125"},legend:{padding:[0,10],itemWidth:8,textStyle:{fontSize:"11",width:"400"}}}},{query:{minWidth:670},option:{legend:{itemWidth:20,itemHeight:10,textStyle:{fontSize:"12",width:"660"},icon:"roundRect"},dataZoom:{start:75}}},{query:{minWidth:950},option:{grid:{bottom:"100"},xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}},dataZoom:{start:50}}},{query:{minWidth:673,minHeight:343},option:{grid:{bottom:"130"},xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}},dataZoom:{start:50}}}]},h={es_ES:new Map([["energia_media","ENERGIA MEDIA"],["distribucion_energia","DISTRIBUCIÓN ENERGÍA"],["top_energia","TOP ENERGÍA"],["por_grupos","POR GRUPOS"],["evolucion_energia","EVOLUCIÓN ENERGÍA"],["desagregada","DESAGREGADA"],["mensual","MENSUAL"],["diaria","DIARIA"],["anual","ANUAL"],["comparativa_energia","COMPARATIVA ENERGÍA"],["energia","Energía"]]),ca_ES:new Map([["energia_media","MITJANA ENERGIA"],["distribucion_energia","DISTRIBUCIÓ ENERGÍA"],["top_energia","TOP ENERGÍA"],["por_grupos","PER GRUPS"],["evolucion_energia","EVOLUCIÓ ENERGIA"],["desagregada","DESAGREGADA"],["mensual","MENSUAL"],["diaria","DIÀRIA"],["anual","ANUAL"],["comparativa_energia","COMPARATIVA ENERGIA"],["energia","Energia"]])},g="ca_ES";function p(e){const o=function(t){return t.length>0&&t[0].consumo_medio?t[0].consumo_medio:null}(e),n=function(t){return t.length>0&&t[0].consumo_maximo?t[0].consumo_maximo:10}(e),i=r(c),l=(0,t.formatWithPrefix)(o);return i.title.text=`${h[g].get("energia_media")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}`,i.title.subtext="MENSUAL"===Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()?`${h[g].get("diaria")}`:`${h[g].get("mensual")}`,i.series[0].max=(0,t.formatWithPrefix)(n).value,i.series[0].detail.formatter=a,i.series[0].axisLabel.formatter=t=>Math.round(t),i.series[0].data[0].value=l.value,i}function y(e){const o="chartConsumoMedio",n="no_dataConsumoMedio",a=(0,t.resultsetWithFields)(e);if(0===a.length)(0,t.printNoDataChart)(`#${o}`,`#${n}`);else{(0,t.printDataChart)(`#${n}`,`#${o}`);const e=p(a);(0,t.initChart)(o,e)}}function b(e){const o=r(u),n="chartTop",a="no_dataTop";0===e.resultset.length?(0,t.printNoDataChart)(`#${n}`,`#${a}`):(0,t.printDataChart)(`#${a}`,`#${n}`),(0,t.resultsetWithFields)(e).reverse().forEach(t=>{o.yAxis.data.push(t.address),o.series[0].data.push(t.total_energia)}),o.title.text=`${h[g].get("top_energia")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()} | ${function(){const e=Dashboards.getParameterValue("filterParamMesAnio")[0].toUpperCase();return"MENSUAL"===Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()?(0,t.formatShortMonthShortYear)(e):e}()}`,o.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2")[0].toUpperCase()}`,(0,t.initChart)(n,o)}function S(e){const o=["#54bebe","#76c8c8","#98d1d1","#badbdb","#B7D8E1","#A8D0DB","#a7d5ed","#63bff0","#22a7f0","#48b5c4"],n=r(d),a=e.resultset,i="chartDistribucion",l="no_dataDistribucion";0===a.length?(0,t.printNoDataChart)(`#${i}`,`#${l}`):(0,t.printDataChart)(`#${l}`,`#${i}`);const s=a.map(([t,e],n)=>({name:t,value:e,itemStyle:{color:o[n%o.length]}}));n.series[0].data=s,n.title.text=`${h[g].get("distribucion_energia")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}`,n.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()} ${h[g].get("por_grupos")}`,(0,t.initChart)(i,n)}const x="#B9D9EB",A="#ccc";function v(){return Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}function M(){return Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()}function w(e){const[{name:o}]=e;let n=o;6===o.length&&(n=i(o));const r=(0,t.capitalizarTexto)(v()),l=a(e[0].value);return`<span style="font-weight: 500;color: #666;">${h[g].get("energia")} ${r}</span>\n <span style="font-weight: 500;color: #666;">${n}:</span><br />\n <span style="text-align: right;display: block;font-weight: 600;color: #333;">\n ${l}\n </span>\n `}function D(t,e){const o=Object.values(t),n=[...new Set(o.map(t=>t.periodo))],a=r(f),i=function(t,e,o){const n=Dashboards.getParameterValue("filterParamMesAnio")[0].toUpperCase();return t.map(t=>{const a=e.find(e=>e.periodo===t),r=a?a.energia_total:0;let i=o;return t===n&&(i=x),{value:r,itemStyle:{color:i}}})}(n,o,e);return a.series[0].data=i,a.xAxis.data=n,a.tooltip.formatter=w,a.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2")[0].toUpperCase()}`,a}function C(e,o,n){const a=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(a,o,n)){let e=D(a,A);e=function(t){const e=r(t),o=v(),n=M();return e.title.text=`${h[g].get("evolucion_energia")} ${o}`,"MENSUAL"===n&&(e.xAxis.axisLabel.formatter=i),e}(e),(0,t.initChart)(o,e)}}function E(e,o,n){const a=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(a,o,n)){let e=D(a,x);e=function(t){const e=r(t),o=v(),n=M();return e.title.text=`${h[g].get("evolucion_energia")} ${o} ${h[g].get("desagregada")}`,"ANUAL"===n&&(e.xAxis.axisLabel.formatter=i),e.toolbox.top=5,e}(e),(0,t.initChart)(o,e)}}function $(){return Dashboards.getParameterValue("filterParamEnergia_comp")[0].toUpperCase()}function F(t){const[{name:e}]=t;let o=e;6===e.length&&(o=i(e));let n=`<strong>${o}</strong></br>`;return n+=t.map(t=>`<div style="display: inline-flex; justify-content: space-between; gap: 20px; width: 100%">\n <span>${t.marker} ${t.seriesName}</span>\n <span><strong>${a(t.value)}</strong></span>\n </div>`).join("<br />"),n}function L(t){const e=r(m),o=Object.values(t),n=Math.max(...o.map(t=>t.energia_total)),a=[...new Set(o.map(t=>t.periodo))],i={};o.forEach(({cups:t,periodo:e,energia_total:o})=>{i[t]||(i[t]={}),i[t][e]=o});const l=Object.keys(i).map(t=>({name:t,type:"line",smooth:!0,data:a.map(e=>i[t][e]||0)}));return e.xAxis.data=a,e.series=l,e.legend.data=Object.keys(i),e.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1_comp")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2_comp")[0].toUpperCase()}`,e.tooltip.formatter=F,e.yAxis.max=n>0?n:10,e}function z(e){const o="chartLineDesagregatDiari",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatDiari")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("diaria")}`,(0,t.initChart)(o,e)}}function T(e){const o="chartLineDesagregatMensual",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatMensual")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("mensual")}`,(0,t.initChart)(o,e)}}function W(e){const o="chartLineDesagregatAnual",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatAnual")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("anual")}`,(0,t.initChart)(o,e)}}})(),n})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.energia=e():t.energia=e()}(self,()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{MONTHS_YEAR:()=>a,MONTHS_YEAR_SHORT:()=>r,TEXTS_COMMON:()=>i,THRESHOLDS:()=>vt,addPointInteger:()=>b,buildCamarasTrafico:()=>Et,buildTableCalidadAire:()=>At,calculateMaxYAxis:()=>L,calculatePentahoPath:()=>wt,calculateXAxisStart:()=>F,capitalizarTexto:()=>w,checkAllGroupsCollapsed:()=>bt,configureDataBar:()=>H,configureDataGaugeCommon:()=>O,configureDataGaugeMonthCommon:()=>_,configureDataLine:()=>k,configureDataValidate:()=>Vt,configureLinesChartValidates:()=>Gt,convertDateToInteger:()=>y,convertToLanguageSelectorDateRange:()=>ct,convertToTableTreeView:()=>yt,downloadCSVTable:()=>St,downloadPDFTable:()=>xt,formatCellMultiplesLines:()=>ht,formatDayMonthYear:()=>u,formatMilMillionEuros:()=>T,formatMonthAnyo:()=>c,formatName:()=>A,formatNameHeaderColumn:()=>mt,formatRoundTooltip:()=>W,formatShortMonthShortYear:()=>f,formatShortMonthYear:()=>d,formatToMillions:()=>S,formatToTons:()=>x,formatTooltip:()=>$,formatTooltipPie:()=>z,formatTrimestre:()=>m,formatWithPrefix:()=>v,getEnvironment:()=>Mt,getMaxFieldNumberFromData:()=>V,getMonth:()=>n,getMonthList:()=>h,getSelectCommonOptions:()=>nt,getSelectTwoColumnsOptions:()=>at,initBarChart:()=>Tt,initBarChartComparationMonth:()=>kt,initChart:()=>D,initElement:()=>M,initStackedBarChart:()=>Lt,initStackedBarChartMonthSeries:()=>Wt,initTable:()=>ft,initValueDefaultDate:()=>lt,initialCalls:()=>Ct,loadIframeOnClickEvent:()=>Ht,printDataChart:()=>E,printDataInHTMLElements:()=>R,printEchart:()=>P,printNoDataChart:()=>C,resetFilter:()=>ot,resetFilterDate:()=>it,resetFilterDates:()=>rt,resetFilterToDefault:()=>ut,resultsetWithFields:()=>q,selectConfigDatasource:()=>tt,selectConfigDatasourceAllValue:()=>et,selectFilterAll:()=>K,selectFilterNumItemsDefault:()=>dt,selectValueDefaultInFilter:()=>st,separateDayMonthYearToSlash:()=>l,splitDataset:()=>U,subtractOneDay:()=>g,subtractOneMonth:()=>p,traverseRows:()=>pt,updateDomElement:()=>G,updateObject:()=>B,updateStackedBarOptions:()=>zt});const o={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function n(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}const a={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])},r={es_ES:new Map([["1","Ene"],["2","Feb"],["3","Mar"],["4","Abr"],["5","May"],["6","Jun"],["7","Jul"],["8","Ago"],["9","Sep"],["10","Oct"],["11","Nov"],["12","Dic"]]),ca_ES:new Map([["1","Gen"],["2","Feb"],["3","Mar"],["4","Abr"],["5","Mai"],["6","Jun"],["7","Jul"],["8","Ago"],["9","Set"],["10","Oct"],["11","Nov"],["12","Des"]])},i={es_ES:new Map([["last_update","Última actualización"]]),ca_ES:new Map([["last_update","Última actualització"]])};function l(t){return`${t.substring(6,8)}/${t.substring(4,6)}/${t.substring(0,4)}`}function s(t){return[t.substring(0,4),o[t.substring(4,6)]]}function c(t){const[e,o]=s(t);return`${o} ${e}`}function u(t){const[e,n,a]=function(t){return[t.substring(0,4),o[t.substring(4,6)],t.substring(6,8)]}(t);return`${a} ${n} ${e}`}function d(t){const[e,o]=s(t);return`${o.substring(0,3)} ${e}`}function f(t){const[e,o]=s(t);return`${o.substring(0,3)} '${e.substring(2,4)}`}function m(t){const[e,o]=t.split("-");return`${parseFloat(o)/3}T ${e}`}function h(t,e){const o=t[e];return Array.from(o.values()).map(t=>t.slice(0,3))}function g(t){const e=Math.floor(t/1e4),o=new Date(e,t%1e4/100-1,t%100);return o.setDate(o.getDate()-1),`${o.getFullYear()}${(o.getMonth()+1).toString().padStart(2,"0")}${o.getDate().toString().padStart(2,"0")}`}function p(t){let e;const o=new Date(Math.floor(t/100),t%100-1,0);return e=`${o.getFullYear()}${(o.getMonth()+1).toString().padStart(2,"0")}`,e}function y(t){return"string"==typeof t?parseInt(t.replace("-",""),10):t}function b(t,e=2){let o=navigator.language||navigator.userLanguage;o=o.length<=2?`${o}-${o.toUpperCase()}`:o;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===o?t.toLocaleString("de-DE",n):t.toLocaleString(o,n)}function S(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function x(t){return t>=1e3?t/1e3+" Tn":t.toString()}function v(t){let e,o;return t>=1e6?(e=t/1e6,o="G"):t>=1e3?(e=t/1e3,o="M"):(e=t,o="k"),{value:Math.round(100*e)/100,prefix:o}}function A(t,e=29){if(t.length>=e){const o=t.split(" ");let n="",a="";return o.forEach(t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(a+=`${n}\n`,n=t)}),a+=n,a}return t}function w(t){return t.includes("N/D")?t:t.toLowerCase().replace(/(^|\s|[.,;:!?¡¿(){}[\]])([^\s])/gu,(t,e,o)=>e+o[0].toUpperCase())}function M(t,e,o="MainContentLoadedCustom"){let n=document.getElementById(t);return n?Promise.resolve(e(n)):new Promise(a=>{document.body.addEventListener(o,()=>{n=document.getElementById(t),n?a(e(n)):(console.error(`El elemento con ID ${t} aún no está disponible después del evento.`),a(null))})})}function D(t,e){return M(t,t=>{const o=echarts.init(t);o.setOption(e,!0),window.addEventListener("resize",()=>{null!=o&&void 0!==o&&o.resize()});const n=document.getElementById("main-content");return n&&(n.addEventListener("shown.bs.collapse",()=>{o.resize()}),n.addEventListener("hidden.bs.collapse",()=>{o.resize()})),o})}function C(t,e){const o=t?document.querySelector(t):null,n=e?document.querySelector(e):null;o&&(o.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function E(t,e){const o=t?document.querySelector(t):null,n=e?document.querySelector(e):null;o&&(o.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function $(t,e=!1,o=!0,n=""){let a=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach(t=>{const r=e?Math.round(t.data):t.data,i=o?`<div style="font-weight: 400;color: #666;">${l=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${l}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${b(r)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${b(r)} ${n}`:"-"}\n </span>\n </div>`;var l;a+=i}),a}function F(t){return 100*(t-120)/t}function L(t,e){const o=Math.max(...t);return o+(e-o%e)}function z(t,e=!1){const o=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:b(t.value);return`<div> ${o} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function W(t,e){let o=`${t.name} : `;return o+=`<span style="font-weight:500">${b(Math.round(t.value))}</span>`,e&&(o+=`<span> (${t.percent}%)</span>`),t.marker+o}function T(t){const e=1e6,o=Number(t);return o>=0&&o<e?`${b(o)} €`:o>=e?`${b(o/e)} M €`:"-"}function P(t,e,o){return 0===t.length?(C(`#${e}`,`#${o}`),!1):(E(`#${o}`,`#${e}`),!0)}function N(t,e,o=1){const n=Math.max(...t.map(t=>t[e]))*o;return 5e3*Math.ceil(n/5e3)}function O(t,e,o,n=30,a=15,r=30,i=-70,l=70,s=3){const c=N(t,e.data,1.1),u=l,d=o.slice(),f=[];let m=a,h=r,g=i;for(let o=0;o<t.length;o+=1)f.push({value:t[o][e.data],name:A(String(t[o][e.type]).replace(/\[.*?\]/g,"")),color:d.shift(),title:{offsetCenter:[`${String(g)}%`,`${String(m)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(g)}%`,`${String(h)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>b(Math.round(t))}}),g+=u,(o+1)%s===0&&(h+=r,m+=2*a,g=i);return[c,f]}function _(t,e,o,a=0){return[N(e,o.data,1),t=>function(t,e,o){const a=b(Math.round(e)),r=n(t[o][0]),i=t[o][1],l=`\n${r} ${i} : ${a}`,s=`${a}\n${r} ${i}`;return window.innerWidth<=1710?l:s}(e,t,a),[{value:e[a][o.data]}]]}function I(t,e){const{resultset:o}={resultset:t},n=new Set,a=new Set,r=o.map(([t,o,r])=>{const i=e?Math.round(r):r;return n.add(t),a.add(o),{day:o,type:t,value:i}}),i=Array.from(a.values()),l=Array.from(n.values());return l.sort((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0})),[l.map(t=>{const e=r.filter(e=>e.type===t).map(({day:e,value:o})=>[e,t,o]),o=i.map(t=>{const o=e.find(([e])=>e===t);return o?o[2]:null});return{name:t,data:o}}),l,a]}function k(t,e=[],o=!1){const[n,a,r]=I(t,o);return n.forEach(t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())}),[n,r,a]}function H(t,e,o=!1){const[n,a,r]=I(t,o);return n.forEach(t=>{t.type="bar",t.color=e.shift(),t.smooth=!1}),[n,r,a]}function q(t){const{resultset:e,metadata:o}=t,n=[];return e.forEach(t=>{const e={};t.forEach((t,n)=>{e[o[n].colName]=t}),n.push(e)}),n}function B(t,e){const o={...t};return Object.keys(e).forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n&&Array.isArray(e[n])?o[n]=e[n].map((e,o)=>({...Array.isArray(t[n])&&t[n][o]||{},...e})):"object"!=typeof e[n]||null===e[n]||Array.isArray(e[n])?t[n]!==e[n]&&(o[n]=e[n]):o[n]=B(t[n]||{},e[n]))}),o}function R(t,e){const o=()=>{t.forEach(t=>{t.id in e&&Object.entries(e[t.id]).forEach(o=>{const n=o[0],a=o[1];"object"==typeof a?a.className?document.querySelector(a.className).className=t[n]:a.element&&a.format&&(document.querySelector(a.element).textContent=e[t.id][n].format(t[n])):document.querySelector(a).textContent=t[n]})})};try{o()}catch(t){document.body.addEventListener("MainContentLoadedCustom",()=>{o()})}}function V(t,e){const o=q(t),n=[];let a=null;return o.forEach(t=>{const o=t[e];"number"!=typeof o||Number.isNaN(o)||n.push(o)}),n.length>0&&(a=Math.max(...n)),a}function G(t,e){const o=document.querySelector(t);o?o.textContent=e:console.warn(`Elemento ${t} no encontrado en el DOM`)}function U(t,e=!0){const o={Cont:[],Mob:[]};return t.forEach(t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?o.Cont.push([t[3],t[4],t[2]]):o.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?o.Mob.push([t[3],t[4],t[2]]):o.Mob.push([t[3],t[2]]))}),o}const j=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],J=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],Y=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],Z=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],X=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function K(t){const e=t.resultset.map(t=>t[0]);return this.dashboard.fireChange(this.parameter,e),t}function Q(t){for(const e of t)if(Array.isArray(e)){if(!Q(e))return!1}else if("All"!==e)return!1;return!0}function tt(t,e,o,n){return Q(e)?(t.queryDefinition.dataAccessId=o,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function et(t){return t.dashboard.setParameter(t.parameter,["All"]),!0}function ot(t){t.forEach(t=>{Dashboards.fireChange(t,["All"])})}function nt(t="Todos"){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:t,noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function at(t="Todos"){const e=nt(t);return e.input.indexes.id=1,e.input.indexes.label=0,e}function rt(t,e,o,n){const a=Dashboards.getParameterValue(o),r=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[a]),Dashboards.fireChange(e,[r]),!0}function it(t,e){const o=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[o]),!0}function lt(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function st(t,e){const o=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[o])}function ct(t){t.regional.es={monthNames:j,abbreviatedMonthNames:J,dayNames:Y,abbreviatedDayNames:Z,dayNamesMin:X,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function ut(t,e){const o=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,Array.isArray(o)?o:[o]),!0}function dt(t,e,o,n=0){const a=t.resultset.slice(0,o).map(t=>t[n]);return Dashboards.setParameter(e,a),t}function ft(t,e){return M(t,t=>new Tabulator(t,e))}function mt(t,e){let o=t.getValue();return o.length>e&&(o=`${o.substr(0,e)}<br>${o.substr(e)}`),o}function ht(t,e){const o=t.getValue().split(" ");let n="",a="";return o.forEach(t=>{(a+t).length<=e?a+=`${t} `:(n+=`${a}<br>`,a=`${t} `)}),n+=`${a}<br>`,n}function gt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const o=t.getTreeChildren();o.length>0&&o.forEach(t=>{t.getTreeChildren().length>0&&gt(t,e)})}function pt(t,e){t.getRows().forEach(t=>{t.getTreeChildren().length>0&&gt(t,e)})}function yt(t,e,o,n){const a=[];for(const r in t)if(t.hasOwnProperty(r)){const i=t[r],l={[e]:i[0],_children:[]};i.shift(),i.forEach((t,a)=>{const r={[e]:o[a],[n]:t};l._children.push(r)}),a.push(l)}return a}function bt(t){let e=!0;return t.getGroups().forEach(t=>{t._group.visible&&(e=!1)}),e}function St(t,e,o){const n=document.getElementById(o),a=n.cloneNode(!0);n.parentNode.replaceChild(a,n),a.addEventListener("click",()=>{t.download("csv",`${e}.csv`,{delimiter:";"})})}function xt(t,e,o){const n=document.getElementById(o),a=n.cloneNode(!0);n.parentNode.replaceChild(a,n),a.addEventListener("click",()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})})}const vt={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function At(t){const e=[],o={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function n(t,e,n){const a=document.createElement("td");if(a.setAttribute("id",t),null!=e){a.innerHTML=e;const t=function(t,e){let n;return void 0===e?n=6:"ND"===e?n=7:(n=5,t.forEach((t,o)=>{e<=t&&5===n&&(n=o)})),o[n]}(n,e);a.classList.add(t)}return a}return t.forEach(t=>{const o=t;"noData"===o.operationalstatus&&(o.so2value="ND",o.no2value="ND",o.o3value="ND",o.pm10value="ND",o.pm25value="ND");const a=document.createElement("tr"),r=document.createElement("td");r.innerHTML=o.address,a.appendChild(r),a.appendChild(n(`${o.entityid}_so2`,o.so2value,vt.SO2)),a.appendChild(n(`${o.entityid}_no2`,o.no2value,vt.NO2)),a.appendChild(n(`${o.entityid}_o3`,o.o3value,vt.O3)),a.appendChild(n(`${o.entityid}_pm10`,o.pm10value,vt.PM10)),a.appendChild(n(`${o.entityid}_pm25`,o.pm25value,vt.PM25)),e.push(a)}),e}function wt(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function Mt(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function Dt(t,e){document.querySelectorAll(`[${t}]`).forEach(o=>{!function(t,e,o){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,o&&o()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(o.getAttribute(t),o,e)})}function Ct(t){Dt("include-html-cabecera",function(){!function(){const t=Mt();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=Mt();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()}),Dt("include-html-menu"),Dt("include-html-main-container",function(){document.body.dispatchEvent(new Event("MainContentLoadedCustom")),function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])}(),t&&t()}),Dt("include-html-copyright")}function Et(t,e,o,n,a,r){let i=!1,l=!1;const s=document.querySelector(t),c=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(s&&s.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function d(t=!0){const e=document.querySelector(o);t?(s&&(s.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),l=!0):(e.classList.remove("blur"),u(),l=!1)}const f=t=>{new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(l||u(),i||(i=!0,window.setTimeout(d,r)))})}).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(s&&(s.setAttribute("sandbox","allow-scripts"),f(s)),c&&(c.setAttribute("sandbox","allow-scripts"),f(c)),document.querySelector(a).addEventListener("click",()=>{d(!1),window.setTimeout(d,r)})):document.querySelectorAll(n)[0].style.display="none"}const $t={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${S(t)}€`}}]},Ft=(t,e)=>{e.sort((t,e)=>parseInt(t.anyo)-parseInt(e.anyo));const o={};e.forEach(e=>{const n=e[1],a=e[0];a!==t.seriesName||o[n]||(o[n]=0),a===t.seriesName&&(o[n]+=e[2])});let n=`<p>${t.seriesName}</p>`;for(const[e,a]of Object.entries(o))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${b(a)}</span></div>`;return n};function Lt(t,e,o=void 0,n=void 0){const a=null===n?void 0:n,r=new Set(e.map(t=>t[1]));let i;const l={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>Ft(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,o,n,a){const r={},i=a.contentSize[1]/2,l=a.viewSize[1],s=t[1];return s<i?r.top=10:s+i>l?r.bottom=10:r.top=s-i,t[0]<a.viewSize[0]/2?r.left=t[0]+20:r.right=a.viewSize[0]-t[0]+20,r}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>b(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(r),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>b(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};a&&a.itemStyle&&Array.isArray(a.itemStyle.borderColor)&&(i=[...a.itemStyle.borderColor],delete a.itemStyle.borderColor);const o=function(t){return t.reduce((t,e)=>{const o=e[0];return t[o]||(t[o]=[]),t[o].push(e),t},{})}(e),n=Object.keys(o);r.forEach(t=>{n.forEach(e=>{void 0===o[e].find(e=>e[1]===t)&&(o[e].push([o[e][0][0],t,void 0]),o[e].sort())})});const l=[];return Object.keys(o).forEach(e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=o[e].map(t=>t[2]);let n={};n=void 0!==a?B(t,a):t,l.push({...n})}),l})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let s={};s=void 0!==o?B(l,o):l,D(t,s)}function zt(t){let e={};return e=B($t,t),e}function Wt(t,e,o={},a={}){let r={};r=B(o,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach(e=>{t.add(e[1])}),Array.from(t).sort((t,e)=>t-e)}()}});const i={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},l=null===a?i:B(a,i),s=e;s.forEach((t,e)=>{s[e][0]=n(t[0])}),Lt(t,s,r,l)}function Tt(t,e=void 0){const o={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>W(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?B(o,e):o,D(t,n)}const Pt="es_ES",Nt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function Ot(t){return Math.max(...t.map(t=>Number(t[0])))}function _t(t){const e=t.filter(e=>Number(e[0])===Ot(t)),o=Array.from({length:12},()=>0);return e.forEach(([t,e,n])=>{const a=parseInt(e,10)-1;o[a]=n}),o}function It(t){const e=t.filter(e=>Number(e[0])===Ot(t)-1),o=Array.from({length:12},()=>0);return e.forEach(([t,e,n])=>{const a=parseInt(e,10)-1;o[a]=n}),o}function kt(t,e,o=void 0){const n=Ot(e).toString(),a=(Ot(e)-1).toString();Tt(t,B({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[a,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:h(Nt,Pt),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:a,type:"bar",data:It(e)},{name:n,type:"bar",barGap:0,data:_t(e)}]},o))}function Ht(t,e,o){const n=document.querySelector(e),a=document.querySelector(t);let r=!1;a.addEventListener("click",()=>{!1===r&&(r=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",o),n.onload=()=>{r=!1})}),a.disabled=!1}const qt="id",Bt="fecha",Rt="value";function Vt(t,e,o,n,a="es_ES"){const[r,i]=function(t,e,o){const n=[],a=[];return t.forEach(t=>{e.includes(`${t[qt]}`)?n.push(`${t[Bt]}`):o.includes(`${t[qt]}`)&&a.push(`${t[Bt]}`)}),[n.map(t=>[t,0]),a.map(t=>[t,0])]}(t,o,n);let l="es_ES"==a?"Datos sin validar":"Dades sense validar";0===i.length&&(l="");const s={name:"Datos validados",type:"line",data:[...r,i[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let c="",u="";if(0===i.length){const e=t[t.length-1].fecha;c=e,u=e}else c=i[0][0],u=i[i.length-1][0];return[...e,s,{name:"Datos NO validados",type:"line",data:i,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:l,xAxis:c,yAxis:0},{name:"end",xAxis:u,yAxis:Math.max(...t.filter(t=>null!==t[Rt]).map(t=>parseInt(`${t[Rt]}`,10)))}]]}}]}function Gt(t,e,o=void 0){D(t,B({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>$(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},o))}return e})(),t.exports=e()}},e={};function o(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{echartBarEvolucion:()=>C,echartBarEvolucionDesagregada:()=>E,echartGaugeEnergiaMedia:()=>y,echartLineAnual:()=>T,echartLineDiaria:()=>z,echartLineMensual:()=>W,echartPie:()=>S,echartTop10:()=>b,getSelectCommonOptions:()=>t.getSelectCommonOptions,getSelectTwoColumnsOptions:()=>t.getSelectTwoColumnsOptions,indicadorEnergiaTotal:()=>s,initElement:()=>t.initElement,initValueDefaultDates:()=>t.initValueDefaultDates,resetFilter:()=>t.resetFilter,resetFilterDate:()=>t.resetFilterDate,resetFilterToDefault:()=>t.resetFilterToDefault,selectConfigDatasourceAllValue:()=>t.selectConfigDatasourceAllValue,setFechaDatosRecientes:()=>l});var t=o(2725);const e="Wh";function a(o){const{value:n,prefix:a}=(0,t.formatWithPrefix)(o);return`${n.toLocaleString("es-ES")} ${a}${e}`}function r(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.map(r):Object.entries(t).reduce((t,[e,o])=>({...t,[e]:"function"==typeof o?o:r(o)}),{})}function i(t){return`${t.substring(0,4)}/${t.substring(4,6)}`}function l(e,o){const n=(0,t.resultsetWithFields)(e);(0,t.initElement)(o,t=>{t.textContent=n[0].fecha_maxima})}function s(e){const o=(0,t.resultsetWithFields)(e),n=o[0].id,r={[n]:{value:{element:"#consumoTotal",format:a},id:{element:"#tipoEnergia",format:t=>`Total ${t}`}}};(0,t.printDataInHTMLElements)(o,r)}const c={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:"",margin:0,padding:0,top:"0",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"100%"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{show:!0,trigger:"none"},series:[{type:"gauge",center:["50%","75%"],radius:"85%",startAngle:200,endAngle:-20,data:[{value:null}],detail:{width:"50%",borderRadius:0,offsetCenter:[0,0],valueAnimation:!0,color:"#284B63",fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat",fontSize:18,lineHeight:18,formatter:a},progress:{show:!0,width:20,itemStyle:{color:"#B9D9EB"}},axisLine:{lineStyle:{width:20}},axisTick:{distance:-25,splitNumber:5,length:3,lineStyle:{width:1,color:"#ccc"}},splitLine:{distance:-28,length:2,lineStyle:{width:1,color:"#ccc"}},axisLabel:{distance:6,fontSize:10,fontWeight:"400",fontFamily:"Montserrat",color:"#666"},anchor:{show:!1},pointer:{show:!1}}],media:[{query:{maxHeight:150},option:{title:{itemGap:2},series:[{center:["50%","78%"],detail:{fontSize:14,lineHeight:14}}]}},{query:{minWidth:420},option:{series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:40},axisLine:{lineStyle:{width:40}},axisTick:{distance:-45},splitLine:{distance:-50,length:5},axisLabel:{distance:15,fontSize:12}}]}},{query:{minWidth:420,minHeight:360},option:{series:[{detail:{fontSize:32,lineHeight:32}}]}},{query:{minWidth:420,minHeight:345},option:{series:[{detail:{fontSize:40,lineHeight:40}}]}},{query:{minWidth:460,maxHeight:230},option:{series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:30},axisLine:{lineStyle:{width:30}},axisTick:{distance:-35},splitLine:{distance:-40,length:5},axisLabel:{distance:15,fontSize:12}}]}},{query:{minWidth:326,minHeight:214},option:{title:{top:"10"},series:[{center:["50%","75%"],radius:"90%",detail:{fontSize:25,lineHeight:25},progress:{width:30},axisLine:{lineStyle:{width:30}},axisTick:{distance:-35},splitLine:{distance:-40,length:5},axisLabel:{distance:15,fontSize:12}}]}}]},u={grid:{left:"0",right:"0",bottom:"0",top:"60",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"0",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:"15",lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"290",overflow:"break"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,textStyle:{fontFamily:"Montserrat",fontSize:12,color:"#666",textAlight:"right"},formatter(t){const e=a(t.value);return`\n <div style="display: block;width: 260px;white-space: wrap;line-height: 130%; font-weight: 500;color: #666;">${t.name}:</div>\n <div style="text-align: right;display: block;font-weight: 600;color: #333;">\n ${e}\n </div>\n `}},xAxis:{show:!1,axisLabel:{show:!1},type:"value"},yAxis:{show:!1,axisLabel:{show:!1},type:"category",data:[]},series:[{type:"bar",data:[],itemStyle:{color:"#B9D9EB"},yAxisIndex:"0",barMinWidth:"15",barGap:0,label:{show:!0,position:"insideLeft",textStyle:{fontSize:10,lineHeight:11,fontWeight:600,fontFamily:"Montserrat",color:"#333"},width:"280",padding:3,overflow:"break",formatter(t){const e=a(t.value);return`{name|${t.name}}\n${e}`},rich:{name:{fontSize:8,padding:[2,0,2,0]}}}}],media:[{query:{minWidth:310},option:{series:[{label:{width:"310",rich:{name:{fontSize:9}}}}]}},{query:{minWidth:339},option:{series:[{label:{width:"339"}}]}},{query:{minWidth:420},option:{series:[{label:{width:"auto",overflow:"none",formatter(t){const e=a(t.value);return`{name|${t.name}}: ${e}`},rich:{name:{fontSize:11,padding:[2,0,0,0]}}}}]}},{query:{minHeight:320},option:{series:[{barMinWidth:"20",label:{textStyle:{fontSize:14,lineHeight:14}}}]}},{query:{minWidth:695},option:{series:[{label:{textStyle:{fontSize:16,lineHeight:16},rich:{name:{fontSize:13}}}}]}},{query:{minWidth:420,maxHeight:310},option:{grid:{top:"50"},title:{subtextStyle:{width:"auto",overflow:"none"}}}},{query:{minWidth:465,minHeight:343},option:{title:{top:"5",subtextStyle:{width:"auto",overflow:"none"}},series:[{barMinWidth:"20",label:{textStyle:{fontSize:14,lineHeight:14},width:"auto",overflow:"none",formatter(t){const e=a(t.value);return`{name|${t.name}}: ${e}`},rich:{name:{fontSize:11,padding:[2,0,0,0]}}}}]}}]},d={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"100%"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,textStyle:{fontFamily:"Montserrat",fontSize:12},formatter(t){const e=a(t.value.toFixed(1));return`<span style="font-weight: 500;color: #666;">${t.name}:</span><br />${e} `}},series:[{type:"pie",radius:"30%",center:["50%","40%"],startAngle:60,label:{show:!0,textStyle:{fontFamily:"Montserrat",fontSize:9,lineHeight:11,fontWeight:500},formatter(t){const e=a(t.value);return`${t.name}:\n${e}`}},labelLine:{show:!0,length:3},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},data:[]}],media:[{query:{maxWidth:430},option:{series:[{center:["50%","60%"],label:{width:"150",overflow:"break"}}]}},{query:{maxWidth:400},option:{series:[{label:{width:"108",overflow:"break"}}]}},{query:{maxWidth:300},option:{series:[{center:["50%","65%"],label:{width:"100",overflow:"break"},labelLine:{length:5,length2:10}}]}},{query:{minWidth:431},option:{series:[{radius:"35%",center:["50%","55%"],label:{textStyle:{fontSize:11,lineHeight:13},formatter(t){const e=a(t.value);return`${t.name}:\n{value|${e}}`},rich:{value:{fontFamily:"Montserrat",fontWeight:600,fontSize:13}}},labelLine:{length:5}}]}},{query:{minWidth:500},option:{series:[{radius:"40%",label:{textStyle:{fontSize:12,lineHeight:14},rich:{value:{fontSize:14}}},labelLine:{length:10}}]}},{query:{minWidth:500},option:{series:[{radius:"45%",center:["50%","60%"],labelLine:{length:15}}]}},{query:{minWidth:690},option:{series:[{radius:"60%",center:["50%","58%"],label:{textStyle:{fontSize:12,lineHeight:14},rich:{value:{fontSize:14}}}}]}},{query:{minWidth:950},option:{series:[{radius:"70%",labelLine:{length2:70}}]}}]},f={grid:{left:"0",right:"1%",bottom:"0",top:"65",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:3,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666",width:"300",overflow:"break"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"300",overflow:"break"}},legend:{show:!1},toolbox:{show:!0,right:"0",top:"-5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{confine:!0,trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat",fontSize:12,fontWeight:600},formatter:t=>t},xAxis:{data:[],axisTick:{show:!1},boundaryGap:["20%","20%"],gridIndex:0,offset:0,axisLine:{lineStyle:{color:"#ccc"}},axisLabel:{show:!0,interval:"auto",textStyle:{fontFamily:"Montserrat",fontSize:8,color:"#333"}}},yAxis:{type:"value",gridIndex:0,min:0,offset:0,axisLabel:{formatter:a,margin:5,textStyle:{fontSize:8,fontFamily:"Montserrat",fontWeight:400}}},series:[{type:"bar",barWidth:"auto",barMinWidth:3,barMaxWidth:8,color:"#ccc",data:[]}],media:[{query:{minWidth:670},option:{series:[{barMinWidth:5,barMaxWidth:15}]}},{query:{minWidth:950},option:{xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}}}},{query:{minWidth:673,minHeight:343},option:{xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}}}}]},m={color:Object.values(["#F1AB86","#48A9A6","#ffbf69","#4BA3C3","#e56b6f","#284B63","#F96E46","#307473","#F6AE2D","#05668d","#A23E48","#0B3948"]),grid:{left:"0",right:"1%",bottom:"120",top:"65",containLabel:!0},title:{text:"",margin:"0",padding:0,top:"5",left:"50%",textAlign:"center",itemGap:5,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666",width:"280",overflow:"break"},subtext:"",subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:400,color:"#666",width:"300",overflow:"break"}},legend:{show:!0,orient:"horizontal",bottom:"50",left:"0",data:[],padding:[0,5],itemWidth:6,itemGap:3,icon:"circle",textStyle:{fontSize:"10",fontFamily:"Montserrat",fontWeight:"400",color:"#666",width:"290",overflow:"truncate"}},toolbox:{show:!0,right:"0",top:"5",feature:{saveAsImage:{title:"Descarregar"}},emphasis:{iconStyle:{borderColor:"#ffcd00"}},showTitle:!1,tooltip:{show:!0,padding:[5,8],position:"left",formatter:t=>`<div>${t.title}</div>`,backgroundColor:"#fff",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:600},extraCssText:"box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);border-radius: 0;"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat",fontSize:12,fontWeight:500},renderMode:"html",formatter:t=>t},xAxis:{data:[],axisTick:{show:!1},boundaryGap:["20%","20%"],gridIndex:0,offset:0,axisLine:{lineStyle:{color:"#ccc"}},axisLabel:{show:!0,interval:"auto",textStyle:{fontFamily:"Montserrat",fontSize:8,color:"#333"}}},yAxis:{type:"value",axisLabel:{formatter:a,margin:5,textStyle:{fontSize:8,fontFamily:"Montserrat",fontWeight:400}}},series:[{value:null}],dataZoom:{left:0,right:5,start:95,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#72A0C1"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"#72A0C1"},moveHandleStyle:{color:"#5D8AA8"}}},media:[{query:{minWidth:420},option:{grid:{bottom:"125"},legend:{padding:[0,10],itemWidth:8,textStyle:{fontSize:"11",width:"400"}}}},{query:{minWidth:670},option:{legend:{itemWidth:20,itemHeight:10,textStyle:{fontSize:"12",width:"660"},icon:"roundRect"},dataZoom:{start:75}}},{query:{minWidth:950},option:{grid:{bottom:"100"},xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}},dataZoom:{start:50}}},{query:{minWidth:673,minHeight:343},option:{grid:{bottom:"130"},xAxis:{axisLabel:{textStyle:{fontSize:10}}},yAxis:{axisLabel:{textStyle:{fontSize:10}}},dataZoom:{start:50}}}]},h={es_ES:new Map([["energia_media","ENERGIA MEDIA"],["distribucion_energia","DISTRIBUCIÓN ENERGÍA"],["top_energia","TOP ENERGÍA"],["por_grupos","POR GRUPOS"],["evolucion_energia","EVOLUCIÓN ENERGÍA"],["desagregada","DESAGREGADA"],["mensual","MENSUAL"],["diaria","DIARIA"],["anual","ANUAL"],["comparativa_energia","COMPARATIVA ENERGÍA"],["energia","Energía"]]),ca_ES:new Map([["energia_media","MITJANA ENERGIA"],["distribucion_energia","DISTRIBUCIÓ ENERGÍA"],["top_energia","TOP ENERGÍA"],["por_grupos","PER GRUPS"],["evolucion_energia","EVOLUCIÓ ENERGIA"],["desagregada","DESAGREGADA"],["mensual","MENSUAL"],["diaria","DIÀRIA"],["anual","ANUAL"],["comparativa_energia","COMPARATIVA ENERGIA"],["energia","Energia"]])},g="ca_ES";function p(e){const o=function(t){return t.length>0&&t[0].consumo_medio?t[0].consumo_medio:null}(e),n=function(t){return t.length>0&&t[0].consumo_maximo?t[0].consumo_maximo:10}(e),i=r(c),l=(0,t.formatWithPrefix)(o);return i.title.text=`${h[g].get("energia_media")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}`,i.title.subtext="MENSUAL"===Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()?`${h[g].get("diaria")}`:`${h[g].get("mensual")}`,i.series[0].max=(0,t.formatWithPrefix)(n).value,i.series[0].detail.formatter=a,i.series[0].axisLabel.formatter=t=>Math.round(t),i.series[0].data[0].value=l.value,i}function y(e){const o="chartConsumoMedio",n="no_dataConsumoMedio",a=(0,t.resultsetWithFields)(e);if(0===a.length)(0,t.printNoDataChart)(`#${o}`,`#${n}`);else{(0,t.printDataChart)(`#${n}`,`#${o}`);const e=p(a);(0,t.initChart)(o,e)}}function b(e){const o=r(u),n="chartTop",a="no_dataTop";0===e.resultset.length?(0,t.printNoDataChart)(`#${n}`,`#${a}`):(0,t.printDataChart)(`#${a}`,`#${n}`),(0,t.resultsetWithFields)(e).reverse().forEach(t=>{o.yAxis.data.push(t.address),o.series[0].data.push(t.total_energia)}),o.title.text=`${h[g].get("top_energia")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()} | ${function(){const e=Dashboards.getParameterValue("filterParamMesAnio")[0].toUpperCase();return"MENSUAL"===Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()?(0,t.formatShortMonthShortYear)(e):e}()}`,o.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2")[0].toUpperCase()}`,(0,t.initChart)(n,o)}function S(e){const o=["#54bebe","#76c8c8","#98d1d1","#badbdb","#B7D8E1","#A8D0DB","#a7d5ed","#63bff0","#22a7f0","#48b5c4"],n=r(d),a=e.resultset,i="chartDistribucion",l="no_dataDistribucion";0===a.length?(0,t.printNoDataChart)(`#${i}`,`#${l}`):(0,t.printDataChart)(`#${l}`,`#${i}`);const s=a.map(([t,e],n)=>({name:t,value:e,itemStyle:{color:o[n%o.length]}}));n.series[0].data=s,n.title.text=`${h[g].get("distribucion_energia")} ${Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}`,n.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()} ${h[g].get("por_grupos")}`,(0,t.initChart)(i,n)}const x="#B9D9EB",v="#ccc";function A(){return Dashboards.getParameterValue("filterParamEnergia")[0].toUpperCase()}function w(){return Dashboards.getParameterValue("filterParamPeriodo")[0].toUpperCase()}function M(e){const[{name:o}]=e;let n=o;6===o.length&&(n=i(o));const r=(0,t.capitalizarTexto)(A()),l=a(e[0].value);return`<span style="font-weight: 500;color: #666;">${h[g].get("energia")} ${r}</span>\n <span style="font-weight: 500;color: #666;">${n}:</span><br />\n <span style="text-align: right;display: block;font-weight: 600;color: #333;">\n ${l}\n </span>\n `}function D(t,e){const o=Object.values(t),n=[...new Set(o.map(t=>t.periodo))],a=r(f),i=function(t,e,o){const n=Dashboards.getParameterValue("filterParamMesAnio")[0].toUpperCase();return t.map(t=>{const a=e.find(e=>e.periodo===t),r=a?a.energia_total:0;let i=o;return t===n&&(i=x),{value:r,itemStyle:{color:i}}})}(n,o,e);return a.series[0].data=i,a.xAxis.data=n,a.tooltip.formatter=M,a.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2")[0].toUpperCase()}`,a}function C(e,o,n){const a=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(a,o,n)){let e=D(a,v);e=function(t){const e=r(t),o=A(),n=w();return e.title.text=`${h[g].get("evolucion_energia")} ${o}`,"MENSUAL"===n&&(e.xAxis.axisLabel.formatter=i),e}(e),(0,t.initChart)(o,e)}}function E(e,o,n){const a=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(a,o,n)){let e=D(a,x);e=function(t){const e=r(t),o=A(),n=w();return e.title.text=`${h[g].get("evolucion_energia")} ${o} ${h[g].get("desagregada")}`,"ANUAL"===n&&(e.xAxis.axisLabel.formatter=i),e.toolbox.top=5,e}(e),(0,t.initChart)(o,e)}}function $(){return Dashboards.getParameterValue("filterParamEnergia_comp")[0].toUpperCase()}function F(t){const[{name:e}]=t;let o=e;6===e.length&&(o=i(e));let n=`<strong>${o}</strong></br>`;return n+=t.map(t=>`<div style="display: inline-flex; justify-content: space-between; gap: 20px; width: 100%">\n <span>${t.marker} ${t.seriesName}</span>\n <span><strong>${a(t.value)}</strong></span>\n </div>`).join("<br />"),n}function L(t){const e=r(m),o=Object.values(t),n=Math.max(...o.map(t=>t.energia_total)),a=[...new Set(o.map(t=>t.periodo))],i={};o.forEach(({cups:t,periodo:e,energia_total:o})=>{i[t]||(i[t]={}),i[t][e]=o});const l=Object.keys(i).map(t=>({name:t,type:"line",smooth:!0,data:a.map(e=>i[t][e]||0)}));return e.xAxis.data=a,e.series=l,e.legend.data=Object.keys(i),e.title.subtext=`${Dashboards.getParameterValue("filterParamCategoria1_comp")[0].toUpperCase()}: ${Dashboards.getParameterValue("filterParamCategoria2_comp")[0].toUpperCase()}`,e.tooltip.formatter=F,e.yAxis.max=n>0?n:10,e}function z(e){const o="chartLineDesagregatDiari",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatDiari")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("diaria")}`,(0,t.initChart)(o,e)}}function W(e){const o="chartLineDesagregatMensual",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatMensual")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("mensual")}`,(0,t.initChart)(o,e)}}function T(e){const o="chartLineDesagregatAnual",n=(0,t.resultsetWithFields)(e);if((0,t.printEchart)(n,o,"no_dataLineDesagregatAnual")){const e=L(n);e.title.text=`${h[g].get("comparativa_energia")} ${$()} ${h[g].get("anual")}`,e.dataZoom.start=50,(0,t.initChart)(o,e)}}})(),n})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vlci/cdmciutat",
3
- "version": "36.0.0",
3
+ "version": "37.0.0",
4
4
  "description": "JavaScript library for cdmciutat",
5
5
  "main": "index.js",
6
6
  "scripts": {