@vlci/cdmciutat 28.0.0 → 29.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.
- package/dist/js/legacy.js +1 -1
- package/package.json +1 -1
package/dist/js/legacy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see legacy.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.legacy=e():t.legacy=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[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,{addPointInteger:()=>h,buildCamarasTrafico:()=>ht,buildTableCalidadAire:()=>it,calculateMaxYAxis:()=>b,calculatePentahoPath:()=>st,calculateXAxisStart:()=>A,checkAllGroupsCollapsed:()=>nt,configureDataBar:()=>L,configureDataGaugeCommon:()=>v,configureDataGaugeMonthCommon:()=>T,configureDataLine:()=>D,configureDataValidate:()=>Dt,configureLinesChartValidates:()=>Lt,convertToLanguageSelectorDateRange:()=>K,convertToTableTreeView:()=>rt,downloadCSVTable:()=>ot,downloadPDFTable:()=>at,formatCellMultiplesLines:()=>Q,formatDayMonthYear:()=>i,formatMilMillionEuros:()=>M,formatMonthAnyo:()=>a,formatName:()=>d,formatNameHeaderColumn:()=>X,formatRoundTooltip:()=>I,formatShortMonthShortYear:()=>c,formatShortMonthYear:()=>s,formatToMillions:()=>f,formatToTons:()=>p,formatTooltip:()=>S,formatTooltipPie:()=>E,formatTrimestre:()=>l,getEnvironment:()=>ct,getMaxFieldNumberFromData:()=>O,getMonth:()=>n,getMonthList:()=>u,getSelectCommonOptions:()=>j,getSelectTwoColumnsOptions:()=>W,initBarChart:()=>yt,initBarChartComparationMonth:()=>Mt,initChart:()=>g,initStackedBarChart:()=>dt,initStackedBarChartMonthSeries:()=>mt,initTable:()=>q,initValueDefaultDate:()=>J,initialCalls:()=>ut,loadIframeOnClickEvent:()=>wt,printDataChart:()=>y,printDataInHTMLElements:()=>U,printNoDataChart:()=>m,resetFilter:()=>z,resetFilterDate:()=>Z,resetFilterDates:()=>Y,resultsetWithFields:()=>_,selectConfigDatasource:()=>V,selectFilterAll:()=>F,selectValueDefaultInFilter:()=>H,splitDataset:()=>x,traverseRows:()=>et,updateObject:()=>N,updateStackedBarOptions:()=>gt});const r={"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)]}function o(t){return[t.substring(0,4),r[t.substring(4,6)]]}function a(t){const[e,r]=o(t);return`${r} ${e}`}function i(t){const[e,n,o]=function(t){return[t.substring(0,4),r[t.substring(4,6)],t.substring(6,8)]}(t);return`${o} ${n} ${e}`}function s(t){const[e,r]=o(t);return`${r.substring(0,3)} ${e}`}function c(t){const[e,r]=o(t);return`${r.substring(0,3)} '${e.substring(2,4)}`}function l(t){const[e,r]=t.split("-");return`${parseFloat(r)/3}T ${e}`}function u(t,e){const r=t[e];return Array.from(r.values()).map((t=>t.slice(0,3)))}function h(t,e=2){let r=navigator.language||navigator.userLanguage;r=r.length<=2?`${r}-${r.toUpperCase()}`:r;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===r?t.toLocaleString("de-DE",n):t.toLocaleString(r,n)}function f(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function p(t){return t>=1e3?t/1e3+" Tn":t.toString()}function d(t,e=29){if(t.length>=e){const r=t.split(" ");let n="",o="";return r.forEach((t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(o+=`${n}\n`,n=t)})),o+=n,o}return t}function g(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);n.setOption(e,!0),window.addEventListener("resize",(()=>{null!=n&&void 0!==n&&n.resize()}));const o=document.getElementById("main-content");return o&&(o.addEventListener("shown.bs.collapse",(()=>{n.resize()})),o.addEventListener("hidden.bs.collapse",(()=>{n.resize()}))),n}function m(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function y(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function S(t,e=!1,r=!0,n=""){let o=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const a=e?Math.round(t.data):t.data,i=r?`<div style="font-weight: 400;color: #666;">${s=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${s}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${h(a)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${h(a)} ${n}`:"-"}\n </span>\n </div>`;var s;o+=i})),o}function A(t){return 100*(t-120)/t}function b(t,e){const r=Math.max(...t);return r+(e-r%e)}function E(t,e=!1){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:h(t.value);return`<div> ${r} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function I(t,e){let r=`${t.name} : `;return r+=`<span style="font-weight:500">${h(Math.round(t.value))}</span>`,e&&(r+=`<span> (${t.percent}%)</span>`),t.marker+r}function M(t){const e=1e6,r=Number(t);return r>=0&&r<e?`${h(r)} €`:r>=e?`${h(r/e)} M €`:"-"}function w(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function v(t,e,r,n=30,o=15,a=30,i=-70,s=70,c=3){const l=w(t,e.data,1.1),u=s,f=r.slice(),p=[];let g=o,m=a,y=i;for(let r=0;r<t.length;r+=1)p.push({value:t[r][e.data],name:d(String(t[r][e.type]).replace(/\[.*?\]/g,"")),color:f.shift(),title:{offsetCenter:[`${String(y)}%`,`${String(g)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(y)}%`,`${String(m)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>h(Math.round(t))}}),y+=u,(r+1)%c==0&&(m+=a,g+=2*o,y=i);return[l,p]}function T(t,e,r,o=0){return[w(e,r.data,1),t=>function(t,e,r){const o=h(Math.round(e)),a=n(t[r][0]),i=t[r][1],s=`\n${a} ${i} : ${o}`,c=`${o}\n${a} ${i}`;return window.innerWidth<=1710?s:c}(e,t,o),[{value:e[o][r.data]}]]}function C(t,e){const{resultset:r}={resultset:t},n=new Set,o=new Set,a=r.map((([t,r,a])=>{const i=e?Math.round(a):a;return n.add(t),o.add(r),{day:r,type:t,value:i}})),i=Array.from(o.values()),s=Array.from(n.values());return s.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[s.map((t=>{const e=a.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=i.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,data:r}})),s,o]}function D(t,e=[],r=!1){const[n,o,a]=C(t,r);return n.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[n,a,o]}function L(t,e,r=!1){const[n,o,a]=C(t,r);return n.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[n,a,o]}function _(t){const{resultset:e,metadata:r}=t,n=[];return e.forEach((t=>{const e={};t.forEach(((t,n)=>{e[r[n].colName]=t})),n.push(e)})),n}function N(t,e){const r=t;return Object.keys(e).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n?r[n]=e[n].map(((e,r)=>({...t[n][r],...e}))):"object"!=typeof e[n]||Array.isArray(e[n])?r[n]=e[n]:r[n]=N(t[n]||{},e[n]))})),t}function U(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((r=>{const n=r[0],o=r[1];"object"==typeof o?o.className?document.querySelector(o.className).className=t[n]:o.element&&o.format&&(document.querySelector(o.element).textContent=e[t.id][n].format(t[n])):document.querySelector(o).textContent=t[n]}))}))}function O(t,e){const r=_(t),n=[];let o=null;return r.forEach((t=>{const r=t[e];"number"!=typeof r||Number.isNaN(r)||n.push(r)})),n.length>0&&(o=Math.max(...n)),o}function x(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const P=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],R=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],k=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],B=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],$=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function F(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function G(t){for(const e of t)if(Array.isArray(e)){if(!G(e))return!1}else if("All"!==e)return!1;return!0}function V(t,e,r,n){return G(e)?(t.queryDefinition.dataAccessId=r,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function z(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function j(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function W(){const t={input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}};return t.input.indexes.id=1,t.input.indexes.label=0,t}function Y(t,e,r,n){const o=Dashboards.getParameterValue(r),a=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[o]),Dashboards.fireChange(e,[a]),!0}function Z(t,e){const r=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[r]),!0}function J(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function H(t,e){const r=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[r])}function K(t){t.regional.es={monthNames:P,abbreviatedMonthNames:R,dayNames:k,abbreviatedDayNames:B,dayNamesMin:$,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function q(t,e){const r=document.getElementById(t);return r?new Tabulator(r,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function X(t,e){let r=t.getValue();return r.length>e&&(r=`${r.substr(0,e)}<br>${r.substr(e)}`),r}function Q(t,e){const r=t.getValue().split(" ");let n="",o="";return r.forEach((t=>{(o+t).length<=e?o+=`${t} `:(n+=`${o}<br>`,o=`${t} `)})),n+=`${o}<br>`,n}function tt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const r=t.getTreeChildren();r.length>0&&r.forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function et(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function rt(t,e,r,n){const o=[];for(const a in t)if(t.hasOwnProperty(a)){const i=t[a],s={[e]:i[0],_children:[]};i.shift(),i.forEach(((t,o)=>{const a={[e]:r[o],[n]:t};s._children.push(a)})),o.push(s)}return o}function nt(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function ot(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function at(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}function it(t){const e=[],r=[100,200,350,500,750,751],n=[40,90,120,230,340,341],o=[50,100,130,240,380,381],a=[20,40,50,100,150,151],i=[10,20,25,50,75,76],s={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function c(t,e,r){const n=document.createElement("td");if(n.setAttribute("id",t),null!=e){n.innerHTML=e;const t=function(t,e){let r;return void 0===e?r=6:"ND"===e?r=7:(r=5,t.forEach(((t,n)=>{e<=t&&5===r&&(r=n)}))),s[r]}(r,e);n.classList.add(t)}return n}return t.forEach((t=>{const s=t;"noData"===s.operationalstatus&&(s.so2value="ND",s.no2value="ND",s.o3value="ND",s.pm10value="ND",s.pm25value="ND"),"A09_CABANYAL_60m"===s.entityid&&(s.pm10value=void 0,s.pm25value=void 0);const l=document.createElement("tr"),u=document.createElement("td");u.innerHTML=s.address,l.appendChild(u),l.appendChild(c(`${s.entityid}_so2`,s.so2value,r)),l.appendChild(c(`${s.entityid}_no2`,s.no2value,n)),l.appendChild(c(`${s.entityid}_o3`,s.o3value,o)),l.appendChild(c(`${s.entityid}_pm10`,s.pm10value,a)),l.appendChild(c(`${s.entityid}_pm25`,s.pm25value,i)),e.push(l)})),e}function st(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 ct(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function lt(t,e){document.querySelectorAll(`[${t}]`).forEach((r=>{!function(t,e,r){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,r&&r()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(r.getAttribute(t),r,e)}))}function ut(t){lt("include-html-cabecera",(function(){!function(){const t=ct();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=ct();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),lt("include-html-menu"),lt("include-html-main-container",(function(){(function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])})(),t&&t()})),lt("include-html-copyright")}function ht(t,e,r,n,o,a){let i=!1,s=!1;const c=document.querySelector(t),l=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function h(t=!0){const e=document.querySelector(r);t?(c&&(c.src="about:blank"),l&&(l.src="about:blank"),e.classList.add("blur"),s=!0):(e.classList.remove("blur"),u(),s=!1)}const f=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(s||u(),i||(i=!0,window.setTimeout(h,a)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(c&&(c.setAttribute("sandbox","allow-scripts"),f(c)),l&&(l.setAttribute("sandbox","allow-scripts"),f(l)),document.querySelector(o).addEventListener("click",(()=>{h(!1),window.setTimeout(h,a)}))):document.querySelectorAll(n)[0].style.display="none"}const ft={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=>`${f(t)}€`}}]},pt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const r={};e.forEach((e=>{const n=e[1],o=e[0];o!==t.seriesName||r[n]||(r[n]=0),o===t.seriesName&&(r[n]+=e[2])}));let n=`<p>${t.seriesName}</p>`;for(const[e,o]of Object.entries(r))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${h(o)}</span></div>`;return n};function dt(t,e,r=void 0,n=void 0){const o=null===n?void 0:n,a=new Set(e.map((t=>t[1])));let i;const s={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=>pt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,r,n,o){const a={},i=o.contentSize[1]/2,s=o.viewSize[1],c=t[1];return c<i?a.top=10:c+i>s?a.bottom=10:a.top=c-i,t[0]<o.viewSize[0]/2?a.left=t[0]+20:a.right=o.viewSize[0]-t[0]+20,a}},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=>h(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(a),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>h(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};o&&o.itemStyle&&Array.isArray(o.itemStyle.borderColor)&&(i=[...o.itemStyle.borderColor],delete o.itemStyle.borderColor);const r=function(t){return t.reduce(((t,e)=>{const r=e[0];return t[r]||(t[r]=[]),t[r].push(e),t}),{})}(e),n=Object.keys(r);a.forEach((t=>{n.forEach((e=>{void 0===r[e].find((e=>e[1]===t))&&(r[e].push([r[e][0][0],t,void 0]),r[e].sort())}))}));const s=[];return Object.keys(r).forEach((e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=r[e].map((t=>t[2]));let n={};n=void 0!==o?N(t,o):t,s.push({...n})})),s})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let c={};c=void 0!==r?N(s,r):s,g(t,c)}function gt(t){let e={};return e=N(t,ft),e}function mt(t,e,r={},o={}){let a={};a=N(r,{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"]}},s=null===o?i:N(o,i),c=e;c.forEach(((t,e)=>{c[e][0]=n(t[0])})),dt(t,c,a,s)}function yt(t,e=void 0){const r={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=>I(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?N(r,e):r,g(t,n)}const St="es_ES",At={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 bt(t){return Math.max(...t.map((t=>Number(t[0]))))}function Et(t){const e=t.filter((e=>Number(e[0])===bt(t))),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function It(t){const e=t.filter((e=>Number(e[0])===bt(t)-1)),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function Mt(t,e,r=void 0){const n=bt(e).toString(),o=(bt(e)-1).toString();yt(t,N({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[o,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:u(At,St),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:o,type:"bar",data:It(e)},{name:n,type:"bar",barGap:0,data:Et(e)}]},r))}function wt(t,e,r){const n=document.querySelector(e),o=document.querySelector(t);let a=!1;o.addEventListener("click",(()=>{!1===a&&(a=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",r),n.onload=()=>{a=!1})})),o.disabled=!1}const vt="id",Tt="fecha",Ct="value";function Dt(t,e,r,n){const[o,a]=function(t,e,r){const n=[],o=[];return t.forEach((t=>{e.includes(`${t[vt]}`)?n.push(`${t[Tt]}`):r.includes(`${t[vt]}`)&&o.push(`${t[Tt]}`)})),[n.map((t=>[t,0])),o.map((t=>[t,0]))]}(t,r,n);let i="Datos sin validar";0===a.length&&(i="");const s={name:"Datos validados",type:"line",data:[...o,a[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let c="",l="";if(0===a.length){const e=t[t.length-1].fecha;c=e,l=e}else c=a[0][0],l=a[a.length-1][0];return[...e,s,{name:"Datos NO validados",type:"line",data:a,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:i,xAxis:c,yAxis:0},{name:"end",xAxis:l,yAxis:Math.max(...t.filter((t=>null!==t[Ct])).map((t=>parseInt(`${t[Ct]}`,10))))}]]}}]}function Lt(t,e,r=void 0){g(t,N({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=>S(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},r))}return e})(),t.exports=e()},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=s(t),i=a[0],c=a[1],l=new o(function(t,e,r){return 3*(e+r)/4-r}(0,i,c)),u=0,h=c>0?i-4:i;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,a=[],i=16383,s=0,l=n-o;s<l;s+=i)a.push(c(t,s,s+i>l?l:s+i));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)r[i]=a[i],n[a.charCodeAt(i)]=i;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,a,i=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(r[(a=o)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";const n=r(7526),o=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function s(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=s(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(H(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(H(t,ArrayBuffer)||t&&H(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(H(t,SharedArrayBuffer)||t&&H(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const o=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?s(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function g(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||H(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(o)return n?-1:Y(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function S(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:A(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):A(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,o){let a,i=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,s/=2,c/=2,r/=2}function l(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o){let n=-1;for(a=r;a<s;a++)if(l(t,a)===l(e,-1===n?0:a-n)){if(-1===n&&(n=a),a-n+1===c)return n*i}else-1!==n&&(a-=a-n),n=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;n<c;n++)if(l(t,a+n)!==l(e,n)){r=!1;break}if(r)return a}return-1}function b(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const a=e.length;let i;for(n>a/2&&(n=a/2),i=0;i<n;++i){const n=parseInt(e.substr(2*i,2),16);if(K(n))return i;t[r+i]=n}return i}function E(t,e,r,n){return J(Y(e,t.length-r),t,r,n)}function I(t,e,r,n){return J(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function M(t,e,r,n){return J(Z(e),t,r,n)}function w(t,e,r,n){return J(function(t,e){let r,n,o;const a=[];for(let i=0;i<t.length&&!((e-=2)<0);++i)r=t.charCodeAt(i),n=r>>8,o=r%256,a.push(o),a.push(n);return a}(e,t.length-r),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let a=null,i=e>239?4:e>223?3:e>191?2:1;if(o+i<=r){let r,n,s,c;switch(i){case 1:e<128&&(a=e);break;case 2:r=t[o+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(a=c));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=t[o+1],n=t[o+2],s=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,i=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=i}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=C));return r}(n)}e.kMaxLength=i,c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},c.allocUnsafe=function(t){return h(t)},c.allocUnsafeSlow=function(t){return h(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(H(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),H(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,a=Math.min(r,n);o<a;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(H(e,Uint8Array))o+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,o){if(H(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(e>>>=0);const s=Math.min(a,i),l=this.slice(n,o),u=t.slice(e,r);for(let t=0;t<s;++t)if(l[t]!==u[t]){a=l[t],i=u[t];break}return a<i?-1:i<a?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return S(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return S(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return I(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function D(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function L(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function _(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=q[t[n]];return o}function N(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function U(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,o,a){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function x(t,e,r,n,o){V(e,n,o,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,r}function P(t,e,r,n,o){V(e,n,o,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=i,i>>=8,t[r+2]=i,i>>=8,t[r+1]=i,i>>=8,t[r]=i,r+8}function R(t,e,r,n,o,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,a){return e=+e,r>>>=0,a||R(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,a){return e=+e,r>>>=0,a||R(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],o=1,a=0;for(;++a<e&&(o*=256);)n+=this[t+a]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=this[t],o=1,a=0;for(;++a<e&&(o*=256);)n+=this[t+a]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);let n=e,o=1,a=this[t+--n];for(;n>0&&(o*=256);)a+=this[t+--n]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a},c.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),c.prototype.readBigInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=X((function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,t,e,r,n-1,-n)}let o=0,a=1,i=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===i&&0!==this[e+o-1]&&(i=1),this[e+o]=(t/a|0)-i&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,t,e,r,n-1,-n)}let o=r-1,a=1,i=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===i&&0!==this[e+o+1]&&(i=1),this[e+o]=(t/a|0)-i&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=X((function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const a=c.isBuffer(t)?t:c.from(t,n),i=a.length;if(0===i)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%i]}return this};const $={};function F(t,e,r){$[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function V(t,e,r,n,o,a){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=a>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||j(e,t.length-(r+1))}(n,o,a)}function z(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function j(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let r;e=e||1/0;const n=t.length;let o=null;const a=[];for(let i=0;i<n;++i){if(r=t.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Z(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function J(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function H(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const q=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8075:(t,e,r)=>{"use strict";var n=r(453),o=r(487),a=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&a(t,".prototype.")>-1?o(r):r}},487:(t,e,r)=>{"use strict";var n=r(6743),o=r(453),a=r(6897),i=r(9675),s=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||n.call(c,s),u=r(655),h=o("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new i("a function is required");var e=l(n,c,arguments);return a(e,1+h(0,t.length-(arguments.length-1)),!0)};var f=function(){return l(n,s,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),a=r(9675),i=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!i&&i(t,e);if(n)n(t,e,{configurable:null===l&&h?h.configurable:!l,enumerable:null===s&&h?h.enumerable:!s,value:r,writable:null===c&&h?h.writable:!c});else{if(!u&&(s||c||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},655:(t,e,r)=>{"use strict";var n=r(453)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),"[object Array]"===o.call(t)?function(t,e,r){for(var n=0,o=t.length;n<o;n++)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,i):"string"==typeof t?function(t,e,r){for(var n=0,o=t.length;n<o;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,i):function(t,e,r){for(var n in t)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,i)}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};t.exports=function(t){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var a,i=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=r(0,o.length-i.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(a=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var e=o.apply(this,n(i,arguments));return Object(e)===e?e:this}return o.apply(t,n(i,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,a.prototype=new u,u.prototype=null}return a}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453:(t,e,r)=>{"use strict";var n,o=r(9383),a=r(1237),i=r(9290),s=r(9538),c=r(8068),l=r(9675),u=r(5345),h=Function,f=function(t){try{return h('"use strict"; return ('+t+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(t){p=null}var d=function(){throw new l},g=p?function(){try{return d}catch(t){try{return p(arguments,"callee").get}catch(t){return d}}}():d,m=r(4039)(),y=r(24)(),S=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),A={},b="undefined"!=typeof Uint8Array&&S?S(Uint8Array):n,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&S?S([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&S?S(S([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&S?S((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&S?S((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&S?S(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":b,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(S)try{null.error}catch(t){var I=S(S(t));E["%Error.prototype%"]=I}var M=function t(e){var r;if("%AsyncFunction%"===e)r=f("async function () {}");else if("%GeneratorFunction%"===e)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=f("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&S&&(r=S(o.prototype))}return E[e]=r,r},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(6743),T=r(9957),C=v.call(Function.call,Array.prototype.concat),D=v.call(Function.apply,Array.prototype.splice),L=v.call(Function.call,String.prototype.replace),_=v.call(Function.call,String.prototype.slice),N=v.call(Function.call,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,x=function(t,e){var r,n=t;if(T(w,n)&&(n="%"+(r=w[n])[0]+"%"),T(E,n)){var o=E[n];if(o===A&&(o=M(n)),void 0===o&&!e)throw new l("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new l('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=_(t,0,1),r=_(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return L(t,U,(function(t,e,r,o){n[n.length]=r?L(o,O,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=x("%"+n+"%",e),a=o.name,i=o.value,s=!1,u=o.alias;u&&(n=u[0],D(r,C([0,1],u)));for(var h=1,f=!0;h<r.length;h+=1){var d=r[h],g=_(d,0,1),m=_(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===m||"'"===m||"`"===m)&&g!==m)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&f||(s=!0),T(E,a="%"+(n+="."+d)+"%"))i=E[a];else if(null!=i){if(!(d in i)){if(!e)throw new l("base intrinsic for "+t+" exists, but the property is not available.");return}if(p&&h+1>=r.length){var y=p(i,d);i=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:i[d]}else f=T(i,d),i=i[d];f&&!s&&(E[a]=i)}}return i}},5795:(t,e,r)=>{"use strict";var n=r(453)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592:(t,e,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},24:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=r(6743);t.exports=a.call(n,o)},251:(t,e)=>{e.read=function(t,e,r,n,o){var a,i,s=8*o-n-1,c=(1<<s)-1,l=c>>1,u=-7,h=r?o-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(i=a&(1<<-u)-1,a>>=-u,u+=n;u>0;i=256*i+t[e+h],h+=f,u-=8);if(0===a)a=1-l;else{if(a===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),a-=l}return(p?-1:1)*i*Math.pow(2,a-n)},e.write=function(t,e,r,n,o,a){var i,s,c,l=8*a-o-1,u=(1<<l)-1,h=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,i=u):(i=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-i))<1&&(i--,c*=2),(e+=i+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(i++,c/=2),i+h>=u?(s=0,i=u):i+h>=1?(s=(e*c-1)*Math.pow(2,o),i+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),i=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(i=i<<o|s,l+=o;l>0;t[r+p]=255&i,p+=d,i/=256,l-=8);t[r+p-d]|=128*g}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7244:(t,e,r)=>{"use strict";var n=r(9092)(),o=r(8075)("Object.prototype.toString"),a=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},i=function(t){return!!a(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=i,t.exports=s?a:i},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var a=/^\s*class\b/,i=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},s=function(t){try{return!i(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var f=document.all;c.call(f)===c.call(document.all)&&(h=function(t){if((u||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!i(t)&&s(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(l)return s(t);if(i(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},8184:(t,e,r)=>{"use strict";var n,o=Object.prototype.toString,a=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=r(9092)(),c=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(i.test(a.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(t);if(!c)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&c(e)}return c(t)===n}},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},6578:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],l=!1,u=-1;function h(){l&&s&&(l=!1,s.length?c=s.concat(c):u=-1,c.length&&f())}function f(){if(!l){var t=i(h);l=!0;for(var e=c.length;e;){for(s=c,c=[];++u<e;)s&&s[u].run();u=-1,e=c.length}s=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||l||i(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6897:(t,e,r)=>{"use strict";var n=r(453),o=r(41),a=r(592)(),i=r(5795),s=r(9675),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,l=!0;if("length"in t&&i){var u=i(t,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(l=!1)}return(n||l||!r)&&(a?o(t,"length",e,!0,!0):o(t,"length",e)),t}},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9032:(t,e,r)=>{"use strict";var n=r(7244),o=r(8184),a=r(5767),i=r(5680);function s(t){return t.call.bind(t)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(c)var d=s(BigInt.prototype.valueOf);if(l)var g=s(Symbol.prototype.valueOf);function m(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function y(t){return"[object Map]"===u(t)}function S(t){return"[object Set]"===u(t)}function A(t){return"[object WeakMap]"===u(t)}function b(t){return"[object WeakSet]"===u(t)}function E(t){return"[object ArrayBuffer]"===u(t)}function I(t){return"undefined"!=typeof ArrayBuffer&&(E.working?E(t):t instanceof ArrayBuffer)}function M(t){return"[object DataView]"===u(t)}function w(t){return"undefined"!=typeof DataView&&(M.working?M(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=o,e.isTypedArray=i,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):i(t)||w(t)},e.isUint8Array=function(t){return"Uint8Array"===a(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===a(t)},e.isUint16Array=function(t){return"Uint16Array"===a(t)},e.isUint32Array=function(t){return"Uint32Array"===a(t)},e.isInt8Array=function(t){return"Int8Array"===a(t)},e.isInt16Array=function(t){return"Int16Array"===a(t)},e.isInt32Array=function(t){return"Int32Array"===a(t)},e.isFloat32Array=function(t){return"Float32Array"===a(t)},e.isFloat64Array=function(t){return"Float64Array"===a(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===a(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===a(t)},y.working="undefined"!=typeof Map&&y(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(y.working?y(t):t instanceof Map)},S.working="undefined"!=typeof Set&&S(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(S.working?S(t):t instanceof Set)},A.working="undefined"!=typeof WeakMap&&A(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(A.working?A(t):t instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(t){return b(t)},E.working="undefined"!=typeof ArrayBuffer&&E(new ArrayBuffer),e.isArrayBuffer=I,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var v="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(t){return"[object SharedArrayBuffer]"===u(t)}function C(t){return void 0!==v&&(void 0===T.working&&(T.working=T(new v)),T.working?T(t):t instanceof v)}function D(t){return m(t,h)}function L(t){return m(t,f)}function _(t){return m(t,p)}function N(t){return c&&m(t,d)}function U(t){return l&&m(t,g)}e.isSharedArrayBuffer=C,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===u(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===u(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===u(t)},e.isGeneratorObject=function(t){return"[object Generator]"===u(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===u(t)},e.isNumberObject=D,e.isStringObject=L,e.isBooleanObject=_,e.isBigIntObject=N,e.isSymbolObject=U,e.isBoxedPrimitive=function(t){return D(t)||L(t)||_(t)||N(t)||U(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(I(t)||C(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},537:(t,e,r)=>{var n=r(5606),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},a=/%[sdj%]/g;e.format=function(t){if(!A(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(l(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(t).replace(a,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])y(s)||!I(s)?i+=" "+s:i+=" "+l(s);return i},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var i={},s=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+c+"$","i")}function l(t,r){var n={seen:[],stylize:h};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,t,n.depth)}function u(t,e){var r=l.styles[e];return r?"["+l.colors[r][0]+"m"+t+"["+l.colors[r][1]+"m":t}function h(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&v(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return A(o)||(o=f(t,o,n)),o}var a=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(A(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return S(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,r);if(a)return a;var i=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(r)),w(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(r);if(0===i.length){if(v(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(M(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return p(r)}var l,u="",h=!1,I=["{","}"];return g(r)&&(h=!0,I=["[","]"]),v(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),E(r)&&(u=" "+RegExp.prototype.toString.call(r)),M(r)&&(u=" "+Date.prototype.toUTCString.call(r)),w(r)&&(u=" "+p(r)),0!==i.length||h&&0!=r.length?n<0?E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),l=h?function(t,e,r,n,o){for(var a=[],i=0,s=e.length;i<s;++i)L(e,String(i))?a.push(d(t,e,r,n,String(i),!0)):a.push("");return o.forEach((function(o){o.match(/^\d+$/)||a.push(d(t,e,r,n,o,!0))})),a}(t,r,n,s,i):i.map((function(e){return d(t,r,n,s,e,h)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(l,u,I)):I[0]+u+I[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,o,a){var i,s,c;if((c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),L(n,o)||(i="["+o+"]"),s||(t.seen.indexOf(c.value)<0?(s=y(r)?f(t,c.value,null):f(t,c.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return s;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.slice(1,-1),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+s}function g(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function S(t){return"number"==typeof t}function A(t){return"string"==typeof t}function b(t){return void 0===t}function E(t){return I(t)&&"[object RegExp]"===T(t)}function I(t){return"object"==typeof t&&null!==t}function M(t){return I(t)&&"[object Date]"===T(t)}function w(t){return I(t)&&("[object Error]"===T(t)||t instanceof Error)}function v(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(s.test(t)){var r=n.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=g,e.isBoolean=m,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=S,e.isString=A,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=E,e.types.isRegExp=E,e.isObject=I,e.isDate=M,e.types.isDate=M,e.isError=w,e.types.isNativeError=w,e.isFunction=v,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[C((t=new Date).getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":"),[t.getDate(),D[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!I(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var _="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(_&&t[_]){var e;if("function"!=typeof(e=t[_]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,_,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),_&&Object.defineProperty(e,_,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,o(t))},e.promisify.custom=_,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var o=e.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var a=this,i=function(){return o.apply(a,arguments)};t.apply(this,e).then((function(t){n.nextTick(i.bind(null,null,t))}),(function(t){n.nextTick(N.bind(null,t,i))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,o(t)),e}},5767:(t,e,r)=>{"use strict";var n=r(2682),o=r(9209),a=r(487),i=r(8075),s=r(5795),c=i("Object.prototype.toString"),l=r(9092)(),u="undefined"==typeof globalThis?r.g:globalThis,h=o(),f=i("String.prototype.slice"),p=Object.getPrototypeOf,d=i("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},g={__proto__:null};n(h,l&&s&&p?function(t){var e=new u[t];if(Symbol.toStringTag in e){var r=p(e),n=s(r,Symbol.toStringTag);if(!n){var o=p(r);n=s(o,Symbol.toStringTag)}g["$"+t]=a(n.get)}}:function(t){var e=new u[t],r=e.slice||e.set;r&&(g["$"+t]=a(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!l){var e=f(c(t),8,-1);return d(h,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(g,(function(r,n){if(!e)try{r(t),e=f(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(g,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=f(n,1))}catch(t){}})),e}(t):null}},4047:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=t,this.position=0,this.isBigEndian=e||!1}function a(t,e,r){return function(){var n;return n=this.isBigEndian?e.call(this.buffer,this.position):t.call(this.buffer,this.position),this.position+=r,n}}t.exports=o,o.prototype.readUInt8=a(n.prototype.readUInt8,n.prototype.readUInt8,1),o.prototype.readUInt16=a(n.prototype.readUInt16LE,n.prototype.readUInt16BE,2),o.prototype.readUInt32=a(n.prototype.readUInt32LE,n.prototype.readUInt32BE,4),o.prototype.readInt8=a(n.prototype.readInt8,n.prototype.readInt8,1),o.prototype.readInt16=a(n.prototype.readInt16LE,n.prototype.readInt16BE,2),o.prototype.readInt32=a(n.prototype.readInt32LE,n.prototype.readInt32BE,4),o.prototype.readFloat=a(n.prototype.readFloatLE,n.prototype.readFloatBE,4),o.prototype.readDouble=a(n.prototype.readDoubleLE,n.prototype.readDoubleBE,8),o.prototype.readVarInt=function(){var t,e=0,r=0;do{e+=(127&(t=this.buffer[this.position+r]))<<7*r,r++}while(t>=128);return this.position+=r,e}},1199:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=new n(t),this.position=0,this.allowResize=e}function a(t,e){return function(r,n){this.ensureSize(e),t.call(this.buffer,r,this.position,n),this.position+=e}}t.exports=o,o.prototype.writeUInt8=a(n.prototype.writeUInt8,1),o.prototype.writeUInt16LE=a(n.prototype.writeUInt16LE,2),o.prototype.writeUInt16BE=a(n.prototype.writeUInt16BE,2),o.prototype.writeUInt32LE=a(n.prototype.writeUInt32LE,4),o.prototype.writeUInt32BE=a(n.prototype.writeUInt32BE,4),o.prototype.writeInt8=a(n.prototype.writeInt8,1),o.prototype.writeInt16LE=a(n.prototype.writeInt16LE,2),o.prototype.writeInt16BE=a(n.prototype.writeInt16BE,2),o.prototype.writeInt32LE=a(n.prototype.writeInt32LE,4),o.prototype.writeInt32BE=a(n.prototype.writeInt32BE,4),o.prototype.writeFloatLE=a(n.prototype.writeFloatLE,4),o.prototype.writeFloatBE=a(n.prototype.writeFloatBE,4),o.prototype.writeDoubleLE=a(n.prototype.writeDoubleLE,8),o.prototype.writeDoubleBE=a(n.prototype.writeDoubleBE,8),o.prototype.writeBuffer=function(t){this.ensureSize(t.length),t.copy(this.buffer,this.position,0,t.length),this.position+=t.length},o.prototype.writeVarInt=function(t){for(var e=1;4294967168&t;)this.writeUInt8(127&t|128),t>>>=7,e++;return this.writeUInt8(127&t),e},o.prototype.ensureSize=function(t){if(this.buffer.length<this.position+t){if(!this.allowResize)throw new RangeError("index out of range");var e=new n(this.position+t);this.buffer.copy(e,0,0,this.buffer.length),this.buffer=e}}},2957:(t,e,r)=>{var n=r(8287).Buffer;t.exports=m;var o=r(740),a=r(4263),i=r(350),s=r(743),c=r(3452),l=r(3959),u=r(9236),h=r(1141),f=r(4047),p=r(1199),d=r(2104),g=r(1865);function m(){this.srid=void 0,this.hasZ=!1,this.hasM=!1}m.parse=function(t,e){if("string"==typeof t||t instanceof d)return m._parseWkt(t);if(n.isBuffer(t)||t instanceof f)return m._parseWkb(t,e);throw new Error("first argument must be a string or Buffer")},m._parseWkt=function(t){var e,r,n=(e=t instanceof d?t:new d(t)).matchRegex([/^SRID=(\d+);/]);n&&(r=parseInt(n[1],10));var f=e.matchType(),p=e.matchDimension(),g={srid:r,hasZ:p.hasZ,hasM:p.hasM};switch(f){case o.wkt.Point:return a._parseWkt(e,g);case o.wkt.LineString:return i._parseWkt(e,g);case o.wkt.Polygon:return s._parseWkt(e,g);case o.wkt.MultiPoint:return c._parseWkt(e,g);case o.wkt.MultiLineString:return l._parseWkt(e,g);case o.wkt.MultiPolygon:return u._parseWkt(e,g);case o.wkt.GeometryCollection:return h._parseWkt(e,g)}},m._parseWkb=function(t,e){var r,n,p,d={};switch((r=t instanceof f?t:new f(t)).isBigEndian=!r.readInt8(),n=r.readUInt32(),d.hasSrid=!(536870912&~n),d.isEwkb=536870912&n||1073741824&n||2147483648&n,d.hasSrid&&(d.srid=r.readUInt32()),d.hasZ=!1,d.hasM=!1,d.isEwkb||e&&e.isEwkb?(2147483648&n&&(d.hasZ=!0),1073741824&n&&(d.hasM=!0),p=15&n):n>=1e3&&n<2e3?(d.hasZ=!0,p=n-1e3):n>=2e3&&n<3e3?(d.hasM=!0,p=n-2e3):n>=3e3&&n<4e3?(d.hasZ=!0,d.hasM=!0,p=n-3e3):p=n,p){case o.wkb.Point:return a._parseWkb(r,d);case o.wkb.LineString:return i._parseWkb(r,d);case o.wkb.Polygon:return s._parseWkb(r,d);case o.wkb.MultiPoint:return c._parseWkb(r,d);case o.wkb.MultiLineString:return l._parseWkb(r,d);case o.wkb.MultiPolygon:return u._parseWkb(r,d);case o.wkb.GeometryCollection:return h._parseWkb(r,d);default:throw new Error("GeometryType "+p+" not supported")}},m.parseTwkb=function(t){var e,r={},n=(e=t instanceof f?t:new f(t)).readUInt8(),p=e.readUInt8(),d=15&n;if(r.precision=g.decode(n>>4),r.precisionFactor=Math.pow(10,r.precision),r.hasBoundingBox=1&p,r.hasSizeAttribute=p>>1&1,r.hasIdList=p>>2&1,r.hasExtendedPrecision=p>>3&1,r.isEmpty=p>>4&1,r.hasExtendedPrecision){var m=e.readUInt8();r.hasZ=!(1&~m),r.hasM=!(2&~m),r.zPrecision=g.decode((28&m)>>2),r.zPrecisionFactor=Math.pow(10,r.zPrecision),r.mPrecision=g.decode((224&m)>>5),r.mPrecisionFactor=Math.pow(10,r.mPrecision)}else r.hasZ=!1,r.hasM=!1;if(r.hasSizeAttribute&&e.readVarInt(),r.hasBoundingBox){var y=2;r.hasZ&&y++,r.hasM&&y++;for(var S=0;S<y;S++)e.readVarInt(),e.readVarInt()}switch(d){case o.wkb.Point:return a._parseTwkb(e,r);case o.wkb.LineString:return i._parseTwkb(e,r);case o.wkb.Polygon:return s._parseTwkb(e,r);case o.wkb.MultiPoint:return c._parseTwkb(e,r);case o.wkb.MultiLineString:return l._parseTwkb(e,r);case o.wkb.MultiPolygon:return u._parseTwkb(e,r);case o.wkb.GeometryCollection:return h._parseTwkb(e,r);default:throw new Error("GeometryType "+d+" not supported")}},m.parseGeoJSON=function(t){return m._parseGeoJSON(t)},m._parseGeoJSON=function(t,e){var r;switch(t.type){case o.geoJSON.Point:r=a._parseGeoJSON(t);break;case o.geoJSON.LineString:r=i._parseGeoJSON(t);break;case o.geoJSON.Polygon:r=s._parseGeoJSON(t);break;case o.geoJSON.MultiPoint:r=c._parseGeoJSON(t);break;case o.geoJSON.MultiLineString:r=l._parseGeoJSON(t);break;case o.geoJSON.MultiPolygon:r=u._parseGeoJSON(t);break;case o.geoJSON.GeometryCollection:r=h._parseGeoJSON(t);break;default:throw new Error("GeometryType "+t.type+" not supported")}if(t.crs&&t.crs.type&&"name"===t.crs.type&&t.crs.properties&&t.crs.properties.name){var n=t.crs.properties.name;if(0===n.indexOf("EPSG:"))r.srid=parseInt(n.substring(5));else{if(0!==n.indexOf("urn:ogc:def:crs:EPSG::"))throw new Error("Unsupported crs: "+n);r.srid=parseInt(n.substring(22))}}else e||(r.srid=4326);return r},m.prototype.toEwkt=function(){return"SRID="+this.srid+";"+this.toWkt()},m.prototype.toEwkb=function(){var t=new p(this._getWkbSize()+4),e=this.toWkb();return t.writeInt8(1),t.writeUInt32LE((536870912|e.slice(1,5).readUInt32LE(0))>>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},m.prototype._getWktType=function(t,e){var r=t;return this.hasZ&&this.hasM?r+=" ZM ":this.hasZ?r+=" Z ":this.hasM&&(r+=" M "),!e||this.hasZ||this.hasM||(r+=" "),e&&(r+="EMPTY"),r},m.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},m.prototype._writeWkbType=function(t,e,r){var n=0;void 0!==this.srid||r&&void 0!==r.srid?(this.hasZ&&(n|=2147483648),this.hasM&&(n|=1073741824)):this.hasZ&&this.hasM?n+=3e3:this.hasZ?n+=1e3:this.hasM&&(n+=2e3),t.writeUInt32LE(n+e>>>0,!0)},m.getTwkbPrecision=function(t,e,r){return{xy:t,z:e,m:r,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,r)}},m.prototype._writeTwkbHeader=function(t,e,r,n){var o=(g.encode(r.xy)<<4)+e,a=(this.hasZ||this.hasM)<<3;if(a+=n<<4,t.writeUInt8(o),t.writeUInt8(a),this.hasZ||this.hasM){var i=0;this.hasZ&&(i|=1),this.hasM&&(i|=2),t.writeUInt8(i)}},m.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}},1141:(t,e,r)=>{t.exports=s;var n=r(537),o=r(740),a=r(2957),i=r(1199);function s(t,e){a.call(this),this.geometries=t||[],this.srid=e,this.geometries.length>0&&(this.hasZ=this.geometries[0].hasZ,this.hasM=this.geometries[0].hasM)}n.inherits(s,a),s.Z=function(t,e){var r=new s(t,e);return r.hasZ=!0,r},s.M=function(t,e){var r=new s(t,e);return r.hasM=!0,r},s.ZM=function(t,e){var r=new s(t,e);return r.hasZ=!0,r.hasM=!0,r},s._parseWkt=function(t,e){var r=new s;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{r.geometries.push(a.parse(t))}while(t.isMatch([","]));return t.expectGroupEnd(),r},s._parseWkb=function(t,e){var r=new s;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.geometries.push(a.parse(t,e));return r},s._parseTwkb=function(t,e){var r=new s;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=t.readVarInt(),o=0;o<n;o++)r.geometries.push(a.parseTwkb(t));return r},s._parseGeoJSON=function(t){for(var e=new s,r=0;r<t.geometries.length;r++)e.geometries.push(a._parseGeoJSON(t.geometries[r],!0));return e.geometries.length>0&&(e.hasZ=e.geometries[0].hasZ),e},s.prototype.toWkt=function(){if(0===this.geometries.length)return this._getWktType(o.wkt.GeometryCollection,!0);for(var t=this._getWktType(o.wkt.GeometryCollection,!1)+"(",e=0;e<this.geometries.length;e++)t+=this.geometries[e].toWkt()+",";return(t=t.slice(0,-1))+")"},s.prototype.toWkb=function(){var t=new i(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.GeometryCollection),t.writeUInt32LE(this.geometries.length);for(var e=0;e<this.geometries.length;e++)t.writeBuffer(this.geometries[e].toWkb({srid:this.srid}));return t.buffer},s.prototype.toTwkb=function(){var t=new i(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.geometries.length;if(this._writeTwkbHeader(t,o.wkb.GeometryCollection,e,r),this.geometries.length>0){t.writeVarInt(this.geometries.length);for(var n=0;n<this.geometries.length;n++)t.writeBuffer(this.geometries[n].toTwkb())}return t.buffer},s.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.geometries.length;e++)t+=this.geometries[e]._getWkbSize();return t},s.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.GeometryCollection,e.geometries=[];for(var r=0;r<this.geometries.length;r++)e.geometries.push(this.geometries[r].toGeoJSON());return e}},350:(t,e,r)=>{t.exports=c;var n=r(537),o=r(2957),a=r(740),i=r(4263),s=r(1199);function c(t,e){o.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(c,o),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(i._readWkbPoint(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++)r.points.push(i._readTwkbPoint(t,e,n));return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(i._readGeoJSONPoint(t.coordinates[r]));return e},c.prototype.toWkt=function(){return 0===this.points.length?this._getWktType(a.wkt.LineString,!0):this._getWktType(a.wkt.LineString,!1)+this._toInnerWkt()},c.prototype._toInnerWkt=function(){for(var t="(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,a.wkb.LineString,t),e.writeUInt32LE(this.points.length);for(var r=0;r<this.points.length;r++)this.points[r]._writeWkbPoint(e);return e.buffer},c.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,a.wkb.LineString,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new i(0,0,0,0),c=0;c<this.points.length;c++)this.points[c]._writeTwkbPoint(t,e,n)}return t.buffer},c.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),9+this.points.length*t},c.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);e.type=a.geoJSON.LineString,e.coordinates=[];for(var r=0;r<this.points.length;r++)this.hasZ?e.coordinates.push([this.points[r].x,this.points[r].y,this.points[r].z]):e.coordinates.push([this.points[r].x,this.points[r].y]);return e}},3959:(t,e,r)=>{t.exports=l;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(350),c=r(1199);function l(t,e){a.call(this),this.lineStrings=t||[],this.srid=e,this.lineStrings.length>0&&(this.hasZ=this.lineStrings[0].hasZ,this.hasM=this.lineStrings[0].hasM)}n.inherits(l,a),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart(),r.lineStrings.push(new s(t.matchCoordinates(e))),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.lineStrings.push(a.parse(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++){var c=new s;c.hasZ=e.hasZ,c.hasM=e.hasM;for(var u=t.readVarInt(),h=0;h<u;h++)c.points.push(i._readTwkbPoint(t,e,n));r.lineStrings.push(c)}return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.lineStrings.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},l.prototype.toWkt=function(){if(0===this.lineStrings.length)return this._getWktType(o.wkt.MultiLineString,!0);for(var t=this._getWktType(o.wkt.MultiLineString,!1)+"(",e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(){var t=new c(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiLineString),t.writeUInt32LE(this.lineStrings.length);for(var e=0;e<this.lineStrings.length;e++)t.writeBuffer(this.lineStrings[e].toWkb({srid:this.srid}));return t.buffer},l.prototype.toTwkb=function(){var t=new c(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.lineStrings.length;if(this._writeTwkbHeader(t,o.wkb.MultiLineString,e,r),this.lineStrings.length>0){t.writeVarInt(this.lineStrings.length);for(var n=new i(0,0,0,0),s=0;s<this.lineStrings.length;s++){t.writeVarInt(this.lineStrings[s].points.length);for(var l=0;l<this.lineStrings[s].points.length;l++)this.lineStrings[s].points[l]._writeTwkbPoint(t,e,n)}}return t.buffer},l.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._getWkbSize();return t},l.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiLineString,e.coordinates=[];for(var r=0;r<this.lineStrings.length;r++)e.coordinates.push(this.lineStrings[r].toGeoJSON().coordinates);return e}},3452:(t,e,r)=>{t.exports=c;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(1199);function c(t,e){a.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(c,a),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(a.parse(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++)r.points.push(i._readTwkbPoint(t,e,n));return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(i._parseGeoJSON({coordinates:t.coordinates[r]}));return e},c.prototype.toWkt=function(){if(0===this.points.length)return this._getWktType(o.wkt.MultiPoint,!0);for(var t=this._getWktType(o.wkt.MultiPoint,!1)+"(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(){var t=new s(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPoint),t.writeUInt32LE(this.points.length);for(var e=0;e<this.points.length;e++)t.writeBuffer(this.points[e].toWkb({srid:this.srid}));return t.buffer},c.prototype.toTwkb=function(){var t=new s(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,o.wkb.MultiPoint,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new i(0,0,0,0),c=0;c<this.points.length;c++)this.points[c]._writeTwkbPoint(t,e,n)}return t.buffer},c.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t+=5,9+this.points.length*t},c.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPoint,e.coordinates=[];for(var r=0;r<this.points.length;r++)e.coordinates.push(this.points[r].toGeoJSON().coordinates);return e}},9236:(t,e,r)=>{t.exports=l;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(743),c=r(1199);function l(t,e){a.call(this),this.polygons=t||[],this.srid=e,this.polygons.length>0&&(this.hasZ=this.polygons[0].hasZ,this.hasM=this.polygons[0].hasM)}n.inherits(l,a),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart();var n=[],o=[];for(t.expectGroupStart(),n.push.apply(n,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),o.push(t.matchCoordinates(e)),t.expectGroupEnd();r.polygons.push(new s(n,o)),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.polygons.push(a.parse(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++){var c=new s;c.hasZ=e.hasZ,c.hasM=e.hasM;for(var u=t.readVarInt(),h=t.readVarInt(),f=0;f<h;f++)c.exteriorRing.push(i._readTwkbPoint(t,e,n));for(f=1;f<u;f++){for(var p=[],d=t.readVarInt(),g=0;g<d;g++)p.push(i._readTwkbPoint(t,e,n));c.interiorRings.push(p)}r.polygons.push(c)}return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&t.coordinates[0].length>0&&t.coordinates[0][0].length>0&&(e.hasZ=t.coordinates[0][0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.polygons.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},l.prototype.toWkt=function(){if(0===this.polygons.length)return this._getWktType(o.wkt.MultiPolygon,!0);for(var t=this._getWktType(o.wkt.MultiPolygon,!1)+"(",e=0;e<this.polygons.length;e++)t+=this.polygons[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(){var t=new c(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPolygon),t.writeUInt32LE(this.polygons.length);for(var e=0;e<this.polygons.length;e++)t.writeBuffer(this.polygons[e].toWkb({srid:this.srid}));return t.buffer},l.prototype.toTwkb=function(){var t=new c(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.polygons.length;if(this._writeTwkbHeader(t,o.wkb.MultiPolygon,e,r),this.polygons.length>0){t.writeVarInt(this.polygons.length);for(var n=new i(0,0,0,0),s=0;s<this.polygons.length;s++){t.writeVarInt(1+this.polygons[s].interiorRings.length),t.writeVarInt(this.polygons[s].exteriorRing.length);for(var l=0;l<this.polygons[s].exteriorRing.length;l++)this.polygons[s].exteriorRing[l]._writeTwkbPoint(t,e,n);for(l=0;l<this.polygons[s].interiorRings.length;l++){t.writeVarInt(this.polygons[s].interiorRings[l].length);for(var u=0;u<this.polygons[s].interiorRings[l].length;u++)this.polygons[s].interiorRings[l][u]._writeTwkbPoint(t,e,n)}}}return t.buffer},l.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.polygons.length;e++)t+=this.polygons[e]._getWkbSize();return t},l.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPolygon,e.coordinates=[];for(var r=0;r<this.polygons.length;r++)e.coordinates.push(this.polygons[r].toGeoJSON().coordinates);return e}},4263:(t,e,r)=>{t.exports=c;var n=r(537),o=r(2957),a=r(740),i=r(1199),s=r(1865);function c(t,e,r,n,a){o.call(this),this.x=t,this.y=e,this.z=r,this.m=n,this.srid=a,this.hasZ=void 0!==this.z,this.hasM=void 0!==this.m}n.inherits(c,o),c.Z=function(t,e,r,n){var o=new c(t,e,r,void 0,n);return o.hasZ=!0,o},c.M=function(t,e,r,n){var o=new c(t,e,void 0,r,n);return o.hasM=!0,o},c.ZM=function(t,e,r,n,o){var a=new c(t,e,r,n,o);return a.hasZ=!0,a.hasM=!0,a},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();var n=t.matchCoordinate(e);return r.x=n.x,r.y=n.y,r.z=n.z,r.m=n.m,t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=c._readWkbPoint(t,e);return r.srid=e.srid,r},c._readWkbPoint=function(t,e){return new c(t.readDouble(),t.readDouble(),e.hasZ?t.readDouble():void 0,e.hasM?t.readDouble():void 0)},c._parseTwkb=function(t,e){var r=new c;return r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty||(r.x=s.decode(t.readVarInt())/e.precisionFactor,r.y=s.decode(t.readVarInt())/e.precisionFactor,r.z=e.hasZ?s.decode(t.readVarInt())/e.zPrecisionFactor:void 0,r.m=e.hasM?s.decode(t.readVarInt())/e.mPrecisionFactor:void 0),r},c._readTwkbPoint=function(t,e,r){return r.x+=s.decode(t.readVarInt())/e.precisionFactor,r.y+=s.decode(t.readVarInt())/e.precisionFactor,e.hasZ&&(r.z+=s.decode(t.readVarInt())/e.zPrecisionFactor),e.hasM&&(r.m+=s.decode(t.readVarInt())/e.mPrecisionFactor),new c(r.x,r.y,r.z,r.m)},c._parseGeoJSON=function(t){return c._readGeoJSONPoint(t.coordinates)},c._readGeoJSONPoint=function(t){return 0===t.length?new c:t.length>2?new c(t[0],t[1],t[2]):new c(t[0],t[1])},c.prototype.toWkt=function(){return void 0===this.x&&void 0===this.y&&void 0===this.z&&void 0===this.m?this._getWktType(a.wkt.Point,!0):this._getWktType(a.wkt.Point,!1)+"("+this._getWktCoordinate(this)+")"},c.prototype.toWkb=function(t){var e=new i(this._getWkbSize());return e.writeInt8(1),this._writeWkbType(e,a.wkb.Point,t),void 0===this.x&&void 0===this.y?(e.writeDoubleLE(NaN),e.writeDoubleLE(NaN),this.hasZ&&e.writeDoubleLE(NaN),this.hasM&&e.writeDoubleLE(NaN)):this._writeWkbPoint(e),e.buffer},c.prototype._writeWkbPoint=function(t){t.writeDoubleLE(this.x),t.writeDoubleLE(this.y),this.hasZ&&t.writeDoubleLE(this.z),this.hasM&&t.writeDoubleLE(this.m)},c.prototype.toTwkb=function(){var t=new i(0,!0),e=o.getTwkbPrecision(5,0,0),r=void 0===this.x&&void 0===this.y;return this._writeTwkbHeader(t,a.wkb.Point,e,r),r||this._writeTwkbPoint(t,e,new c(0,0,0,0)),t.buffer},c.prototype._writeTwkbPoint=function(t,e,r){var n=this.x*e.xyFactor,o=this.y*e.xyFactor,a=this.z*e.zFactor,i=this.m*e.mFactor;t.writeVarInt(s.encode(n-r.x)),t.writeVarInt(s.encode(o-r.y)),this.hasZ&&t.writeVarInt(s.encode(a-r.z)),this.hasM&&t.writeVarInt(s.encode(i-r.m)),r.x=n,r.y=o,r.z=a,r.m=i},c.prototype._getWkbSize=function(){var t=21;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t},c.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);return e.type=a.geoJSON.Point,void 0===this.x&&void 0===this.y?e.coordinates=[]:void 0!==this.z?e.coordinates=[this.x,this.y,this.z]:e.coordinates=[this.x,this.y],e}},743:(t,e,r)=>{t.exports=c;var n=r(537),o=r(2957),a=r(740),i=r(4263),s=r(1199);function c(t,e,r){o.call(this),this.exteriorRing=t||[],this.interiorRings=e||[],this.srid=r,this.exteriorRing.length>0&&(this.hasZ=this.exteriorRing[0].hasZ,this.hasM=this.exteriorRing[0].hasM)}n.inherits(c,o),c.Z=function(t,e,r){var n=new c(t,e,r);return n.hasZ=!0,n},c.M=function(t,e,r){var n=new c(t,e,r);return n.hasM=!0,n},c.ZM=function(t,e,r){var n=new c(t,e,r);return n.hasZ=!0,n.hasM=!0,n},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;for(t.expectGroupStart(),t.expectGroupStart(),r.exteriorRing.push.apply(r.exteriorRing,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),r.interiorRings.push(t.matchCoordinates(e)),t.expectGroupEnd();return t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;var n=t.readUInt32();if(n>0){for(var o=t.readUInt32(),a=0;a<o;a++)r.exteriorRing.push(i._readWkbPoint(t,e));for(a=1;a<n;a++){for(var s=[],l=t.readUInt32(),u=0;u<l;u++)s.push(i._readWkbPoint(t,e));r.interiorRings.push(s)}}return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=t.readVarInt(),s=0;s<a;s++)r.exteriorRing.push(i._readTwkbPoint(t,e,n));for(s=1;s<o;s++){for(var l=[],u=t.readVarInt(),h=0;h<u;h++)l.push(i._readTwkbPoint(t,e,n));r.interiorRings.push(l)}return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++){r>0&&e.interiorRings.push([]);for(var n=0;n<t.coordinates[r].length;n++)0===r?e.exteriorRing.push(i._readGeoJSONPoint(t.coordinates[r][n])):e.interiorRings[r-1].push(i._readGeoJSONPoint(t.coordinates[r][n]))}return e},c.prototype.toWkt=function(){return 0===this.exteriorRing.length?this._getWktType(a.wkt.Polygon,!0):this._getWktType(a.wkt.Polygon,!1)+this._toInnerWkt()},c.prototype._toInnerWkt=function(){for(var t="((",e=0;e<this.exteriorRing.length;e++)t+=this._getWktCoordinate(this.exteriorRing[e])+",";for(t=t.slice(0,-1),t+=")",e=0;e<this.interiorRings.length;e++){t+=",(";for(var r=0;r<this.interiorRings[e].length;r++)t+=this._getWktCoordinate(this.interiorRings[e][r])+",";t=t.slice(0,-1),t+=")"}return t+")"},c.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,a.wkb.Polygon,t),this.exteriorRing.length>0?(e.writeUInt32LE(1+this.interiorRings.length),e.writeUInt32LE(this.exteriorRing.length)):e.writeUInt32LE(0);for(var r=0;r<this.exteriorRing.length;r++)this.exteriorRing[r]._writeWkbPoint(e);for(r=0;r<this.interiorRings.length;r++){e.writeUInt32LE(this.interiorRings[r].length);for(var n=0;n<this.interiorRings[r].length;n++)this.interiorRings[r][n]._writeWkbPoint(e)}return e.buffer},c.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.exteriorRing.length;if(this._writeTwkbHeader(t,a.wkb.Polygon,e,r),this.exteriorRing.length>0){t.writeVarInt(1+this.interiorRings.length),t.writeVarInt(this.exteriorRing.length);for(var n=new i(0,0,0,0),c=0;c<this.exteriorRing.length;c++)this.exteriorRing[c]._writeTwkbPoint(t,e,n);for(c=0;c<this.interiorRings.length;c++){t.writeVarInt(this.interiorRings[c].length);for(var l=0;l<this.interiorRings[c].length;l++)this.interiorRings[c][l]._writeTwkbPoint(t,e,n)}}return t.buffer},c.prototype._getWkbSize=function(){var t=16;this.hasZ&&(t+=8),this.hasM&&(t+=8);var e=9;this.exteriorRing.length>0&&(e+=4+this.exteriorRing.length*t);for(var r=0;r<this.interiorRings.length;r++)e+=4+this.interiorRings[r].length*t;return e},c.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);if(e.type=a.geoJSON.Polygon,e.coordinates=[],this.exteriorRing.length>0){for(var r=[],n=0;n<this.exteriorRing.length;n++)this.hasZ?r.push([this.exteriorRing[n].x,this.exteriorRing[n].y,this.exteriorRing[n].z]):r.push([this.exteriorRing[n].x,this.exteriorRing[n].y]);e.coordinates.push(r)}for(var i=0;i<this.interiorRings.length;i++){for(var s=[],c=0;c<this.interiorRings[i].length;c++)this.hasZ?s.push([this.interiorRings[i][c].x,this.interiorRings[i][c].y,this.interiorRings[i][c].z]):s.push([this.interiorRings[i][c].x,this.interiorRings[i][c].y]);e.coordinates.push(s)}return e}},740:t=>{t.exports={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7},geoJSON:{Point:"Point",LineString:"LineString",Polygon:"Polygon",MultiPoint:"MultiPoint",MultiLineString:"MultiLineString",MultiPolygon:"MultiPolygon",GeometryCollection:"GeometryCollection"}}},2104:(t,e,r)=>{t.exports=a;var n=r(740),o=r(4263);function a(t){this.value=t,this.position=0}a.prototype.match=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,t[e];return null},a.prototype.matchRegex=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++){var r=this.value.substring(this.position).match(t[e]);if(r)return this.position+=r[0].length,r}return null},a.prototype.isMatch=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,!0;return!1},a.prototype.matchType=function(){var t=this.match([n.wkt.Point,n.wkt.LineString,n.wkt.Polygon,n.wkt.MultiPoint,n.wkt.MultiLineString,n.wkt.MultiPolygon,n.wkt.GeometryCollection]);if(!t)throw new Error("Expected geometry type");return t},a.prototype.matchDimension=function(){switch(this.match(["ZM","Z","M"])){case"ZM":return{hasZ:!0,hasM:!0};case"Z":return{hasZ:!0,hasM:!1};case"M":return{hasZ:!1,hasM:!0};default:return{hasZ:!1,hasM:!1}}},a.prototype.expectGroupStart=function(){if(!this.isMatch(["("]))throw new Error("Expected group start")},a.prototype.expectGroupEnd=function(){if(!this.isMatch([")"]))throw new Error("Expected group end")},a.prototype.matchCoordinate=function(t){var e;if(!(e=t.hasZ&&t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]):t.hasZ||t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]):this.matchRegex([/^(\S*)\s+([^\s,)]*)/])))throw new Error("Expected coordinates");return t.hasZ&&t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4])):t.hasZ?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])):t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),void 0,parseFloat(e[3])):new o(parseFloat(e[1]),parseFloat(e[2]))},a.prototype.matchCoordinates=function(t){var e=[];do{var r=this.isMatch(["("]);e.push(this.matchCoordinate(t)),r&&this.expectGroupEnd()}while(this.isMatch([","]));return e},a.prototype.skipWhitespaces=function(){for(;this.position<this.value.length&&" "===this.value[this.position];)this.position++}},543:(t,e,r)=>{e.Types=r(740),e.Geometry=r(2957),e.Point=r(4263),e.LineString=r(350),e.Polygon=r(743),e.MultiPoint=r(3452),e.MultiLineString=r(3959),e.MultiPolygon=r(9236),e.GeometryCollection=r(1141)},1865:t=>{t.exports={encode:function(t){return t<<1^t>>31},decode:function(t){return t>>1^-(1&t)}}},9209:(t,e,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof o[n[e]]&&(t[t.length]=n[e]);return t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{BOTTOM_GRID:()=>s,CENTER_VALENCIA:()=>S,COLORS:()=>m,DAY_VALUE:()=>d,DEFAULT_NAME_MARGIN_Y:()=>p,DIVSIZE:()=>y,HEIGH_GRID:()=>u,IDIOMA:()=>e,LEFT_GRID:()=>a,NAME_MARGIN_Y_BARRIOS:()=>Gr,NIGHT_VALUE:()=>g,RIGTH_GRID:()=>i,RIGTH_TOOLBOX:()=>h,TOP_GRID:()=>c,TOP_GRID_SIN_LEYENDA:()=>l,TOP_LEGEND:()=>o,TOP_TOOLBOX:()=>f,addDatesToGaps:()=>Nt,addPointInteger:()=>E,calcularRuta:()=>ht,calculateXAxisMonth:()=>I,calculateXAxisStart:()=>wt,calculateXAxisYear:()=>M,changeImg:()=>lt,chargeData:()=>ze,chartHeaderOptions:()=>Er,chartOptions:()=>br,clearInputs:()=>Be,closeFilter:()=>ct,closePopUp:()=>it,commonPostFetch:()=>et,configureDataGaugeMonth:()=>Q,configureDataLine:()=>X,configureGaugeYearBig:()=>Ct,createChart:()=>co,createCheckBoxFilter:()=>dt,createCheckBoxFilterVar:()=>mt,createGauge:()=>q,createLeafletMap:()=>ee,createLeafletMapPolygon:()=>te,createObjectMarkerElements:()=>re,createSerie:()=>je,drawMarkers:()=>oe,drawMarkersPolygon:()=>ae,echartAccesosBarYear:()=>he,echartAccesosGaugeMonth:()=>pe,echartAccesosGaugeVehicles:()=>Yt,echartAccesosGaugeYear:()=>ge,echartAccesosHorStackedBarVehicles:()=>qt,echartAccesosLineMonth:()=>ye,echartAccesosPieVehicles:()=>Kt,echartAccesosVerStackedBarVehicles:()=>Xt,echartAccessosCiutat:()=>xt,echartAccessosCiutatPortada:()=>Pt,echartAcessosAnellCiclista:()=>ce,echartAiguaBarMonth:()=>an,echartAiguaGaugeSemicircle:()=>sn,echartAiguaRelojSemicircle:()=>cn,echartAiguaStackedBarYears:()=>ln,echartAnellBarYear:()=>ue,echartAnellCiclista:()=>le,echartAnellGaugeMonth:()=>fe,echartAnellGaugeYear:()=>de,echartAnellLineMonth:()=>me,echartBarrisBarYear:()=>un,echartBarrisGaugeMonth:()=>dn,echartBarrisGaugeYear:()=>pn,echartBarrisLineMonth:()=>hn,echartBenimamet:()=>Yr,echartConsumAguaBarris:()=>Zr,echartConsumTotalAgua:()=>Jr,echartDesKgsBar:()=>Dn,echartDesKgsGauge:()=>Tn,echartDesKgsHorStackedBar:()=>In,echartDesKgsPerTipusResidu:()=>An,echartDesKgsPie:()=>Ln,echartDesKgsStackedBar:()=>Mn,echartExposicio:()=>Kr,echartGaugeMonth:()=>F,echartGaugeYear:()=>G,echartInstancesSeuElectronicaBarMonth:()=>On,echartInstancesSeuElectronicaRelojSemicircle:()=>kn,echartInstancesSeuElectronicaStackedBarYears:()=>Fn,echartInstanciesDonadesAlta:()=>Vn,echartInstanciesSeuElectronica:()=>Un,echartIntensidadAnualCiclista:()=>Ie,echartIntensidadDiarialCiclista:()=>we,echartIntensidadMensualCiclista:()=>Me,echartIntensidadRealTimeCiclista:()=>ve,echartKgsResidus:()=>gn,echartKgsResidusBarMonth:()=>Cn,echartKgsResidusRelojSemicircle:()=>wn,echartKgsResidusStackedBarYears:()=>En,echartLine:()=>Tt,echartLineLinia:()=>Ze,echartLineTitol:()=>Ye,echartMalilla:()=>Xr,echartMestalla:()=>tn,echartNO:()=>vr,echartNO2:()=>Mr,echartNO2Portada:()=>Ir,echartNO2PresupuestosParticipativos:()=>wr,echartNOPresupuestosParticipativos:()=>Tr,echartNOX:()=>Cr,echartNOXPresupuestosParticipativos:()=>Dr,echartNotificacionsTelematic:()=>jn,echartO3:()=>Pr,echartO3PresupuestosParticipativos:()=>Rr,echartPIAEDonadesAltaBarMonth:()=>no,echartPIAEDonadesAltaGaugeMonth:()=>ao,echartPIAEDonadesAltaGaugeYear:()=>io,echartPIAEDonadesAltaStackedBarYears:()=>oo,echartPM1:()=>Nr,echartPM10:()=>Lr,echartPM10PresupuestosParticipativos:()=>_r,echartPM1PresupuestosParticipativos:()=>Ur,echartPM25:()=>Or,echartPM25PresupuestosParticipativos:()=>xr,echartPerellonet:()=>rn,echartPuntosMedidaBicis:()=>Ae,echartPuntosMedidaTrafico:()=>se,echartResolucionsAssentades:()=>zn,echartSO2:()=>kr,echartSO2PresupuestosParticipativos:()=>Br,echartSeuElectronica:()=>Nn,echartSeuElectronicaBarMonth:()=>xn,echartSeuElectronicaRelojSemicircle:()=>Bn,echartSeuElectronicaStackedBarYears:()=>Gn,echartSonometroManana:()=>ho,echartSonometroNoche:()=>po,echartSonometroTarde:()=>fo,echartSotenis:()=>on,echartTemperatureMitjanaDiaria:()=>so,echartUsuarisPerLinea:()=>pr,echartUsuarisPerLiniaBarYear:()=>Sr,echartUsuarisPerLiniaGaugeMonth:()=>or,echartUsuarisPerLiniaGaugeYear:()=>rr,echartUsuarisPerLiniaLineMonth:()=>mr,echartUsuarisPerTitol:()=>hr,echartUsuarisPerTitolBarYear:()=>yr,echartUsuarisPerTitolGaugeMonth:()=>nr,echartUsuarisPerTitolGaugeYear:()=>er,echartUsuarisPerTitolLineMonth:()=>gr,echartUsuarisTotals:()=>lr,echartUsuarisTotalsBarMonth:()=>Ne,echartUsuarisTotalsGaugeMonth:()=>sr,echartUsuarisTotalsGaugeYear:()=>tr,echartUsuarisTotalsStackedBarYears:()=>cr,echartVerStackedBar:()=>B,echartVieBarYear:()=>Ht,echartVieGaugeMonth:()=>zt,echartVieGaugeYear:()=>Zt,echartVieLineMonth:()=>Jt,echartViePrincCiutat:()=>$t,echartYearInstancesSeuElectronicaGaugeSemicircle:()=>Pn,echartYearKgsResidusGaugeSemicircle:()=>vn,echartYearSeuElectronicaGaugeSemicircle:()=>Rn,filterData:()=>Ke,filterDatesUpdate:()=>T,filterEMT1Update:()=>$e,filterEMT2Update:()=>Fe,filterVarUpdate:()=>gt,filterWindow:()=>st,formatDDMM:()=>It,formatName:()=>K,formatRoundTooltip:()=>z,formatSixDigitDate:()=>At,formatTooltip:()=>w,formatearFecha:()=>Et,formatoFecha:()=>yt,formatoFecha2:()=>St,formatoFecha3:()=>bt,formatterReloj:()=>R,generateDatesArray:()=>_t,getCommonOptionDonut:()=>W,getCommonOptionGaugeUmbral:()=>j,getCommonOptionPie:()=>Y,getCommonOptions:()=>k,getCommonOptionsBar:()=>V,getCommonOptionsGaugeMonth:()=>H,getCommonOptionsGaugeYears:()=>J,getCommonOptionsLimited:()=>zr,getConfigurationGaugeYears:()=>Z,getDateFromStr:()=>Dt,getMaxValue:()=>x,getMonth:()=>D,getMonthComplete:()=>_,getStringFromDate:()=>Lt,getTime:()=>Mt,getWidthElementChart:()=>P,handlerActivarFiltro:()=>Je,handlerDesactivarFiltro:()=>He,includeHTMLCabecera:()=>rt,includeHTMLFooter:()=>ot,includeHTMLMenu:()=>nt,indoPopUp:()=>at,initChart:()=>tt,initStackedBarChartSedeElec:()=>$n,listeneresAgua:()=>jr,listeneresContamina:()=>Ar,listeneresEMT:()=>qe,listeneresVehicles:()=>Bt,llamadasIniciales:()=>pt,loadAnaliticaFrames:()=>mo,loadMap:()=>go,mapPuntosMedidaBicis:()=>Se,mapPuntosMedidaTrafico:()=>ie,normalImg:()=>ut,obtenerGeoJson:()=>ne,obtenerRuta:()=>ft,prepareData:()=>Vr,printDataChart:()=>U,printNoDataChart:()=>N,setDOMData:()=>Le,splitData:()=>O,tableAcceso:()=>Ft,tableVariacio:()=>Gt,tableVias:()=>Vt,tramosBicis:()=>_e,usdEmtUsuarisPerLinea:()=>dr,usdEmtUsuarisPerTitol:()=>fr,usdEmtUsuarisTotals:()=>ur,xAxisFormatWithoutYear:()=>vt,yAxisFormat:()=>v});var t=r(2725);const e="ca_ES",o="8%",a="2.5%",i="5%",s="18%",c="20%",l="10%",u="90%",h="1%",f="0%",p=0,d=65,g=55,m=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],y=33,S=[39.46975,-.37739],A=27,b=30;function E(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const r={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",r):t.toLocaleString(e,r)}function I(t){return 100*(1-17/t)}function M(t){return 100*(1-7/t)}function w(t,e=!1){let r=`<p>${t[0].name}</p>`;return t.forEach((t=>{const n=e?Math.round(t.data):t.data,o=`<div>${a=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${a}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?E(n):"-"}</strong></div>`;var a;r+=o})),r}function v(t){return E(t)}function T(){const t=$("#formFilterDates").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterDatesParam",e),Dashboards.fireChange("updateFilter","True")}function C(){const t=$("#formFilterDates").find("input");$(t).each(((t,e)=>{e.checked&&(e.checked=!1)}));const e=$("#formFilterVar").find("input");$(e).each(((t,e)=>{e.checked&&(e.checked=!1)})),function(){let t=0;const e=$("#formFilterDates").find("input");$(e).each(((e,r)=>{t+=1,r.checked=!0})),t=0;const r=$("#formFilterVar").find("input");$(r).each(((e,r)=>{t+=1,null!=render_tableVariacio?t<=2&&(r.checked=!0):t<=3&&(r.checked=!0)})),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}()}function D(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())]}function _(t){return{1:"GENER",2:"FEBRER",3:"MARÇ",4:"ABRIL",5:"MAIG",6:"JUNY",7:"JULIO",8:"AGOST",9:"SETEMBRE",10:"OCTUBRE",11:"NOVEMBRE",12:"DESEMBRE"}[t]}function N(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function U(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function O(t,e){return t.reduce(((t,r)=>{const n=r[e];return t[n]||(t[n]=[]),t[n].push(r),t}),{})}function x(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function P(t){return Math.round(document.getElementById(t).offsetWidth/y)}function R(t,e,r){const n=E(Math.round(e)),o=D(t[r][0]),a=t[r][1],i=`\n\n\n${o} ${a} : ${n}`,s=`${n}\n${o} ${a}`;return window.innerWidth<=1710?i:s}function k(t,e,r,n,p,d,g,m=5,y="",S=p,A=100,b,E=void 0,I=void 0){return{title:{text:y,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>w(t),textStyle:{fontFamily:"Montserrat"}},legend:e?{type:"plain",data:e,textStyle:{fontFamily:"Montserrat"},top:E||o,selected:b}:null,grid:{left:a,right:i,bottom:s,top:e?E?"30%":c:l,heigh:u,containLabel:!0},xAxis:{type:"category",data:r,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:n,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,g]},type:"value",scale:!0,min:I,axisLabel:{margin:m,formatter:v,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:d,data:r,start:S,end:A,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:{show:d,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:h,top:f}}}function B(t,e,r,n,o="",l="total",h=0,f=1,p=2,d=m){if(0===r.length)N(`#${t}`,`#${e}`);else{U(`#${e}`,`#${t}`);const g=[];let m=O(r,h);const y=new Set(r.map((t=>t[f]))),S=Object.keys(m);y.forEach((t=>{S.forEach((e=>{void 0===m[e].find((e=>e[f]===t))&&(m[e].push([m[e][0][h],t,void 0]),m[e][0][1].length>4?m[e].sort(((t,e)=>{const[r,n]=t[1].split("/"),[o,a]=e[1].split("/"),i=new Date(n,r-1,1),s=new Date(a,o-1,1);return i.getTime()-s.getTime()})):m[e].sort())}))}));const A=Object.entries(m).sort(((t,e)=>t[0].localeCompare(e[0]))),b=""===l?90:0;m=Object.fromEntries(A),Object.keys(m).forEach((t=>{g.push({name:t,type:"bar",stack:l,label:{show:!0,fontFamily:"Montserrat",rotate:b,formatter:t=>E(Math.round(t.value))},emphasis:{focus:"series"},data:m[t].map((t=>t[p]))})}));const T=""!==l?I(y.size):M(y.size);tt(t,{color:d,title:{text:o,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat"},formatter:t=>w(t,!0)},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:a,right:i,bottom:s,top:c,heigh:u,containLabel:!0},yAxis:{type:"value",splitNumber:4,name:n,nameLocation:"end",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666"},axisLabel:{formatter:v,textStyle:{fontSize:8,fontFamily:"Montserrat",color:"#666"}}},xAxis:{type:"category",data:[...y],axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:g,toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50},dataZoom:[{show:!0,data:[...y],start:T,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)"}}}]})}}function F(t,e,r,n,o,a,i){if(0===o.length)N(`#${t}`,`#${r}`),N(`#${e}`,`#${n}`);else{U(`#${r}`,`#${t}`),U(`#${n}`,`#${e}`);const s=0,c=2,l=Q(o,c,1),u=l[0],h=l[1],f=l[2],p=l[3],d=l[5],g=P(t),m=q(u,c,s,d,g),y=q(h,c,s,d,g);tt(t,Z(`${a}${_(String(Object.keys(f)[1]))}`,p,m,g)),tt(e,Z(`${i}${_(String(Object.keys(f)[0]))}`,p,y,g))}}function G(t,e,r,n){0===r.length?N(`#${t}`,`#${e}`):U(`#${e}`,`#${t}`);const o=x(r,1,1.1),a=P(t);let i=180;o>9999999&&(i=95);const s=q(r,1,0,i,a);tt(t,Z(`${n} ${r[0][2]}`,o,s,a))}function V(t,e,r=-45,n="",o=e){const a=new Set,i=[];t.forEach((t=>{const e=t[0].toString().padStart(2,"0");a.add(`${e}/${t[1]}`),i.push(Math.round(t[2]))}));const s=i.length<100?40:80;return k({name:o,type:"bar",smooth:!1,barMaxWidth:40,itemStyle:{color:"#5470c6"},textStyle:{fontFamily:"Montserrat"},data:i},null,Array.from(a.values()),e,s,!0,r,25,n)}function z(t,e){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let n=`${t.name} : `;return n+=`<span style="font-weight:bold">${E(t.value)}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),r+n}function j(t,e,r,n){return{series:[{type:"gauge",center:["50%","50%"],startAngle:200,endAngle:-20,min:0,max:100,splitNumber:0,progress:{show:!1,width:5,itemStyle:{color:"#666"}},axisLine:{lineStyle:{width:18}},axisTick:{show:!1},splitLine:{length:15,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:25,color:"#999",fontSize:20,show:!1},anchor:{show:!0,showAbove:!0,size:25,itemStyle:{borderWidth:10},show:!1},pointer:{show:!0,icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"12%",width:20,offsetCenter:[0,"-40%"],itemStyle:{color:"#ccc"}},axisLine:{lineStyle:{width:35,color:[[e,"#e56b6f"],[e+r,"#ffbf69"],[1,"#a1c483"]]}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{show:!0,offsetCenter:[0,"45%"],textStyle:{color:"#000",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:15}},detail:{fontSize:30,offsetCenter:[0,"90%"],valueAnimation:!0,color:"#666",textStyle:{color:"#000",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:35}},data:[{value:t,name:n}]}]}}function W(t,e,r,n){return{tooltip:{trigger:"item",formatter:t=>z(t,!1),textStyle:{fontSize:13.5,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},title:{text:e,left:"center",top:"40%",textStyle:{fontSize:13.5,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{left:"center",bottom:"0%",textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},series:[{top:"0%",bottom:"15%",type:"pie",radius:r||["65%","75%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:5,borderColor:"#f1f1f1",borderWidth:1},label:{show:!1,position:"center",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},emphasis:{label:{show:!1,fontSize:20}},labelLine:{show:!1},color:n||["#fcb9b2","#ffd97d","#64a6bd","#98c9a3","#ff9b85"],data:t}]}}function Y(t,e,r,n=m){return{textStyle:{fontFamily:"Montserrat"},title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:r-4,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"item",textStyle:{fontFamily:"Montserrat"},formatter:t=>z(t,!0)},legend:{orient:"horizontal",textStyle:{fontFamily:"Montserrat"},left:e.length>5?"10%":"12%",bottom:"10%",top:"65%",selectedMode:!1},series:[{type:"pie",radius:"33%",data:e,color:n,top:"-30%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:10,top:20}}}function Z(t,e,r,n){return{color:m,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>z(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>E(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:r,detail:{fontSize:n/1.2,color:"inherit",formatter:t=>E(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:A,top:b}}}function J(t,e="",r){const n=[],o=x(t,1,1.1),a=o.toString().length>=9?100:95,i=115===a?-45:-35;let s=t.length<5?t.length*i:-190;for(let e=0;e<t.length;e+=1)n.push({value:t[e][1],name:String(t[e][0]),title:{offsetCenter:[String(s),"20%"],fontFamily:"Montserrat"},detail:{offsetCenter:[String(s),"35%"],fontFamily:"Montserrat"}}),s+=a;return Z(e,o,n,r)}function H(t,e,r="",n){return{title:{text:r,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:x(t,2),itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:10,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:t=>E(Math.round(t))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[-5,"-10%"],fontSize:n+5,fontWeight:"bolder",formatter:r=>R(t,r,e),fontFamily:"Montserrat",color:"inherit"},data:[{value:t[e][2]}]},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:A,top:b}}}function K(t){if(t.length>=29){const e=t.split(" ");let r="",n="";for(const t of e)`${r} ${t}`.length<=29?r+=(r?" ":"")+t:(n+=`${r}\n`,r=t);return n+=r,n}return t}function q(t,e,r,n,o){let a=20,i=35,s=-190,c=n;t.length<=2&&(s=-140,c+=100,a=25,i=42);const l=m.slice(),u=[];for(let n=0;n<t.length;n+=1)u.push({value:t[n][e],name:K(t[n][r]),color:l.shift(),title:{offsetCenter:[String(s),`${String(a)}%`],fontFamily:"Montserrat",fontSize:o-3},detail:{offsetCenter:[String(s),`${String(i)}%`],fontFamily:"Montserrat"}}),s+=c,(n+1)%3==0&&(i+=30,a+=30,s=-190);return u}function X(t,e,r=!1){const{resultset:n}={resultset:t},o=new Set,a=new Set,i=e,s=n.map((([t,e,n])=>{const i=r?Math.round(n):n;return o.add(t),a.add(e),{day:e,type:t,value:i}})),c=Array.from(a.values()),l=Array.from(o.values());return l.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[l.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=c.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,type:"line",symbol:"circle",color:i.shift(),symbolSize:6,smooth:!1,data:r}})),a,l]}function Q(t,e,r){const n=x(t,e,1.1);let o=50,a=180;n>9999999&&(o=65,a=95);const i=O(t,r);let[s,c]=Object.values(i);return Object.values(i).slice(1).forEach((t=>{c=t})),[c,s,i,n,o,a]}function tt(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);return n.setOption(e,!0),$(window).on("resize",(()=>{null!=n&&void 0!==n&&n.resize()})),n}function et(){$("#chart2").css("width","100%")}function rt(){let t,e,r,n;const o=document.getElementsByTagName("*");for(t=0;t<o.length;t+=1)if(e=o[t],r=e.getAttribute("include-html-cabecera"),r)return n=new XMLHttpRequest,n.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(e.innerHTML=this.responseText),404===this.status&&(e.innerHTML="No se ha podido cargar correctamente."))},n.open("GET",r,!0),void n.send()}function nt(t){let e,r,n,o;const a=document.getElementsByTagName("*");for(e=0;e<a.length;e+=1)if(r=a[e],n=r.getAttribute("include-html-menu"),n)return o=new XMLHttpRequest,o.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(r.innerHTML=this.responseText,$(t).removeClass("imgNavMenu"),$(t).addClass("imgNavMenuActive")),404===this.status&&(r.innerHTML="No se ha podido cargar correctamente."))},o.open("GET",n,!0),void o.send()}function ot(){let t,e,r,n;const o=document.getElementsByTagName("*");for(t=0;t<o.length;t+=1)if(e=o[t],r=e.getAttribute("include-html-footer"),r)return n=new XMLHttpRequest,n.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(e.innerHTML=this.responseText),404===this.status&&(e.innerHTML="No se ha podido cargar correctamente."))},n.open("GET",r,!0),void n.send()}function at(){$("#idPopupInfo").show()}function it(){$("#idPopupInfo").hide()}function st(){"none"===$("#layoutFilter").css("display")?$("#layoutFilter").show():$("#layoutFilter").hide()}function ct(){$("#layoutFilter").hide()}function lt(t,e){0!==t.childNodes[1].childNodes.length?$(`#${t.children[0].children[0].children[0].children[0].id}`).attr("src",`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages/${t.children[0].children[0].children[0].children[0].src.split("/").pop().split(".")[0]}_hover.svg}`):t.children[0].src=`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages%3A${e}_hover.svg/content`}function ut(t,e){0!=t.childNodes[1].childNodes.length?$(`#${t.children[0].children[0].children[0].children[0].id}`).attr("src",`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages/${t.children[0].children[0].children[0].children[0].src.split("/").pop().split("_")[0]}.svg}`):t.children[0].src=`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages%3A${e}.svg/content`}function ht(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 ft(t){return`${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 pt(t){$(document).click((()=>{const t=$("#layoutFilter");t.is(event.target)||t.has(event.target).length||t.hide()})),rt(),nt(t),ot()}function dt(t,e,r){const n=$("#formFilterDates");if(""===Dashboards.getParameterValue("updateFilter")){const r=new Set;for(let n=t-1;n>0;--n)r.add(e[n]);for(const[t,e]of r.entries())n.append(`<input type="checkbox" id="${t}" onclick="legacy.filterDatesUpdate();" />${e}<br /></input>`);C(),T()}}function gt(){const t=$("#idFilterVar").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id.replaceAll("/","-"))})),Dashboards.fireChange("filterVarParam",e),Dashboards.fireChange("updateFilterVar","True")}function mt(t,e){const r=$("#formFilterVar");if(""===Dashboards.getParameterValue("updateFilterVar")){for(let t=e.length-1;t>=0;t--)r.append(`<input type="checkbox" id="${e[t]}" onclick="legacy.filterVarUpdate();" />${e[t]}<br /></input>`);C(),gt()}}function yt(t){return t.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function St(t){return t.replace(/^(\d{4})(\d{2})(\d{2})$/g,"$3/$2/$1")}function At(t){const e=`20${t.slice(0,2)}`,r=t.slice(2,4);return`${t.slice(4,6)}/${r}/${e}`}function bt(t,e){const r=t.slice(0,2),n=t.slice(3,6);let o;return o=null==e?`20${t.slice(7,9)}`:`20${e.slice(5,7)}`,2===o.length&&(o="2022"),`${r}/${{Gen:"01",Feb:"02",Mar:"03",Abr:"04",Mai:"05",Jun:"06",Jul:"07",Ago:"08",Sep:"09",Oct:"10",Nov:"11",Des:"12"}[n]}/${o}`}function Et(t){let e=t.getUTCDate().toString();1===e.length&&(e=`0${e}`);let r=(t.getMonth()+1).toString();return 1===r.length&&(r=`0${r}`),`${e}/${r}/${t.getFullYear().toString()}`}function It(t){const e=t.slice(0,2);return`${t.slice(3,5)}/${e}`}function Mt(t){const e=t.toString().match(/(\d{2}:\d{2})/);return e?e[1]:null}function wt(t){return 100*(t-120)/t}function vt(t){return Array.from(t.values()).map((t=>{const[e,r]=t.split("/");return It(t)}))}function Tt(t,e,r,n,o,a,i,s,c=!1,l=!1,u=void 0,h=!0,f=m.slice(),p=!1,d=void 0,g=void 0){const y=t.resultset||t;if(0===y.length)N(`#${a}`,`#${i}`),s&&N(`#${s}`,`#${i}`);else{U(`#${i}`,`#${a}`),s&&U(`#${i}`,`#${s}`);const t=X(y,f,p),m=t[0],S=t[1],A=t[2],b=h?A:null,E=l?vt(S):Array.from(S.values());void 0===u&&(u=c?I(S.size):wt(S.size)),tt(a,k(m,b,E,o,u,e,r,void 0,n,void 0,void 0,void 0,d,g))}}function Ct(t,e,r=!1){const n=[],o=1.1*x(t,1);let a,i=50,s=250,c=20,l=30,u=-80;o>9999999&&(i=65,s=75);const h=r?4:3;for(let r=0;r<t.length;r+=1)a=String(t[r][0]).replace(/\[.*?\]/g,""),a=K(a),n.push({value:t[r][1],name:a,title:{offsetCenter:[`${String(u)}%`,`${String(c)}%`],fontFamily:"Montserrat",fontSize:e},detail:{offsetCenter:[`${String(u)}%`,`${String(l)}%`],fontFamily:"Montserrat",fontSize:e}}),u+=s,(r+1)%h==0&&(l+=30,c+=30,u=-80);return[o,n,i]}function Dt(t){const e=t.split("/"),r=parseInt(e[0],10),n=parseInt(e[1],10)-1,o=parseInt(e[2],10);return new Date(o,n,r)}function Lt(t){return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getFullYear())}`}function _t(t,e){const r=[];for(;t<=e;){const e=Lt(t);r.push(e),t.setDate(t.getDate()+1)}return r}function Nt(t){const e=Array.from(t.keys(),(t=>Dt(t))),r=[],n=[],o=_t(new Date(Math.min(...e)),new Date(Math.max(...e)));return o.forEach((e=>{if(t.has(e)){const r=t.get(e);n.push(r)}else n.push(null)})),r.push(o),r.push(n),r}const Ut="ca_ES",Ot={es_ES:new Map([["chartAccesosGauge","ACCESOS A LA CIUDAD: ACUMULADO AÑO }"],["chartViesGaugeYear","VIAS PRINCIPALES DE LA\nCIUDAD: ACUMULADO AÑO }"],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]]),ca_ES:new Map([["chartAccesosGauge","ACCESSOS A LA CIUTAT: ACUMULAT ANY "],["chartViesGaugeYear","VIES PRINCIPALS DE LA\nCIUTAT: ACUMULAT ANY "],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]])};function xt(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],c=wt(a.size),l=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),h={title:{text:`${Ot[Ut].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:`${Ot[Ut].get("unidadMedidaVehículos")}`,axisLabel:{formatter:v}},dataZoom:{show:!0,data:i,start:c},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAcessosCiutat",u,h)}function Pt(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],c=(0,t.resultsetWithFields)(r),l=c.map((t=>t.value)),u=Math.max(...l),h=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),f={grid:{left:"0",right:"0",bottom:"0",top:"200",containLabel:!0},title:{text:`${Ot[Ut].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i,axisLabel:{margin:15}},yAxis:{name:`${Ot[Ut].get("unidadMedidaVehículos")}`,axisLabel:{formatter:v},max:u},dataZoom:{show:!1},toolbox:{show:!1}};(0,t.configureLinesChartValidates)("chartTransitAccessosCiutat",h,f)}function Rt(){document.querySelector("#idFiltrar").style.visibility="visible"}function kt(){document.querySelector("#idFiltrar").style.visibility="hidden"}function Bt(){render_tableVariacio.listeners=["filterVarParam","updateFilterVar"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("updateFilterVar"),document.querySelector("#idVariacio").addEventListener("click",Rt),document.querySelector("#idAcessosCiutat").addEventListener("click",kt),document.querySelector("#idViePrincCiutat").addEventListener("click",kt)}function $t(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],c=wt(a.size),l=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Accesos-Vias-Coches","KpiValid-365-Accesos-Vias-Coches"],["Kpi-Accesos-Vias-Coches"]),h={title:{text:`${Ot[Ut].get("tituloGraficaVias")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:`${Ot[Ut].get("unidadMedidaVehículos")}`,axisLabel:{formatter:v}},dataZoom:{show:!0,data:i,start:c},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartViePrincCiutat",u,h)}function Ft(t,e){const r=[];if(null!=e.resultset&&e.resultset.length>0)for(let t=0;t<e.resultset.length;t++){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableAcceso",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}],rowClick(t,e){}})}function Gt(t,e){const r=[],n=Dashboards.getParameterValue("filterVarParam"),o=new Set;if(null!=e.resultset&&e.resultset.length>0){if(n.length>0)for(let t=n.length-1;t>=0;t-=1)for(let a=0;a<e.resultset.length;a+=1)n[t]===e.resultset[a][3]&&(o.add(e.resultset[t][3]),r.push({dat:e.resultset[a][3].replaceAll("-","/"),tram:e.resultset[a][1],int:E(e.resultset[a][6]),vari:E((100*parseFloat(e.resultset[a][5])).toFixed(2)),dataRe:e.resultset[a][2].replaceAll("-","/"),intRe:E(e.resultset[a][7])}));else for(let t=0;t<e.resultset.length;t+=1)o.add(e.resultset[t][3].replaceAll("-","/")),r.push({dat:e.resultset[t][3].replaceAll("-","/"),tram:e.resultset[t][1],int:e.resultset[t][6],vari:(100*parseFloat(e.resultset[t][5])).toFixed(2),dataRe:e.resultset[t][2].replaceAll("-","/"),intRe:e.resultset[t][7]});const t=Array.from(o);mt(t.length,t)}0===n.length?($("#chartVariacio").hide(),$("#no_dataChartVariacio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataChartVariacio").show()):($("#chartVariacio").show(),$("#no_dataChartVariacio").hide()),new Tabulator("#chartVariacio",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["dat"],columns:[{title:"Data",field:"dat",hozAlign:"center",headerHozAlign:"center"},{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",width:560},{title:"Intensitat",field:"int",hozAlign:"center",headerHozAlign:"center"},{title:"Variació",field:"vari",hozAlign:"center",headerHozAlign:"center",formatter:(t,e,r)=>(parseFloat(t.getValue())<0?t.getElement().classList.add("custom-red-cell"):t.getElement().classList.add("custom-green-cell"),t.getValue())},{title:"Data Referència",field:"dataRe",hozAlign:"center",headerHozAlign:"center"},{title:"Intensitat Referència",field:"intRe",hozAlign:"center",headerHozAlign:"center"}],rowClick(t,e){}})}function Vt(t,e){const r=[];if(null!=e.resultset)for(let t=0;t<e.resultset.length;t+=1){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableViaPri",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}],rowClick(t,e){}})}function zt(t,e){document.querySelector("#tabViePrincCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartViesMesActual","chartViesMesAnterior","no_dataViesMesActual","no_dataViesMesAnterior",e.resultset,"VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ","VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ")}))}))}const jt={color:void 0,title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"}},splitNumber:3,series:{type:"gauge",max:void 0,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:10},axisLabel:{show:!0,distance:70,formatter:void 0,fontFamily:"Montserrat",color:"#666"},data:[],detail:{fontSize:12,color:"inherit"}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:30}};function Wt(e,r){const n=r.resultset,o=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"];if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,data:1,time:2},[a,i]=(0,t.configureDataGaugeCommon)(n,r,o.slice(),e.fontSize,e.paramOffsetCenterTitle,e.paramOffsetCenterDetail,e.paramOffsetLabel,e.paramCalculatedOffset,e.paramNumberOfElementsByLine),s={...jt};s.title.text=e.chartName,s.series.max=a,s.series.data=i,s.series.detail.fontSize=e.fontSize,s.series.detail.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.series.axisTick.splitNumber=5,s.color=o.slice(),s.series.axisLabel.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.tooltip.formatter=e=>function(e){let r=`${e.name} : `;return r+=`<span style="font-weight:bold">${(0,t.addPointInteger)(Math.round(e.value))}</span>`,e.marker+r}(e),(0,t.initChart)(e.idChart,s)}}function Yt(t,e){Wt({idChart:"chartAccesosGauge",idNoData:"no_dataAccesosGauge",chartName:`${Ot[Ut].get("chartAccesosGauge")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-75,paramCalculatedOffset:75,paramNumberOfElementsByLine:3},e)}function Zt(t,e){Wt({idChart:"chartViesGaugeYear",idNoData:"no_dataViesGaugeYear",chartName:`${Ot[Ut].get("chartViesGaugeYear")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-90,paramCalculatedOffset:90,paramNumberOfElementsByLine:3},e)}function Jt(t,e){Tt(e,!0,1,"VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC MENSUAL","Vehicles","chartViesLineMonth","no_dataViesLineMonth",void 0,!0)}function Ht(t,e){B("chartViesBar","no_dataViesBar",e.resultset,"Vehicles","VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC ANUAL","")}function Kt(t,e){if(0===e.resultset.length)N("#chartAccesosPie","#no_dataAccesosPie");else{U("#no_dataAccesosPie","#chartAccesosPie");const t=P("chartAccesosPie"),r=e.resultset,n=[],o=0,a=1,i=2;for(let t=0;t<r.length;t+=1)n.push({value:r[t][a],name:r[t][o]});tt("chartAccesosPie",Y(`ACCESSOS A LA CIUTAT: DISTRIBUCIÓ ANY ${r[0][i]}`,n,t+3))}}function qt(e,r){if(0===r.resultset.length)N("#chartAccesosHorStackedBar","#no_dataAccesosHorStackedBar");else{U("#no_dataAccesosHorStackedBar","#chartAccesosHorStackedBar");const e=r.resultset,n={title:{text:"ACCESSOS A LA CIUTAT: HISTÒRIC ANUAL"},color:["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],xAxis:{name:"\n\n\n\nVehicles"}};(0,t.initStackedBarChart)("chartAccesosHorStackedBar",e,n)}}function Xt(t,e){B("chartAccesosStackedBar","no_dataAccesosStackedBar",e.resultset,"Vehicles","ACCESSOS A LA CIUTAT: HISTÒRIC MENSUAL")}let Qt;function te(t,e,r,n,o,a,i,s=!1){const c=ne(r,e.id,e.addres,e.location),l=L.map(t).setView(S,i?i.initialZoom:13),u=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});l.setMinZoom(i?i.minZoom:5),l.setMaxZoom(i?i.maxZoom:20),u.addTo(l),ae(l,c,r,e,s,n,o,a)}function ee(t="myMap",e=5,r=20,n=13,o,a,i,s){const c=L.map(t).setView([39.46975,-.37739],n),l=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});c.setMinZoom(e),c.setMaxZoom(r),l.addTo(c),oe(c,o,a,i,re(),s)}function re(){return{listOfselectedElements:[],elementExist(t){return this.listOfselectedElements.filter((e=>e===t)).length>0},deleteElementOfList(t){const e=this.listOfselectedElements.indexOf(t);e>-1&&this.listOfselectedElements.splice(e,1)}}}function ne(t,e=0,n=1,o=2){const{Buffer:a}=r(8287),i=r(543),s={type:"FeatureCollection",features:[]},c=[],l=new Set;return t.forEach((t=>{const e=t[o];l.has(e)||(l.add(e),c.push(t))})),c.forEach((t=>{const r=i.Geometry.parse(a.from(t[o],"hex")),c={type:"Feature",properties:{objectoId:t[e],address:t[n]},geometry:r.toGeoJSON()};s.features.push(c)})),s}function oe(t,e,r,n,o,a){function i(t){return{iconUrl:ft(t),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[-3,-76]}}const s=L.icon(i(r)),c=L.icon(i(n));L.geoJSON(e,{onEachFeature:function(i,s){i.properties&&i.properties.address&&s.on("click",(()=>{o.elementExist(i.properties.objectoId)?o.deleteElementOfList(i.properties.objectoId):o.listOfselectedElements.push(i.properties.objectoId),a&&Dashboards.fireChange(a,o.listOfselectedElements),oe(t,e,r,n,o,a)}))},pointToLayer(t,e){let r=s;return o.elementExist(t.properties.objectoId)&&(r=c),L.marker(e,{icon:r})}}).addTo(t)}function ae(t,e,r,n,o,a,i,s){L.geoJSON(e,{onEachFeature(t,e){t.properties.address===i&&(Qt=e),function(t,e,r,n,o){const a=r.properties.address,i=r.properties.objectoId;r.properties&&a&&n.on("click",(()=>{const r=t.filter((t=>t[e.id]===i));o(r,a)}))}(r,n,t,e,s),function(t,e,r,n){const o=t.properties.address;r&&(e.on("mouseover",(()=>{e.bindPopup(o).openPopup()})),e.on("mouseout",(()=>{e.closePopup()}))),e.on("click",(()=>{Qt?(Qt.setStyle(n.unselected),e.setStyle(n.selected)):e.setStyle(n.selected),Qt=e}))}(t,e,o,a)},style:t=>t.properties.address===i?a.selected:a.unselected}).addTo(t)}function ie(t,e){document.querySelector("#tabPuntsMesuraCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{ee("idMapPuntsMesuraCiutat",5,20,14,ne(e.resultset,0,1,3),"build/images/mapas/marker-icon-vehiculos.svg/content","build/images/mapas/marker-icon-selected-vehiculos.svg/content","puntoMedidaLaneId")}))}))}function se(t,e){Tt(e,!0,-6,"TRÀNSIT DE VEHICLES: PUNTS DE MESURA DE LA CIUTAT","Vehicles","chartPuntsMesuraCiutat","no_dataPuntsMesuraCiutat")}function ce(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],c=wt(a.size),l=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Trafico-Bicicletas-Accesos-Anillo","KpiValid-365-Trafico-Bicicletas-Accesos-Anillo"],["Kpi-Trafico-Bicicletas-Accesos-Anillo"]),h={title:{text:"TRÀNSIT CICLISTA: ACCESSOS ANELL CICLISTA"},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:"Bicicletes",axisLabel:{formatter:v}},dataZoom:{show:!0,data:i,start:c},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAccessosAnellCiclista",u,h)}function le(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],c=wt(a.size),l=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Trafico-Bicicletas-Anillo","KpiValid-365-Trafico-Bicicletas-Anillo"],["Kpi-Trafico-Bicicletas-Anillo"]),h={title:{text:"TRÀNSIT CICLISTA: ANELL CICLISTA"},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:"Bicicletes",axisLabel:{formatter:v}},dataZoom:{show:!0,data:i,start:c},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAnellCiclista",u,h)}function ue(t,e){B("chartAnellBar","no_dataAnellBar",e.resultset,"Bicicletes","ANELL CICLISTA: HISTÒRIC ANUAL","")}function he(t,e){B("chartAccessosAnellBar","no_dataAccessosAnellBar",e.resultset,"Bicicletes","ACCESSOS ANELL CICLISTA: HISTÒRIC ANUAL","")}function fe(t,e){F("chartAnellMesActual","chartAnellMesAnterior","no_dataAnellMesActual","no_dataAnellMesAnterior",e.resultset,"ANELL CICLISTA: EVOLUCIÓ ","ANELL CICLISTA: EVOLUCIÓ ")}function pe(t,e){document.querySelector("#tabAccessosAnellCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartAccessosAnellMesActual","chartAccessosAnellMesAnterior","no_dataAccessosAnellMesActual","no_dataAccessosAnellMesAnterior",e.resultset,"ACCESSOS ANELL CICLISTA: EVOLUCIÓ ","ACCESSOS ANELL CICLISTA: EVOLUCIÓ ")}))}))}function de(t,e){G("chartAnellGaugeYear","no_dataAnellGaugeYear",e.resultset,"ANELL CICLISTA: EVOLUCIÓ ANY")}function ge(t,e){document.querySelector("#tabAccessosAnellCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{G("chartAccessosAnellGaugeYear","no_dataAcessosAnellGaugeYear",e.resultset,"ACCESSOS ANELL CICLISTA: EVOLUCIÓ ANY")}))}))}function me(t,e){Tt(e,!0,1,"ANELL CICLISTA: HISTÒRIC MENSUAL","Bicicletes","chartAnellLineMonth","no_dataAnellLineMonth",void 0,!0)}function ye(t,e){Tt(e,!0,1,"ACCESSOS ANELL CICLISTA: HISTÒRIC MENSUAL","Bicicletes","chartAccessosAnellLineMonth","no_dataAccessosAnellLineMonth",void 0,!0)}function Se(t,e){document.querySelector("#tabPuntsMesuraCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{ee("idMapPuntsMesuraCiclista",5,20,14,ne(e.resultset,0,1,3),"build/images/mapas/marker-icon-bicis.svg/content","build/images/mapas/marker-icon-selected-bicis.svg/content","puntoMedidaLaneId")}))}))}function Ae(t,e){Tt(e,!0,-6,"TRÀNSIT CICLISTA: PUNTS DE MESURA CICLISTA","Bicicletes","chartPuntsMesuraCiclista","no_dataPuntsMesuraCiclista")}function be(t,e){return{title:{text:t,padding:20,textStyle:{fontSize:16}},yAxis:{data:e.map((t=>t[0]))},label:{show:!0,position:[15,"35%"],formatter:"{b}",fontSize:10,align:"left",color:"#000"},grid:{top:"20%"},series:[{data:e.map((t=>t[1])),itemStyle:{color:t=>["#B7C258","#A3BF62","#8EBC6D","#7AB877","#65B581","#50B28B"][t.dataIndex]}}]}}const Ee={es_ES:new Map([["graficaUmbral","Vehiculos / hora"],["graficaIntensidadMensual","Mayor intensidad mensual"],["graficaIntensidadAnual","Mayor intensidad anual"]]),ca_ES:new Map([["graficaUmbral","Vehicles / hora"],["graficaIntensidadMensual","Major intensitat mensual"],["graficaIntensidadAnual","Major intensitat anual"]])};function Ie(r,n){const o=be(Ee[e].get("graficaIntensidadAnual"),n.resultset.reverse().map((t=>[t[0],t[1]])));(0,t.initBarChart)("chartIntensidadAnualCiclista",o)}function Me(r,n){const o=be(Ee[e].get("graficaIntensidadMensual"),n.resultset.reverse().map((t=>[t[0],t[1]])));(0,t.initBarChart)("chartIntensidadMensualCiclista",o)}function we(t,e){tt("chartIntensidadDiarialCiclista",W(e.resultset.map((([t,e])=>({name:t,value:e}))),"Major intensitat diària",void 0,["#4EA8DE","#FFBF69","#83C5BE","#E56B6F","#CDB4DB"]))}function ve(t,e){tt("chartIntensidadRealTimeCiclista",W(e.resultset.map((([t,e])=>({name:t,value:e}))),"Major intensitat darrera hora"))}const Te={weight:5,color:"#ADB4B7",opacity:1,fillColor:"#ADB4B7"},Ce={weight:5,color:"#9D8BB8",opacity:1,fillColor:"#9D8BB8"},De=t=>{tt("graficaRT",j(t,.2,.3,Ee[e].get("graficaUmbral")))};function Le(t,e){const r=document.querySelector("#textoNombreTramo"),n=document.querySelector("#textoHoraActualizacion"),o=document.querySelector("#textoFechaActualizacion"),a=document.querySelector("#dataDia"),i=document.querySelector("#dataMes"),s=document.querySelector("#dataAnyo"),c=t.filter((t=>t[1].includes("daily"))).map((t=>E(Math.round(t[3])))),l=t.filter((t=>t[1].includes("monthly"))).map((t=>E(Math.round(t[3])))),u=t.filter((t=>t[1].includes("annual"))).map((t=>E(Math.round(t[3])))),h=t.filter((t=>t[1].includes("rt"))).map((t=>({intensidad:E(Math.round(t[3])),fecha:t[5]})));r.textContent=e,a.textContent=c,i.textContent=l,s.textContent=u,De(h[0].intensidad),n.textContent=Mt(new Date(h[0].fecha)),o.textContent=Et(new Date(h[0].fecha))}function _e(t,e){const r=function(t){const e=t.map((t=>t[3])),r=Math.max(...e);return t.filter((t=>t[3]===r)).flat()[2]}(e.resultset);document.querySelector("#tabIntensidadCiclista").addEventListener("click",(()=>{const t=[];e.resultset.forEach((e=>{const r=function(t,e){const r=t.match(/_f\d{1,2}/);return r?e+r[0]:""}(e[1],e[2]);e.push(r),t.push(e)})),Le(e.resultset.filter((t=>t[2]===r)),r);const n={id:6,addres:2,location:4},o={minZoom:5,maxZoom:20,initialZoom:14},a={unselected:Te,selected:Ce};requestAnimationFrame((()=>{te("mapBicis",n,e.resultset,a,r,Le,o,!0)}))}))}function Ne(t,e){0===e.resultset.length?N("#chartUsuarisTotalsBarMonth","#no_dataUsuarisTotalsBarMonth"):(U("#no_dataUsuarisTotalsBarMonth","#chartUsuarisTotalsBarMonth"),tt("chartUsuarisTotalsBarMonth",V(e.resultset,"Viatges",void 0,"ÚS D'EMT. USUARIS TOTALS: EVOLUCIÓ MENSUAL","Nombre viatges EMT")))}let Ue,Oe,xe,Pe,Re={start:void 0,end:void 0},ke={start:void 0,end:void 0};function Be(t=null){let e=$("#formFilterDates").find("input");e=$("#formFilterDates").find("input"),$(e).each(((t,r)=>{r.checked&&(e[t].checked=!1)}));const r=$("#formFilterEMT1").find("input");if($(r).each(((t,e)=>{e.checked&&(r[t].checked=!1)})),t){const t=$("#formFilterEMT2").find("input");$(t).each(((e,r)=>{r.checked&&(t[e].checked=!1)}))}const n=$("#formFilterVar").find("input");$(n).each(((t,e)=>{e.checked&&(n[t].checked=!1)})),function(t){let e=0;const r=$("#formFilterDates").find("input");$(r).each((t=>{e+=1,r[t].checked=!0})),e=0;const n=$("#formFilterEMT1").find("input");$(n).each((t=>{e+=1,e<=6&&(n[t].checked=!0)}));const o=$("#formFilterEMT2").find("input");$(o).each((r=>{t&&t.includes(o[r].id)&&(e+=1,e<=6&&(o[r].checked=!0))})),e=0;const a=$("#formFilterVar").find("input");$(a).each((t=>{e+=1,e<=2&&(a[t].checked=!0)})),Dashboards.getParameterValue("filterDatesParam").length>0&&(Dashboards.fireChange("filterDatesParam"),render_echartAccessosCiutat.listeners=["filterDatesParam"],Dashboards.fireChange("filterDatesParam"),render_echartAccessosCiutat.listeners=[""]),Dashboards.getParameterValue("filterEMT2Param").length>0&&Dashboards.fireChange("filterEMT2Param"),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}(t)}function $e(){Ue&&([Re]=Ue.getOption().dataZoom);const t=$("#formFilterEMT1").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterEMT1Param",e),Dashboards.fireChange("updateFilterEMT1","True")}function Fe(){xe&&([ke]=xe.getOption().dataZoom);const t=$("#formFilterEMT2").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterEMT2Param",e),Dashboards.fireChange("updateFilterEMT2","True")}function Ge(t,e="number",r=null){let n;return"number"===e?n=new Map([...t].filter((([t])=>!Number.isNaN(Number(t))))):"includes"===e&&(n=new Map([...t].filter((([t])=>t.includes(r))))),n}function Ve(t){const e=Array.from(t.keys()).sort(((t,e)=>t-e)),r=new Map;return e.forEach((e=>{r.set(e,t.get(e))})),r}function ze(t,e,r=!1){const n=[],o=new Set,a=r?new Map:new Set;for(let i=0;i<e.length;i+=1)(0===t.length||t.includes(e[i][0]))&&(r?a.set(e[i][0],e[i][0]):a.add(e[i][0]),n.push({day:e[i][1],type:e[i][0],value:e[i][2]}),o.add(e[i][1]));return[a,n,Array.from(o.values())]}function je(t,e,r){const n=m.slice();return t.map((t=>{const o=e.filter((e=>e.type===t)),a=r.map((t=>{const e=o.findIndex((e=>e.day===t));return-1!==e?o[e].value:null}));return{name:t,type:"line",symbol:"circle",color:n.shift(),symbolSize:6,smooth:!1,data:a}}))}function We(t){const e={};t.forEach((t=>{const r=t.type,n=t.value;e[r]=(e[r]||0)+n}));const r=Object.keys(e).map((t=>({tipo:t,valor:e[t]})));return r.sort(((t,e)=>e.valor-t.valor)),r.map((t=>t.tipo))}function Ye(t,e,r,n,o){const a=Dashboards.getParameterValue("filterEMT1Param");if(0===r.length)N(`#${t}`,`#${e}`);else{U(`#${e}`,`#${t}`);const[i,s,c]=ze(a,r);if(!o){const t=We(s);!function(t,e){const r=$("#formFilterEMT1");""===Dashboards.getParameterValue("updateFilterEMT1")&&(e.forEach((t=>{r.append(`<input type="checkbox" id="${t}" class="titol-${t}" onclick="legacy.filterEMT1Update();" /> ${t} </br>`)})),Be(),T(),$e())}(t.length,t),a&&a.sort(((t,e)=>t.localeCompare(e)))}if(a){const r=k(je(a,s,c),a,c,"Viatges",o?I(c.length):wt(c.length),!0,-10,void 0,n,Re.start,Re.end);let i;o?(Oe=tt(t,r),i=Oe):(Ue=tt(t,r),i=Ue),0===$("#formFilterEMT1 :checked").length&&N(`#${t}`,`#${e}`),$(window).on("resize",(()=>{null!=i&&void 0!==i&&i.resize()}))}}}function Ze(t,e,r,n,o){const a=Dashboards.getParameterValue("filterEMT2Param");if(0===r.length)N(`#${t}`,`#${e}`);else{U(`#${e}`,`#${t}`);const[i,s,c]=ze(a,r,!0);if(!o){const t=Array.from(Ve(Ge(i,"number")).values());let e=[];(function(t){const e=[];return t.forEach(((t,r)=>{Array.from(r).forEach((t=>{!e.includes(t)&&Number.isNaN(Number(t))&&e.push(t)}))})),e})(i).forEach((t=>{e=e.concat(Array.from(Ve(function(t){const e=/\d+/g,r=new Map;return t.forEach((n=>{r.set(n.match(e),t.get(n))})),r}(Ge(i,"includes",t))).values()))}));let r=t.concat(e);r=[...new Set(r)];const n=We(s).slice(0,6);!function(t,e,r){const n=$("#formFilterEMT2");""===Dashboards.getParameterValue("updateFilterEMT2")&&(e.forEach((t=>{n.append(`<input type="checkbox" id="${t}" class="linea-${t}" onclick="legacy.filterEMT2Update();" />`)})),Be(r),T(),Fe())}(r.length,r,n)}if(a){const r=k(je(a,s,c),a,c,"Viatges",wt(c.length),!0,-10,void 0,n,ke.start,ke.end);let i;o?(Pe=tt(t,r),i=Pe):(xe=tt(t,r),i=xe),0===$("#formFilterEMT1 :checked").length&&N(`#${t}`,`#${e}`),$(window).on("resize",(()=>{null!=i&&void 0!==i&&i.resize()}))}}}function Je(){document.querySelector("#idFiltrar").style.visibility="visible"}function He(){document.querySelector("#idFiltrar").style.visibility="hidden"}function Ke(t,e){return t.filter((t=>e.includes(t[0])))}function qe(){const t=["filterDatesParam","updateFilter","filterEMT1Param","updateFilterEMT1"],e=["filterDatesParam","updateFilter","filterEMT2Param","updateFilterEMT2"];render_echartUsuarisPerLinea.listeners=e,render_echartUsuarisPerLiniaLineMonth.listeners=e,render_echartUsuarisPerLiniaGaugeYear.listeners=e,render_echartUsuarisPerLiniaGaugeMonth.listeners=e,render_echartUsuarisPerLiniaBarYear.listeners=e,render_echartUsuarisPerTitol.listeners=t,render_echartUsuarisPerTitolLineMonth.listeners=t,render_echartUsuarisPerTitolGaugeYear.listeners=t,render_echartUsuarisPerTitolGaugeMonth.listeners=t,render_echartUsuarisPerTitolBarYear.listeners=t,render_echartUsuarisTotals.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("filterEMT1Param"),Dashboards.fireChange("updateFilterEMT1"),Dashboards.fireChange("filterEMT2Param"),Dashboards.fireChange("updateFilterEMT2")}const Xe={es_ES:new Map([["chartUsuarisTotalsGaugeYear","USO DE EMT. USUARIOS TOTALES: ÚLTIMOS AÑOS"]]),ca_ES:new Map([["chartUsuarisTotalsGaugeYear","US D'EMT. USUARIS TOTALS: ÚLTIMS ANYS"]])},Qe={es_ES:new Map([["chartUsuarisTotalsGaugeMonth","USO DE EMT. USUARIOS TOTALES: MES ACTUAL"],["chartUsuarisTotalsGaugeLastMonth","USO DE EMT. USUARIOS TOTALES: MES ANTERIOR"]]),ca_ES:new Map([["chartUsuarisTotalsGaugeMonth","ÚS D'EMT. USUARIS TOTALS: MES ACTUAL"],["chartUsuarisTotalsGaugeLastMonth","ÚS D'EMT. USUARIS TOTALS: MES ANTERIOR"]])};function tr(t,e){Wt({idChart:"chartUsuarisTotalsGaugeYear",idNoData:"no_dataUsuarisTotalsGaugeYear",chartName:`${Xe[Ut].get("chartUsuarisTotalsGaugeYear")}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-100,paramCalculatedOffset:50,paramNumberOfElementsByLine:5},e)}function er(t,e){const r=Dashboards.getParameterValue("filterEMT1Param");if(r.length>0){const n=Ke(e.resultset,r);function o(){G("chartUsuarisTitolGaugeYear","no_dataUsuarisTitolGaugeYear",n,"ÚS D'EMT. USUARIS PER TÍTOL: ANY")}r.sort(((t,e)=>t.localeCompare(e))),0===document.querySelector("#chartUsuarisTitolGaugeYear").childElementCount?document.querySelector("#tabUsuarisPerTitol").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}}function rr(t,e){const r=Dashboards.getParameterValue("filterEMT2Param"),n=Ke(e.resultset,r);function o(){G("chartUsuarisLiniaGaugeYear","no_dataUsuarisLiniaGaugeYear",n,"ÚS D'EMT. USUARIS PER LÍNIA: ANY")}n.sort(((t,e)=>Number(t[0])-Number(e[0]))),0===document.querySelector("#chartUsuarisLiniaGaugeYear").childElementCount?document.querySelector("#tabUsuarisPerLinia").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}function nr(t,e){const r=Dashboards.getParameterValue("filterEMT1Param"),n=Ke(e.resultset,r);function o(){F("chartUsuarisTitolMesActual","chartUsuarisTitolMesAnterior","no_dataUsuarisTitolMesActual","no_dataUsuarisTitolMesAnterior",n,"ÚS D'EMT. USUARIS PER TÍTOL: EVOLUCIÓ ","ÚS D'EMT. USUARIS PER TÍTOL: EVOLUCIÓ ")}0===document.querySelector("#chartUsuarisTitolMesActual").childElementCount||0===document.querySelector("#chartUsuarisTitolMesAnterior").childElementCount?document.querySelector("#tabUsuarisPerTitol").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}function or(t,e){const r=Dashboards.getParameterValue("filterEMT2Param"),n=Ke(e.resultset,r);function o(){F("chartUsuarisLiniaMesActual","chartUsuarisLiniaMesAnterior","no_dataUsuarisLiniaMesActual","no_dataUsuarisLiniaMesAnterior",n,"ÚS D'EMT. USUARIS PER LÍNIA: EVOLUCIÓ ","ÚS D'EMT. USUARIS PER LÍNIA: EVOLUCIÓ ")}n.sort(((t,e)=>Number(t[0])-Number(e[0]))),0===document.querySelector("#chartUsuarisLiniaMesActual").childElementCount||0===document.querySelector("#chartUsuarisLiniaMesAnterior").childElementCount?document.querySelector("#tabUsuarisPerLinia").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}const ar={title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:12,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:void 0,itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:5,splitNumber:10,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:e=>(0,t.addPointInteger)(Math.round(e))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[0,"0%"],fontSize:17,fontWeight:"bolder",formatter:void 0,fontFamily:"Montserrat",color:"inherit"},data:void 0},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:40}};function ir(e,r){const n=r.resultset;if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,time:1,data:2},[o,a,i]=(0,t.configureDataGaugeMonthCommon)(e.idChart,n,r,0),s={...ar};s.title.text=e.chartName,s.series.max=o,s.series.detail.formatter=a,s.series.data=i,(0,t.initChart)(e.idChart,s)}}function sr(t,e){const r={idChart:"chartUsuarisTotalsGaugeMonth",idNoData:"no_dataUsuarisTotalsGaugeMonth",chartName:`${Qe[Ut].get("chartUsuarisTotalsGaugeMonth")}`},n={idChart:"chartUsuarisTotalsGaugeLastMonth",idNoData:"no_dataUsuarisTotalsGaugeLastMonth",chartName:`${Qe[Ut].get("chartUsuarisTotalsGaugeLastMonth")}`};ir(r,e),ir(n,e)}function cr(e,r){if(0===r.resultset.length)N("#chartUsuarisTotalsStackedBarYears","#no_dataUsuarisTotalsStackedBarYears");else{U("#no_dataUsuarisTotalsStackedBarYears","#chartUsuarisTotalsStackedBarYears");const e={title:{text:"ÚS D'EMT. USUARIS TOTALS: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nViatges"}};(0,t.initStackedBarChartMonthSeries)("chartUsuarisTotalsStackedBarYears",r.resultset,e)}}function lr(t,e){Tt(e,!0,1,"ÚS D'EMT: USUARIS TOTALS","Viatges","chartUsuarisTotals","no_dataUsuarisTotals",void 0,void 0,void 0,void 0,!1)}function ur(){He(),$("#idFieldsFilterEmtUsLinea").hide(),$("#idFieldsFilterEmtUsTitol").hide()}function hr(t,e){Ye("chartUsuarisPerTitol","no_dataUsuarisPerTitol",e.resultset,"ÚS D'EMT: USUARIS PER TÍTOL",!1)}function fr(){Je(),$("#idAllFilterFields").show(),$("#idFieldsFilterEmtUsLinea").hide(),$("#idFieldsFilterEmtUsTitol").show()}function pr(t,e){Ze("chartUsuarisPerLinea","no_dataUsuarisPerLinea",e.resultset,"ÚS D'EMT: USUARIS PER LÍNIA",!1)}function dr(){He(),$("#idAllFilterFields").show(),$("#idFieldsFilterEmtUsLinea").show(),$("#idFieldsFilterEmtUsTitol").hide()}function gr(t,e){Ye("chartUsuarisTitolLineMonth","no_dataUsuarisTitolLineMonth",e.resultset,"ÚS D'EMT. USUARIS PER TÍTOL: HISTÒRIC MENSUAL",!0)}function mr(t,e){Ze("chartUsuarisLiniaLineMonth","no_dataUsuarisLiniaLineMonth",e.resultset,"ÚS D'EMT. USUARIS PER LÍNIA: HISTÒRIC MENSUAL",!0)}function yr(t,e){const r=Dashboards.getParameterValue("filterEMT1Param");B("chartUsuarisTitolBar","no_dataUsuarisTitolBar",Ke(e.resultset,r),"Viatges","ÚS D'EMT. USUARIS PER TÍTOL: HISTÒRIC ANUAL","")}function Sr(t,e){const r=Dashboards.getParameterValue("filterEMT2Param");B("chartUsuarisLiniaBar","no_dataUsuarisLiniaBar",Ke(e.resultset,r),"Viatges","ÚS D'EMT. USUARIS PER LÍNIA: HISTÒRIC ANUAL","")}function Ar(){render_echartPM10.listeners=["filterDatesParam","updateFilter"],render_echartPM1.listeners=["filterDatesParam","updateFilter"],render_echartPM25.listeners=["filterDatesParam","updateFilter"],render_echartO3.listeners=["filterDatesParam","updateFilter"],render_echartSO2.listeners=["filterDatesParam","updateFilter"],render_echartNO2.listeners=["filterDatesParam","updateFilter"],render_echartNO.listeners=["filterDatesParam","updateFilter"],render_echartNOX.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter")}function br(t,e,r,n,o,a){return{title:{text:n},legend:{show:!0,data:e},xAxis:{type:"category",data:t},yAxis:{name:o,nameTextStyle:{padding:[-25,0,0,-22]},axisLabel:{formatter:v}},dataZoom:{show:a,data:t,start:r},toolbox:{show:!0}}}function Er(t,e,r,n,o,a){return{grid:{left:"5",right:"0",bottom:"0",top:"200"},title:{text:n},legend:{show:!0,data:e},xAxis:{type:"category",data:t,axisLabel:{margin:15}},yAxis:{name:o,nameGap:"25",nameTextStyle:{padding:[0,0,0,-28],align:"left"},axisLabel:{formatter:v,align:"right",padding:[0,0,0,0]}},dataZoom:{show:a,data:t,start:r},toolbox:{show:!1}}}function Ir(t,e){$r(e,"µg/m3","echartNO2Portada","CONTAMINACIÓ NO2",!1,!0),TEXTS_GAUGE_YEAR[DEFAULT_LANGUAGE].get("tituloGrafica"),legendData,xAxisData,maxValue}function Mr(t,e){$r(e,"µg/m3","chartNO2CEAM","CONTAMINACIÓ NO2\nEstacions CEAM")}function wr(t,e){Fr(e,"µg/m3","chartNO2PRESUPUESTO","CONTAMINACIÓ NO2\nEstacions de Pressupostos Participatius")}function vr(t,e){$r(e,"µg/m3","chartNOCEAM","CONTAMINACIÓ NO\nEstacions CEAM")}function Tr(t,e){Fr(e,"µg/m3","chartNOPRESUPUESTO","CONTAMINACIÓ NO\nEstacions de Pressupostos Participatius")}function Cr(t,e){$r(e,"µg/m3","chartNOXCEAM","CONTAMINACIÓ NOX\nEstacions CEAM")}function Dr(t,e){Fr(e,"µg/m3","chartNOXPRESUPUESTO","CONTAMINACIÓ NOX\nEstacions de Pressupostos Participatius")}function Lr(t,e){$r(e,"µg/m3","chartPM10CEAM","CONTAMINACIÓ PM10\nEstacions CEAM")}function _r(t,e){Fr(e,"µg/m3","chartPM10PRESUPUESTO","CONTAMINACIÓ PM10\nEstacions de Pressupostos Participatius")}function Nr(t,e){$r(e,"µg/m3","chartPM1CEAM","CONTAMINACIÓ PM1\nEstacions CEAM")}function Ur(t,e){Fr(e,"µg/m3","chartPM1PRESUPUESTO","CONTAMINACIÓ PM1\nEstacions de Pressupostos Participatius")}function Or(t,e){$r(e,"µg/m3","chartPM25CEAM","CONTAMINACIÓ PM2,5\nEstacions CEAM")}function xr(t,e){Fr(e,"µg/m3","chartPM25PRESUPUESTO","CONTAMINACIÓ PM25\nEstacions de Pressupostos Participatius")}function Pr(t,e){$r(e,"µg/m3","chartO3CEAM","CONTAMINACIÓ O3\nEstacions CEAM")}function Rr(t,e){Fr(e,"µg/m3","chartO3PRESUPUESTO","CONTAMINACIÓ O3\nEstacions de Pressupostos Participatius")}function kr(t,e){$r(e,"µg/m3","chartSO2CEAM","CONTAMINACIÓ SO2\nEstacions CEAM")}function Br(t,e){Fr(e,"µg/m3","chartSO2PRESUPUESTO","CONTAMINACIÓ SO2\nEstacions de Pressupostos Participatius")}function $r(e,r,n,o="Estaciones CEAM ",a=!0,i=!1){const s=m.slice(),c=X(e.resultset||e,s,!1),l=c[1],u=Array.from(l.values()),h=c[2],f=wt(l.size),p=(0,t.resultsetWithFields)(e),d=(0,t.configureDataValidate)(p,c[0],["A01_AVFRANCIA_24h_va","A02_BULEVARDSUD_24h_vm","A07_VALENCIACENTRE_24h_va","A09_CABANYAL_24h_va","A05_POLITECNIC_24h_vm","A01_AVFRANCIA_24h_vm","A03_MOLISOL_24h_va","A03_MOLISOL_24h_vm","A06_VIVERS_24h_va","A04_PISTASILLA_24h_vm","A02_BULEVARDSUD_24h_va","A04_PISTASILLA_24h_va"],["A05_POLITECNIC_24h","A03_MOLISOL_24h","A01_AVFRANCIA_24h","A06_VIVERS_24h","A04_PISTASILLA_24h","A09_CABANYAL_24h","A07_VALENCIACENTRE_24h","A02_BULEVARDSUD_24h"]);if(!1===i){const e=br(u,h,f,o,r,a);(0,t.configureLinesChartValidates)(n,d,e)}else{const e=Er(u,h,f,o,r,a);(0,t.configureLinesChartValidates)(n,d,e)}}function Fr(e,r,n,o){e=function(t){return t.resultset=t.resultset.map((t=>(t[0]=t[0].replace(/^A\d{2}_/,""),t))),t}(e);const a=m.slice(),i=X(e.resultset||e,a,!1),s=i[1],c=Array.from(s.values()),l=i[2],u=wt(s.size),h=(0,t.resultsetWithFields)(e),f=(0,t.configureDataValidate)(h,i[0],[],["A08_DR_LLUCH_24h","A10_OLIVERETA_24h","A11_PATRAIX_24h"]),p=br(c,l,u,o,r);(0,t.configureLinesChartValidates)(n,f,p)}r(5606);const Gr=-20;function Vr(t,e,r,n){const o=O(t,n),a=Object.keys(o),i=new Set(t.map((t=>t[e])));return i.forEach((t=>{a.forEach((n=>{void 0===o[n].find((r=>r[e]===t))&&o[n].push([o[n][0][0],t,n,void 0,o[n][0][r]])}))})),a.forEach((t=>{o[t].sort(((t,r)=>{const n=t[e].split("/").reverse().join(""),o=r[e].split("/").reverse().join("");return n.localeCompare(o)}))})),[o,i]}function zr(t,e,r,n,o,a,i,s,c,l=""){const u=k(t,e,r,n,o,a,c,void 0,l);return u.yAxis.nameTextStyle.align="left",delete u.yAxis.axisLabel.margin,u.yAxis.max=i,u.yAxis.min=s,delete u.toolbox.show,u}function jr(){render_echartMestalla.listeners=["filterDatesParam","updateFilter"],render_echartMalilla.listeners=["filterDatesParam","updateFilter"],render_echartPerellonet.listeners=["filterDatesParam","updateFilter"],render_echartExposicio.listeners=["filterDatesParam","updateFilter"],render_echartSotenis.listeners=["filterDatesParam","updateFilter"],render_echartBeninamet.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter")}const Wr=-20;function Yr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartBenimamet").hide(),$("#chartBenimametStacked").hide(),$("#no_dataBeninamet").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataBeninamet").show();else{$("#no_dataBeninamet").hide(),$("#chartBenimamet").css("background","#ffffff"),$("#chartBenimametStacked").css("background","#ffffff"),$("#chartBenimamet").show(),$("#chartBenimametStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE BENIMÀMET",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Benimamet"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null)}const M=wt(a.size),w=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartBenimamet",zr([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],w,Array.from(a.values()),p[0].measureunit,M,!0,null,0,Wr,t)),tt("chartBenimametStacked",zr([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],w,Array.from(a.values()),"%",M,!0,100,0,Wr,t))}}function Zr(t,e){let r=e.resultset.filter((t=>"València Ciutat"!==t[1]));r=r.map((t=>t.slice(1))),Tt(r,!0,1,"INJECCIÓ D'AIGUA PER BARRIS","m3","chartConsumAguaBarris","no_dataConsumAguaBarris")}function Jr(t,e){let r=e.resultset.filter((t=>"kpi-valencia-ciudad-total"===t[0]));r=r.map((t=>t.slice(1))),Tt(r,!0,1,"INJECCIÓ TOTAL D'AIGUA: EVOLUCIÓ DIÀRIA","m3","chartConsumTotalAgua","no_dataConsumTotalAgua",void 0,void 0,void 0,void 0,!1)}const Hr=-20;function Kr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartExposicio").hide(),$("#chartExposicioStacked").hide(),$("#no_dataExposicio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExposicio").show();else{$("#no_dataExposicio").hide(),$("#chartExposicio").css("background","#ffffff"),$("#chartExposicioStacked").css("background","#ffffff"),$("#chartExposicio").show(),$("#chartExposicioStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE EXPOSICIÓ",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Exposicio"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=0,m=0,y=0,S=0)}const M=wt(a.size),w=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartExposicio",zr([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],w,Array.from(a.values()),p[0].measureunit,M,!0,null,0,Hr,t)),tt("chartExposicioStacked",zr([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],w,Array.from(a.values()),"%",M,!0,100,0,Hr,t))}}const qr=-20;function Xr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartMalilla").hide(),$("#chartMalillaStacked").hide(),$("#no_dataMalilla").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataMalilla").show();else{$("#no_dataMalilla").hide(),$("#chartMalilla").css("background","#ffffff"),$("#chartMalillaStacked").css("background","#ffffff"),$("#chartMalilla").show(),$("#chartMalillaStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE MALILLA",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Malilla"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=0,m=0,y=0,S=0):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null)}const M=wt(a.size),w=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartMalilla",zr([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],w,Array.from(a.values()),p[0].measureunit,M,!0,null,0,qr,t)),tt("chartMalillaStacked",zr([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],w,Array.from(a.values()),"%",M,!0,100,0,qr,t))}}const Qr=-20;function tn(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length)$("#chartMestalla").hide(),$("#chartMestallaStacked").hide(),$("#no_dataMestalla").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataMestalla").show();else{$("#no_dataMestalla").hide(),$("#chartMestalla").css("background","#ffffff"),$("#chartMestallaStacked").css("background","#ffffff"),$("#chartMestalla").show(),$("#chartMestallaStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE MESTALLA",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Mestalla"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));else{for(let t=0;t<o;t+=1)"Mestalla"===n[t][6]&&("Industrial"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),s.push(n[t][8]),h+=n[t][8]),"Domèstic"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),c.push(n[t][8]),h+=n[t][8]),"Serv.Municipal"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),l.push(n[t][8]),h+=n[t][8]),"Aigua no registrada per comptadors"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),u.push(n[t][8]),h+=n[t][8]),a.add(n[t][3]),i.push(n[t][4]));dt(i.length,i)}let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=0,m=0,y=0,S=0)}const M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"],w=[{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],v=wt(a.size);tt("chartMestalla",zr(w,M,Array.from(a.values()),p[0].measureunit,v,!0,null,0,Qr,t)),tt("chartMestallaStacked",zr([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],M,Array.from(a.values()),"%",v,!0,100,0,Qr,t))}}const en=-20;function rn(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartPerellonet").hide(),$("#chartPerellonetStacked").hide(),$("#no_dataPerellonet").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataPerellonet").show();else{$("#no_dataPerellonet").hide(),$("#chartPerellonet").css("background","#ffffff"),$("#chartPerellonetStacked").css("background","#ffffff"),$("#chartPerellonet").show(),$("#chartPerellonetStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE PERELLONET",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Perellonet"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=0,m=0,y=0,S=0)}const M=wt(a.size),w=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"],v=[{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}];tt("chartPerellonet",zr([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],w,Array.from(a.values()),p[0].measureunit,M,!0,null,0,en,t)),tt("chartPerellonetStacked",zr(v,w,Array.from(a.values()),"%",M,!0,100,0,en,t))}}const nn=-20;function on(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartSotenis").hide(),$("#chartSotenisStacked").hide(),$("#no_dataSotenis").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataSotenis").show();else{$("#no_dataSotenis").hide(),$("#chartSotenis").css("background","#ffffff"),$("#chartSotenisStacked").css("background","#ffffff"),$("#chartSotenis").show(),$("#chartSotenisStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE SOTERNES",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],c=[],l=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Soternes"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],I=[];s=[],c=[],l=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),c.push(g),l.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),I.push(S),h=0,g=null,m=null,y=null,S=null)}const M=wt(a.size),w=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartSotenis",zr([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l}],w,Array.from(a.values()),p[0].measureunit,M,!0,null,0,nn,t)),tt("chartSotenisStacked",zr([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:I},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],w,Array.from(a.values()),"%",M,!0,100,0,nn,t))}}function an(t,e){0===e.resultset.length?N("#chartAiguaTotalBarMonth","#no_dataAiguaTotalBarMonth"):(U("#no_dataAiguaTotalBarMonth","#chartAiguaTotalBarMonth"),tt("chartAiguaTotalBarMonth",V(e.resultset,"m3",void 0,"INJECCIÓ TOTAL D'AIGUA: EVOLUCIÓ MENSUAL","València Ciutat")))}function sn(t,e){if(0===e.resultset.length)N("#chartYearAiguaTotalgauge_semicircle","#no_dataYearAiguaTotalgauge_semicircle");else{U("#no_dataYearAiguaTotalgauge_semicircle","#chartYearAiguaTotalgauge_semicircle");const t=P("chartYearAiguaTotalgauge_semicircle");tt("chartYearAiguaTotalgauge_semicircle",J(e.resultset,"INJECCIÓ TOTAL D'AIGUA: ÚLTIMS ANYS",t))}}function cn(t,e){if(0===e.resultset.length)N("#chartAiguaTotalreloj_semicircle","#no_dataAiguaTotalreloj_semicircle"),N("#chartAiguaTotalreloj_semicircle_lastmonth","#no_dataAiguaTotalreloj_semicircle_lastmonth");else{U("#no_dataAiguaTotalreloj_semicircle","#chartAiguaTotalreloj_semicircle"),U("#no_dataAiguaTotalreloj_semicircle_lastmonth","#chartAiguaTotalreloj_semicircle_lastmonth");const t=0,r=1,n=e.resultset,o=P("chartAiguaTotalreloj_semicircle");tt("chartAiguaTotalreloj_semicircle",H(n,t,"INJECCIÓ TOTAL D'AIGUA: MES ACTUAL",o)),tt("chartAiguaTotalreloj_semicircle_lastmonth",H(n,r,"INJECCIÓ TOTAL D'AIGUA: MES ANTERIOR",o))}}function ln(e,r){if(0===r.resultset.length)N("#chartAiguaTotalstackedBarYears","#no_dataAiguaTotalstackedBarYears");else{U("#no_dataAiguaTotalstackedBarYears","#chartAiguaTotalstackedBarYears");const e={title:{text:"INJECCIÓ TOTAL D'AIGUA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nm3"}};(0,t.initStackedBarChartMonthSeries)("chartAiguaTotalstackedBarYears",r.resultset,e)}}function un(t,e){B("chartBarrisBar","no_dataBarrisBar",e.resultset,"m3","INJECCIÓ D'AIGUA PER BARRIS: HISTÒRIC ANUAL","")}function hn(t,e){Tt(e,!0,1,"INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ: HISTÒRIC MENSUAL","m3","chartBarrisLineMonth","no_dataBarrisLineMonth",void 0,!0,void 0,void 0,void 0,void 0,!0)}const fn={es_ES:new Map([["chartNameBarrisGaugeYear","INYECCIÓN DE AGUA POR BARRIOS: EVOLUCIÓN DEL AÑO"]]),ca_ES:new Map([["chartNameBarrisGaugeYear","INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ANY"]])};function pn(t,e){document.querySelector("#tabConsumAguaBarris").addEventListener("click",(()=>{requestAnimationFrame((()=>{Wt({idChart:"chartBarrisGaugeYear",idNoData:"no_dataBarrisGaugeYear",chartName:`${fn[Ut].get("chartNameBarrisGaugeYear")} ${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-100,paramCalculatedOffset:100,paramNumberOfElementsByLine:3},e)}))}))}function dn(t,e){document.querySelector("#tabConsumAguaBarris").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartBarrisMesActual","chartBarrisMesAnterior","no_dataBarrisMesActual","no_dataBarrisMesAnterior",e.resultset,"INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ","INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ")}))}))}function gn(t,e){if(0===e.resultset.length)N("#chartKgsResidus","#no_dataKgsResidus");else{U("#no_dataKgsResidus","#chartKgsResidus");const t="KGS. DE RESIDUS EN CONTENIDORS: EVOLUCIÓ DIÀRIA",r="KGS. DE RESIDUS EN MOBLES: EVOLUCIÓ DIÀRIA",n=e.resultset,o=0,a=1,i=2,s=3,c=new Map,l=new Map;let u=[],h=[];n.forEach((t=>{"Contenidor"===t[i]&&"total"===t[a]&&c.set(t[o],t[s]),"Moble"===t[i]&&l.set(t[o],t[s])})),u=Nt(c),h=Nt(l);const f=wt(u[0].length),p=wt(h[0].length),d=-30,g=[{name:"Contenidor",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u[1]}],m=[{name:"Moble",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:h[1]}];tt("chartKgsResidus",k(g,null,u[0],"Kgs",f,!0,d,void 0,t)),tt("chartKgsResidusMoble",k(m,null,h[0],"Kgs",p,!0,d,void 0,r))}}function mn(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const yn=["#0077b6","#ffc300","#55828b","#a26769","#b1a7a6","#38b000"],Sn=yn.slice(0,-2).concat(yn.slice(-1));function An(t,e){Tt(e,!0,0,"DESAGREGACIÓ KGS. CONTENIDORS PER TIPUS DE RESIDUS","Kgs","chartDesKgsPerTipusResidu","no_dataDesKgsPerTipusResidu",void 0,void 0,void 0,void 0,void 0,yn)}const bn={es_ES:new Map([["chartResidusContenidorstackedBarYears","KGS. DE RESIDUOS EN CONTENEDORES: DESGLOSE DE LOS ÚLTIMOS AÑOS"],["chartResidusMoblesstackedBarYears","KGS. DE RESIDUOS EN MUEBLES: DESGLOSE DE LOS ÚLTIMOS AÑOS"],["chartDesKgsHorStackedBar","KGS. DE RESIDUOS DE RECICLAJE: HISTORICO ANUAL"]]),ca_ES:new Map([["chartResidusContenidorstackedBarYears","KGS. DE RESIDUS EN CONTENIDORS: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["chartResidusMoblesstackedBarYears","KGS. DE RESIDUS EN MOBLES: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["chartDesKgsHorStackedBar","KGS. DE RESIDUS DE RECICLATGE: HISTÒRIC ANUAL"]])};function En(e,r){function n(e,n,o){if(0===r.resultset.length)(0,t.printNoDataChart)(`#${e}`,`#${n}`);else{const r={title:{text:bn[Ut].get(e)},xAxis:{name:"\n\n\n\nKgs"}};(0,t.initStackedBarChartMonthSeries)(e,o,r)}}const o=(0,t.splitDataset)(r.resultset),a=o.Cont,i=o.Mob;n("chartResidusContenidorstackedBarYears","no_dataResidusContenidorstackedBarYears",a),n("chartResidusMoblesstackedBarYears","no_dataResidusMoblesstackedBarYears",i)}function In(e,r){const n="chartDesKgsHorStackedBar",o="no_dataDesKgsHorStackedBar";if(0===r.resultset.length)(0,t.printNoDataChart)(`#${n}`,`#${o}`);else{(0,t.printDataChart)(`#${o}`,`#${n}`);const e={title:{text:bn[Ut].get(n)},color:Sn,xAxis:{name:"\n\n\n\nKgs"}};(0,t.initStackedBarChart)(n,r.resultset,e)}}function Mn(t,e){B("chartDesKgsStackedBar","no_dataDesKgsStackedBar",e.resultset,"Kgs","KGS. DE RESIDUS DE RECICLATGE: HISTÒRIC MENSUAL",void 0,void 0,void 0,void 0,Sn)}function wn(t,e){if(0===e.resultset.length)N("#chartResidusContenidorreloj_semicircle","#no_dataResidusContenidorreloj_semicircle"),N("#chartResidusContenidorreloj_semicircle_lastmonth","#no_dataResidusContenidorreloj_semicircle_lastmonth"),N("#chartResidusMoblesreloj_semicircle","#no_dataResidusMoblesreloj_semicircle"),N("#chartResidusMoblesreloj_semicircle_lastmonth","#no_dataResidusMoblesreloj_semicircle_lastmonth");else{U("#no_dataResidusContenidorreloj_semicircle","#chartResidusContenidorreloj_semicircle"),U("#no_dataResidusContenidorreloj_semicircle_lastmonth","#chartResidusContenidorreloj_semicircle_lastmonth"),U("#no_dataResidusMoblesreloj_semicircle","#chartResidusMoblesreloj_semicircle"),U("#no_dataResidusMoblesreloj_semicircle_lastmonth","#chartResidusMoblesreloj_semicircle_lastmonth");const t=0,r=1,n=mn(e.resultset),o=n.Cont,a=n.Mob,i=P("chartResidusContenidorreloj_semicircle");tt("chartResidusContenidorreloj_semicircle",H(o,t,"KGS. DE RESIDUS EN CONTENIDORS: MES ACTUAL",i)),tt("chartResidusContenidorreloj_semicircle_lastmonth",H(o,r,"KGS. DE RESIDUS EN CONTENIDORS: MES ANTERIOR",i)),tt("chartResidusMoblesreloj_semicircle",H(a,t,"KGS. DE RESIDUS EN MOBLES: MES ACTUAL",i)),tt("chartResidusMoblesreloj_semicircle_lastmonth",H(a,r,"KGS. DE RESIDUS EN MOBLES: MES ANTERIOR",i))}}function vn(t,e){if(0===e.resultset.length)N("#chartYearResidusContenidorgauge_semicircle","#no_dataYearResidusContenidorgauge_semicircle"),N("#chartYearResidusMoblesgauge_semicircle","#no_dataYearResidusMoblesgauge_semicircle");else{U("#no_dataYearResidusContenidorgauge_semicircle","#chartYearResidusContenidorgauge_semicircle"),U("#no_dataYearResidusMoblesgauge_semicircle","#chartYearResidusMoblesgauge_semicircle");const t=mn(e.resultset,!1),r=t.Cont,n=t.Mob,o=P("chartYearResidusContenidorgauge_semicircle");tt("chartYearResidusContenidorgauge_semicircle",J(r,"KGS. DE RESIDUS EN CONTENIDORS: ÚLTIMS ANYS",o)),tt("chartYearResidusMoblesgauge_semicircle",J(n,"KGS. DE RESIDUS EN MOBLES: ÚLTIMS ANYS",o))}}function Tn(t,e){if(0===e.resultset.length)N("#chartDesKgsGauge","#no_dataDesKgsPie");else{U("#no_dataDesKgsPie","#chartDesKgsGauge");const t=e.resultset;document.querySelector("#idDesKgs").addEventListener("click",(()=>{requestAnimationFrame((()=>{const e=P("chartDesKgsGauge"),r=Ct(t,e);tt("chartDesKgsGauge",Z("KGS. DE RESIDUS RSU RESTA: ÚLTIMS ANYS",r[0],r[1],e))}))}))}}function Cn(t,e){if(0===e.resultset.length)N("#chartResidusContenidorBarMonth","#no_dataResidusContenidorBarMonth");else{U("#no_dataResidusContenidorBarMonth","#chartResidusContenidorBarMonth");const t=mn(e.resultset),r=t.Cont,n=t.Mob;tt("chartResidusContenidorBarMonth",V(r,"Kgs",void 0,"KGS. DE RESIDUS EN CONTENIDORS: EVOLUCIÓ MENSUAL","Contenidor")),tt("chartResidusMoblesBarMonth",V(n,"Kgs",void 0,"KGS. DE RESIDUS EN MOBLES: EVOLUCIÓ MENSUAL","Moble"))}}function Dn(t,e){0===e.resultset.length?N("#chartDesKgsBar","#no_dataDesKgsBar"):(U("#no_dataDesKgsBar","#chartDesKgsBar"),tt("chartDesKgsBar",V(e.resultset,"Kgs",void 0,"KGS. DE RESIDUS RSU RESTA: HISTÒRIC MENSUAL","RSU Resta")))}function Ln(t,e){if(0===e.resultset.length)N("#chartDesKgsPie","#no_dataDesKgsPie");else{U("#no_dataDesKgsPie","#chartDesKgsPie");const t=e.resultset,r=[],n=0,o=1,a=2;for(let e=0;e<t.length;e+=1)r.push({value:t[e][o],name:t[e][n]});document.querySelector("#idDesKgs").addEventListener("click",(()=>{requestAnimationFrame((()=>{const e=P("chartDesKgsPie");tt("chartDesKgsPie",Y(`KGS. DE RESIDUS DE RECICLATGE: DISTRIBUCIÓ ANY ${t[0][a]}`,r,e+5,Sn))}))}))}}const _n={es_ES:new Map([["TittleAccChart","EVOLUCIÓN DIARIA ACCESOS A LA SEDE ELECTRÓNICA"],["Acces","Accesos"],["TittleInstancesChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN DIARIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instancias"],["TittleInstancesYearlyChart","INSTANCIAS SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleAccessYearlyChart","ACCESOS A LA SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleInstancesMonthlyChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleAccessMonthlyChart","ACCESOS A SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleInstancesPrevYearsChart","INSTANCIAS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleAccessPrevYearsChart","ACCESOS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleInstancesCurrMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESOS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESOS SEDE ELECTRÓNICA: MES ANTERIOR"]]),ca_ES:new Map([["TittleAccChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["Acces","Accessos"],["TittleInstancesChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instàncies"],["TittleInstancesYearlyChart","INSTÀNCIES SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleAccessYearlyChart","ACCESSOS A SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleInstancesMonthlyChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleAccessMonthlyChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleInstancesPrevYearsChart","INSTÀNCIES SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleAccessPrevYearsChart","ACCESSOS A SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleInstancesCurrMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESSOS SEU ELECTRÒNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESSOS A SEU ELECTRÒNICA: MES ANTERIOR"]])};function Nn(t,r){if(0===r.resultset.length)N("#chartSeuElectronica","#no_dataSeuElectronica");else{U("#no_dataSeuElectronica","#chartSeuElectronica");const t=r.resultset,n=r.resultset.length,o=new Set,a=[];for(let e=0;e<n;e+=1)o.add(t[e][0]),a.push(t[e][1]);const i=wt(o.size);tt("chartSeuElectronica",k([{name:_n[e].get("Acces"),type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:a}],null,Array.from(o.values()),_n[e].get("Acces"),i,!0,p,void 0,_n[e].get("TittleAccChart")))}}function Un(t,r){if(0===r.resultset.length)N("#chartInstanciesSeuElectronica","#no_dataInstanciesSeuElectronica");else{U("#no_dataInstanciesSeuElectronica","#chartInstanciesSeuElectronica");const t=r.resultset,n=r.resultset.length,o=new Set,a=[],i=[];for(let e=0;e<n;e+=1)o.add(yt(t[e][0])),a.push(yt(t[e][0])),i.push(t[e][1]);const s=wt(o.size);tt("chartInstanciesSeuElectronica",k([{name:_n[e].get("InstancesChartText"),type:"line",symbol:"circle",symbolSize:6,smooth:!1,itemStyle:{color:"#3f02f7"},data:i}],null,Array.from(o.values()),_n[e].get("Instances"),s,!0,20,void 0,_n[e].get("TittleInstancesChart")))}}function On(t,r){0===r.resultset.length?N("#chartInstancesSeuElectronica_BarMonth","#no_dataInstancesSeuElectronica_BarMonth"):(U("#no_dataInstancesSeuElectronica_BarMonth","#chartInstancesSeuElectronica_BarMonth"),tt("chartInstancesSeuElectronica_BarMonth",V(r.resultset,_n[e].get("Instances"),void 0,_n[e].get("TittleInstancesMonthlyChart"),_n[e].get("InstancesChartText"))))}function xn(t,r){0===r.resultset.length?N("#chartSeuElectronica_BarMonth","#no_dataSeuElectronica_BarMonth"):(U("#no_dataSeuElectronica_BarMonth","#chartSeuElectronica_BarMonth"),tt("chartSeuElectronica_BarMonth",V(r.resultset,_n[e].get("Acces"),void 0,_n[e].get("TittleAccessMonthlyChart"))))}function Pn(t,r){if(0===r.resultset.length)N("#chartYearInstancesSeuElectronica_gauge_semicircle","#no_dataYearInstancesSeuElectronica_gauge_semicircle");else{U("#no_dataYearInstancesSeuElectronica_gauge_semicircle","#chartYearInstancesSeuElectronica_gauge_semicircle");const t=P("chartYearSeuElectronica_gauge_semicircle");tt("chartYearInstancesSeuElectronica_gauge_semicircle",J(r.resultset,_n[e].get("TittleInstancesPrevYearsChart"),t))}}function Rn(t,r){if(0===r.resultset.length)N("#chartYearSeuElectronica_gauge_semicircle","#no_dataYearSeuElectronica_gauge_semicircle");else{U("#no_dataYearSeuElectronica_gauge_semicircle","#chartYearSeuElectronica_gauge_semicircle");const t=P("chartYearSeuElectronica_gauge_semicircle");tt("chartYearSeuElectronica_gauge_semicircle",J(r.resultset,_n[e].get("TittleAccessPrevYearsChart"),t))}}function kn(t,r){if(0===r.resultset.length)N("#chartInstancesSeuElectronica_reloj_semicircle","#no_dataInstancesSeuElectronica_reloj_semicircle"),N("#chartInstancesSeuElectronica_reloj_semicircle_lastmonth","#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth");else{U("#no_dataInstancesSeuElectronica_reloj_semicircle","#chartInstancesSeuElectronica_reloj_semicircle"),U("#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth","#chartInstancesSeuElectronica_reloj_semicircle_lastmonth");const t=0,n=1,o=r.resultset,a=P("chartSeuElectronica_reloj_semicircle");tt("chartInstancesSeuElectronica_reloj_semicircle",H(o,t,_n[e].get("TittleInstancesCurrMonth"),a)),tt("chartInstancesSeuElectronica_reloj_semicircle_lastmonth",H(o,n,_n[e].get("TittleInstancesPrevMonth"),a))}}function Bn(t,r){if(0===r.resultset.length)N("#chartSeuElectronica_reloj_semicircle","#no_dataSeuElectronica_reloj_semicircle"),N("#chartSeuElectronica_reloj_semicircle_lastmonth","#no_dataSeuElectronica_reloj_semicircle_lastmonth");else{U("#no_dataSeuElectronica_reloj_semicircle","#chartSeuElectronica_reloj_semicircle"),U("#no_dataSeuElectronica_reloj_semicircle_lastmonth","#chartSeuElectronica_reloj_semicircle_lastmonth");const t=0,n=1,o=r.resultset,a=P("chartSeuElectronica_reloj_semicircle");tt("chartSeuElectronica_reloj_semicircle",H(o,t,_n[e].get("TittleAccessCurrMonth"),a)),tt("chartSeuElectronica_reloj_semicircle_lastmonth",H(o,n,_n[e].get("TittleAccessPrevMonth"),a))}}function $n(e,r){if(0===r.resultset.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{const n={title:{text:e.chartName},xAxis:{name:`\n\n\n\n${e.yAxisName}`}};(0,t.initStackedBarChartMonthSeries)(e.idChart,r.resultset,n)}}function Fn(t,e){$n({idChart:"chartInstancesSeuElectronica_stackedBarYears",idNoData:"no_dataInstancesSeuElectronica_stackedBarYears",chartName:_n[Ut].get("TittleInstancesYearlyChart"),yAxisName:_n[Ut].get("Instances")},e)}function Gn(t,e){$n({idChart:"chartSeuElectronica_stackedBarYears",idNoData:"no_dataSeuElectronica_stackedBarYears",chartName:_n[Ut].get("TittleAccessYearlyChart"),yAxisName:_n[Ut].get("Acces")},e)}function Vn(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataInstanciesDonadesAlta").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show();const t=e.resultset,r=new Set,n=[],o=[],a=[],i=1130,s=1124,c=1122;t.forEach((t=>{t[0]===i&&(r.add(t[1]),n.push(t[2])),t[0]===c&&(r.add(t[1]),a.push(t[2])),t[0]===s&&(r.add(t[1]),o.push(t[2]))}));const l=wt(r.size),u=25,h=-5,f=[{name:"Instàncies",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:a}],p=[{name:"Expedients",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],d=k([{name:"Tasques",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:n}],null,Array.from(r.values()),"Tasques",l,!0,h,void 0,"TASQUES ADMINISTRATIVES PIAE REALITZADES: EVOLUCIÓ DIÀRIA"),g=k(f,null,Array.from(r.values()),"Instàncies",l,!0,u,void 0,"INSTÀNCIES PIAE DONADES D'ALTA: EVOLUCIÓ DIÀRIA"),m=k(p,null,Array.from(r.values()),"Expedients",l,!0,u,void 0,"EXPEDIENTS PIAE DONADES D'ALTA: EVOLUCIÓ DIÀRIA");tt("chartInstanciesDonadesAlta",g),tt("chartAdministrativesRealitzades",d),tt("chartExpDonatsAlta",m)}}function zn(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataResolucionsAssentades").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show(),$("#chartResolucionsAssentades").css("background","#ffffff"),$("#chartResolucionsAssentades").show(),$("#chartNotificacionsTelematic").css("background","#ffffff"),$("#chartNotificacionsTelematic").show();const t=e.resultset,r=e.resultset.length,n=new Set,o=[];for(let e=0;e<r;e+=1)n.add(t[e][0]),o.push(t[e][1]);const a=wt(n.size),i=35;tt("chartResolucionsAssentades",k([{name:"Resolucions",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],null,Array.from(n.values()),"Resolucions",a,!0,i,void 0,"RESOLUCIONS PIAE ASSENTADES: EVOLUCIÓ DIÀRIA"))}}function jn(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataNotificacionsTelematic").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show(),$("#chartResolucionsAssentades").css("background","#ffffff"),$("#chartResolucionsAssentades").show(),$("#chartNotificacionsTelematic").css("background","#ffffff"),$("#chartNotificacionsTelematic").show();const t=e.resultset,r=e.resultset.length,n=new Set,o=[];for(let e=0;e<r;e+=1)n.add(t[e][0]),o.push(t[e][1]);const a=wt(n.size),i=40;tt("chartNotificacionsTelematic",k([{name:"Notificacions",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],null,Array.from(n.values()),"Notificacions",a,!0,i,void 0,"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: EVOLUCIÓ DIÀRIA"))}}const Wn=0,Yn=1,Zn=2,Jn=3,Hn=4,Kn=1130,qn=1124,Xn=1122,Qn=1143,to=1139;function eo(t){const e=[],r=[],n=[],o=[],a=[];return t.forEach((t=>{t[0]===Kn?n.push([t[1],t[2],t[3]]):t[0]===Xn?e.push([t[1],t[2],t[3]]):t[0]===qn?r.push([t[1],t[2],t[3]]):t[0]===Qn?o.push([t[1],t[2],t[3]]):t[0]===to&&a.push([t[1],t[2],t[3]])})),[e,r,n,a,o]}function ro(t,e){[{chartId:`#chartInstanciesDonadesAlta${t}`,noDataId:`#no_dataInstanciesDonadesAlta${t}`},{chartId:`#chartExpDonadesAlta${t}`,noDataId:`#no_dataExpDonadesAlta${t}`},{chartId:`#chartAdministrativesDonadesAlta${t}`,noDataId:`#no_dataAdministrativesDonadesAlta${t}`},{chartId:`#chartResDonadesAlta${t}`,noDataId:`#no_dataResDonadesAlta${t}`},{chartId:`#chartNotificacionsDonadesAlta${t}`,noDataId:`#no_dataNotificacionsDonadesAlta${t}`}].forEach((({chartId:t,noDataId:r})=>{e?U(t,r):N(r,t)}))}function no(t,e){if(0===e.resultset.length)ro("BarMonth");else{ro("BarMonth");const t=eo(e.resultset),r=-30,n=V(t[Wn],"Instàncies",r,"INSTÀNCIES PIAE DONADES D'ALTA: EVOLUCIÓ MENSUAL"),o=V(t[Yn],"Expedients",r,"EXPEDIENTS PIAE DONADES D'ALTA: EVOLUCIÓ MENSUAL"),a=V(t[Zn],"Tasques",r,"TASQUES ADMINISTRATIVES PIAE REALITZADES: EVOLUCIÓ MENSUAL"),i=V(t[Jn],"Resolucions",r,"RESOLUCIONS PIAE ASSENTADES: EVOLUCIÓ MENSUAL"),s=V(t[Hn],"Notificacions",r+15,"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: EVOLUCIÓ MENSUAL");tt("chartInstanciesDonadesAltaBarMonth",n),tt("chartExpDonadesAltaBarMonth",o),tt("chartAdministrativesDonadesAltaBarMonth",a),tt("chartResDonadesAltaBarMonth",i),tt("chartNotificacionsDonadesAltaBarMonth",s)}}function oo(e,r){if(0===r.resultset.length)ro("StackedBarYears");else{ro("StackedBarYears");const e=eo(r.resultset),n={title:{text:"INSTÀNCIES PIAE DONADES D'ALTA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nInstàncies"}};(0,t.initStackedBarChartMonthSeries)("chartInstanciesDonadesAltaStackedBarYears",e[Wn],n);const o={title:{text:"EXPEDIENTS PIAE DONATS D'ALTA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nExpedients"}};(0,t.initStackedBarChartMonthSeries)("chartExpDonadesAltaStackedBarYears",e[Yn],o);const a={title:{text:"TASQUES ADMINISTRATIVES PIAE REALITZADES: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nTasques"}};(0,t.initStackedBarChartMonthSeries)("chartAdministrativesDonadesAltaStackedBarYears",e[Zn],a);const i={title:{text:"RESOLUCIONS PIAE ASSENTADES: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nResolucions"}};(0,t.initStackedBarChartMonthSeries)("chartResDonadesAltaStackedBarYears",e[Jn],i);const s={title:{text:"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nNotificacions"}};(0,t.initStackedBarChartMonthSeries)("chartNotificacionsDonadesAltaStackedBarYears",e[Hn],s)}}function ao(t,e){if(0===e.resultset.length)ro("GaugeMonth");else{ro("GaugeMonth");const t=0,r=1,n=eo(e.resultset),o=P("chartInstanciesDonadesAltaGaugeMonth"),a=H(n[Wn],t,"INSTÀNCIES PIAE DONADES D'ALTA: MES ACTUAL",o),i=H(n[Yn],t,"EXPEDIENTS PIAE DONADES D'ALTA: MES ACTUAL",o),s=H(n[Zn],t,"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: MES ACTUAL",o),c=H(n[Jn],t,"RESOLUCIONS PIAE ASSENTADES: MES ACTUAL",o),l=H(n[Hn],t,"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: MES ACTUAL",o);tt("chartInstanciesDonadesAltaGaugeMonth",a),tt("chartExpDonadesAltaGaugeMonth",i),tt("chartAdministrativesDonadesAltaGaugeMonth",s),tt("chartResDonadesAltaGaugeMonth",c),tt("chartNotificacionsDonadesAltaGaugeMonth",l);const u=H(n[Wn],r,"INSTÀNCIES PIAE DONADES D'ALTA: MES ANTERIOR",o),h=H(n[Yn],r,"EXPEDIENTS PIAE DONADES D'ALTA: MES ANTERIOR",o),f=H(n[Zn],r,"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: MES ANTERIOR",o),p=H(n[Jn],r,"RESOLUCIONS PIAE ASSENTADES: MES ANTERIOR",o),d=H(n[Hn],r,"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: MES ANTERIOR",o);tt("chartInstanciesDonadesAltaGaugeLastMonth",u),tt("chartExpDonadesAltaGaugeLastMonth",h),tt("chartAdministrativesDonadesAltaGaugeLastMonth",f),tt("chartResDonadesAltaGaugeLastMonth",p),tt("chartNotificacionsDonadesAltaGaugeLastMonth",d)}}function io(t,e){if(0===e.resultset.length)ro("GaugeYear");else{ro("GaugeYear");const t=function(t){const e=[],r=[],n=[],o=[],a=[];return t.forEach((t=>{t[0]===Kn?n.push([t[1],t[2]]):t[0]===Xn?e.push([t[1],t[2]]):t[0]===qn?r.push([t[1],t[2]]):t[0]===Qn?a.push([t[1],t[2]]):t[0]===to&&o.push([t[1],t[2]])})),[e,r,n,o,a]}(e.resultset),r=P("chartInstanciesDonadesAltaGaugeYear"),n=J(t[Wn],"INSTÀNCIES PIAE DONADES D'ALTA: ÚLTIMS ANYS",r),o=J(t[Yn],"EXPEDIENTS PIAE DONADES D'ALTA: ÚLTIMS ANYS",r),a=J(t[Zn],"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: ÚLTIMS ANYS",r),i=J(t[Jn],"RESOLUCIONS PIAE ASSENTADES: ÚLTIMS ANYS",r),s=J(t[Hn],"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: ÚLTIMS ANYS",r);tt("chartInstanciesDonadesAltaGaugeYear",n),tt("chartExpDonadesAltaGaugeYear",o),tt("chartAdministrativesDonadesAltaGaugeYear",a),tt("chartResDonadesAltaGaugeYear",i),tt("chartNotificacionsDonadesAltaGaugeYear",s)}}function so(t,e){Tt(e,!0,15,"TEMPERATURA MITJANA DIÀRIA","ºC","chartTemperatureMitjanaDiaria","no_dataTemperatureMitjanaDiaria",void 0,void 0,!0,0)}function co(t,e){let r="MITJANA DIÀRIA DE SOROLL : ";const n=e.filter((e=>e[5]===t)),o=new Set(["Matí","Vesprada","Nit"]),a=new Set,i={name:"Matí",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:d}],lineStyle:{color:"#5470c6"}}},s={name:"Vesprada",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:d}],lineStyle:{color:"#5470c6"}}},c={name:"Nit",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:g}],lineStyle:{color:"#fac858"}}};r+=n[0][5],n.forEach((t=>{i.data.push(t[6]),s.data.push(t[7]),c.data.push(t[8]),a.add(yt(t[1]))}));const l=wt(a.size);tt("chartSonometroMapa",k([i,s,c],Array.from(o.values()),Array.from(a.values()),"dB",l,!0,-10,void 0,r))}const lo="MITJANA DE SOROLL: ";function uo(t,e,r,n,o,a){const i=e.resultset,s=`resultadoDirecciones${a}`,c=Dashboards.getParameterValue(s).map((t=>t[0])),l=[],u={},h=i.map((t=>{const e=t[0].split("-");return`${e[2]}/${e[1]}/${e[0]}`}));Array.from(new Set(h)).forEach((t=>{u[t]=Array(c.length).fill(null)})),i.forEach((t=>{const e=yt(t[0]);c.every(((r,n)=>t[1].toString()!==r||(u[e][n]=t[2],!1)))})),c.forEach(((t,e)=>{const r={name:"",type:"line",smooth:!1,data:[],symbol:"circle",symbolSize:6,markLine:{data:[{yAxis:n}],lineStyle:{color:"#ff9933"}}},o=Object.values(u).map((t=>t[e]));r.name=t,r.data=o,l.push(r)}));const f=wt(Array.from(Object.keys(u)).length),p=c.map((t=>({[t]:!1}))),d={};p.forEach(((t,e)=>{const r=Object.keys(t)[0];d[r]=e<4||t[r]})),tt(r,k(l,c,Array.from(Object.keys(u)),"dB",f,!0,-10,void 0,o,void 0,void 0,d))}function ho(t,e,r,n){const o=`${n.toUpperCase()} MATÍ`;uo(0,e,r+n,d,lo+o,n)}function fo(t,e,r,n){const o=`${n.toUpperCase()} VESPRADA`;uo(0,e,r+n,d,lo+o,n)}function po(t,e,r,n){const o=`${n.toUpperCase()} NIT`;uo(0,e,r+n,g,lo+o,n)}function go(){var t;let e;const r=L.icon({iconUrl:"/pentaho/api/repos/public/sc_valencia/Ciutat%3Abuild/images/mapas/marker-icon-sonometros.svg/content",iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]}),n=L.icon({iconUrl:"/pentaho/api/repos/public/sc_valencia/Ciutat%3Abuild/images/mapas/marker-icon-selected-sonometros.svg/content",iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]});t=L.map("myMap").setView([39.47225,-.37739],14);let o=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});t.setMinZoom(5),t.setMaxZoom(20),o.addTo(t),L.geoJSON(legacy.obtenerGeoJson(resultadoSonometros,0,5,9),{onEachFeature:function(t,o){console.log(o),function(t,e){if(t.properties&&t.properties.objectoId){let r=t.properties.address;e.bindPopup(r),e.on("click",(()=>legacy.createChart(r,resultadoSonometros)))}}(t,o),function(t){t.on("click",(t=>{var o;o=t.target,e&&e.setIcon(r),e=o,e.setIcon(n)}))}(o)},pointToLayer:function(t,e){return L.marker(e,{icon:r})}}).addTo(t)}function mo(){(0,t.loadIframeOnClickEvent)("#tabSmartCity","#iframeSmartCity","https://lookerstudio.google.com/embed/reporting/ff43c17f-23cb-4edb-923b-a7b061d829dc/page/6WdoC?hl=ca"),(0,t.loadIframeOnClickEvent)("#tabCdmCiutat","#iframeCdMCiutat","https://lookerstudio.google.com/embed/reporting/2da9d93e-d833-4a00-833a-19ac0746dc9f/page/6WdoC?hl=ca"),document.querySelector("#iframeValenciaMinut").setAttribute("src","https://lookerstudio.google.com/embed/reporting/14a41533-3cd8-4f75-b303-9a494c0e4a9d/page/6WdoC?hl=ca")}})(),n})()));
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.legacy=e():t.legacy=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[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,{addPointInteger:()=>h,buildCamarasTrafico:()=>ht,buildTableCalidadAire:()=>it,calculateMaxYAxis:()=>b,calculatePentahoPath:()=>st,calculateXAxisStart:()=>A,checkAllGroupsCollapsed:()=>nt,configureDataBar:()=>_,configureDataGaugeCommon:()=>w,configureDataGaugeMonthCommon:()=>T,configureDataLine:()=>L,configureDataValidate:()=>Lt,configureLinesChartValidates:()=>_t,convertToLanguageSelectorDateRange:()=>K,convertToTableTreeView:()=>rt,downloadCSVTable:()=>ot,downloadPDFTable:()=>at,formatCellMultiplesLines:()=>Q,formatDayMonthYear:()=>i,formatMilMillionEuros:()=>I,formatMonthAnyo:()=>a,formatName:()=>d,formatNameHeaderColumn:()=>X,formatRoundTooltip:()=>v,formatShortMonthShortYear:()=>l,formatShortMonthYear:()=>s,formatToMillions:()=>f,formatToTons:()=>p,formatTooltip:()=>S,formatTooltipPie:()=>E,formatTrimestre:()=>c,getEnvironment:()=>lt,getMaxFieldNumberFromData:()=>U,getMonth:()=>n,getMonthList:()=>u,getSelectCommonOptions:()=>j,getSelectTwoColumnsOptions:()=>W,initBarChart:()=>yt,initBarChartComparationMonth:()=>It,initChart:()=>g,initStackedBarChart:()=>dt,initStackedBarChartMonthSeries:()=>mt,initTable:()=>q,initValueDefaultDate:()=>J,initialCalls:()=>ut,loadIframeOnClickEvent:()=>Mt,printDataChart:()=>y,printDataInHTMLElements:()=>O,printNoDataChart:()=>m,resetFilter:()=>z,resetFilterDate:()=>Z,resetFilterDates:()=>Y,resultsetWithFields:()=>D,selectConfigDatasource:()=>V,selectFilterAll:()=>F,selectValueDefaultInFilter:()=>H,splitDataset:()=>x,traverseRows:()=>et,updateObject:()=>N,updateStackedBarOptions:()=>gt});const r={"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)]}function o(t){return[t.substring(0,4),r[t.substring(4,6)]]}function a(t){const[e,r]=o(t);return`${r} ${e}`}function i(t){const[e,n,o]=function(t){return[t.substring(0,4),r[t.substring(4,6)],t.substring(6,8)]}(t);return`${o} ${n} ${e}`}function s(t){const[e,r]=o(t);return`${r.substring(0,3)} ${e}`}function l(t){const[e,r]=o(t);return`${r.substring(0,3)} '${e.substring(2,4)}`}function c(t){const[e,r]=t.split("-");return`${parseFloat(r)/3}T ${e}`}function u(t,e){const r=t[e];return Array.from(r.values()).map((t=>t.slice(0,3)))}function h(t,e=2){let r=navigator.language||navigator.userLanguage;r=r.length<=2?`${r}-${r.toUpperCase()}`:r;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===r?t.toLocaleString("de-DE",n):t.toLocaleString(r,n)}function f(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function p(t){return t>=1e3?t/1e3+" Tn":t.toString()}function d(t,e=29){if(t.length>=e){const r=t.split(" ");let n="",o="";return r.forEach((t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(o+=`${n}\n`,n=t)})),o+=n,o}return t}function g(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);n.setOption(e,!0),window.addEventListener("resize",(()=>{null!=n&&void 0!==n&&n.resize()}));const o=document.getElementById("main-content");return o&&(o.addEventListener("shown.bs.collapse",(()=>{n.resize()})),o.addEventListener("hidden.bs.collapse",(()=>{n.resize()}))),n}function m(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function y(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function S(t,e=!1,r=!0,n=""){let o=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const a=e?Math.round(t.data):t.data,i=r?`<div style="font-weight: 400;color: #666;">${s=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${s}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${h(a)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${h(a)} ${n}`:"-"}\n </span>\n </div>`;var s;o+=i})),o}function A(t){return 100*(t-120)/t}function b(t,e){const r=Math.max(...t);return r+(e-r%e)}function E(t,e=!1){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:h(t.value);return`<div> ${r} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function v(t,e){let r=`${t.name} : `;return r+=`<span style="font-weight:500">${h(Math.round(t.value))}</span>`,e&&(r+=`<span> (${t.percent}%)</span>`),t.marker+r}function I(t){const e=1e6,r=Number(t);return r>=0&&r<e?`${h(r)} €`:r>=e?`${h(r/e)} M €`:"-"}function M(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function w(t,e,r,n=30,o=15,a=30,i=-70,s=70,l=3){const c=M(t,e.data,1.1),u=s,f=r.slice(),p=[];let g=o,m=a,y=i;for(let r=0;r<t.length;r+=1)p.push({value:t[r][e.data],name:d(String(t[r][e.type]).replace(/\[.*?\]/g,"")),color:f.shift(),title:{offsetCenter:[`${String(y)}%`,`${String(g)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(y)}%`,`${String(m)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>h(Math.round(t))}}),y+=u,(r+1)%l==0&&(m+=a,g+=2*o,y=i);return[c,p]}function T(t,e,r,o=0){return[M(e,r.data,1),t=>function(t,e,r){const o=h(Math.round(e)),a=n(t[r][0]),i=t[r][1],s=`\n${a} ${i} : ${o}`,l=`${o}\n${a} ${i}`;return window.innerWidth<=1710?s:l}(e,t,o),[{value:e[o][r.data]}]]}function C(t,e){const{resultset:r}={resultset:t},n=new Set,o=new Set,a=r.map((([t,r,a])=>{const i=e?Math.round(a):a;return n.add(t),o.add(r),{day:r,type:t,value:i}})),i=Array.from(o.values()),s=Array.from(n.values());return s.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[s.map((t=>{const e=a.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=i.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,data:r}})),s,o]}function L(t,e=[],r=!1){const[n,o,a]=C(t,r);return n.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[n,a,o]}function _(t,e,r=!1){const[n,o,a]=C(t,r);return n.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[n,a,o]}function D(t){const{resultset:e,metadata:r}=t,n=[];return e.forEach((t=>{const e={};t.forEach(((t,n)=>{e[r[n].colName]=t})),n.push(e)})),n}function N(t,e){const r=t;return Object.keys(e).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n?r[n]=e[n].map(((e,r)=>({...t[n][r],...e}))):"object"!=typeof e[n]||Array.isArray(e[n])?r[n]=e[n]:r[n]=N(t[n]||{},e[n]))})),t}function O(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((r=>{const n=r[0],o=r[1];"object"==typeof o?o.className?document.querySelector(o.className).className=t[n]:o.element&&o.format&&(document.querySelector(o.element).textContent=e[t.id][n].format(t[n])):document.querySelector(o).textContent=t[n]}))}))}function U(t,e){const r=D(t),n=[];let o=null;return r.forEach((t=>{const r=t[e];"number"!=typeof r||Number.isNaN(r)||n.push(r)})),n.length>0&&(o=Math.max(...n)),o}function x(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const P=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],R=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],k=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],B=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],$=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function F(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function G(t){for(const e of t)if(Array.isArray(e)){if(!G(e))return!1}else if("All"!==e)return!1;return!0}function V(t,e,r,n){return G(e)?(t.queryDefinition.dataAccessId=r,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function z(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function j(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function W(){const t={input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}};return t.input.indexes.id=1,t.input.indexes.label=0,t}function Y(t,e,r,n){const o=Dashboards.getParameterValue(r),a=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[o]),Dashboards.fireChange(e,[a]),!0}function Z(t,e){const r=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[r]),!0}function J(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function H(t,e){const r=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[r])}function K(t){t.regional.es={monthNames:P,abbreviatedMonthNames:R,dayNames:k,abbreviatedDayNames:B,dayNamesMin:$,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function q(t,e){const r=document.getElementById(t);return r?new Tabulator(r,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function X(t,e){let r=t.getValue();return r.length>e&&(r=`${r.substr(0,e)}<br>${r.substr(e)}`),r}function Q(t,e){const r=t.getValue().split(" ");let n="",o="";return r.forEach((t=>{(o+t).length<=e?o+=`${t} `:(n+=`${o}<br>`,o=`${t} `)})),n+=`${o}<br>`,n}function tt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const r=t.getTreeChildren();r.length>0&&r.forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function et(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function rt(t,e,r,n){const o=[];for(const a in t)if(t.hasOwnProperty(a)){const i=t[a],s={[e]:i[0],_children:[]};i.shift(),i.forEach(((t,o)=>{const a={[e]:r[o],[n]:t};s._children.push(a)})),o.push(s)}return o}function nt(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function ot(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function at(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}function it(t){const e=[],r=[100,200,350,500,750,751],n=[40,90,120,230,340,341],o=[50,100,130,240,380,381],a=[20,40,50,100,150,151],i=[10,20,25,50,75,76],s={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function l(t,e,r){const n=document.createElement("td");if(n.setAttribute("id",t),null!=e){n.innerHTML=e;const t=function(t,e){let r;return void 0===e?r=6:"ND"===e?r=7:(r=5,t.forEach(((t,n)=>{e<=t&&5===r&&(r=n)}))),s[r]}(r,e);n.classList.add(t)}return n}return t.forEach((t=>{const s=t;"noData"===s.operationalstatus&&(s.so2value="ND",s.no2value="ND",s.o3value="ND",s.pm10value="ND",s.pm25value="ND"),"A09_CABANYAL_60m"===s.entityid&&(s.pm10value=void 0,s.pm25value=void 0);const c=document.createElement("tr"),u=document.createElement("td");u.innerHTML=s.address,c.appendChild(u),c.appendChild(l(`${s.entityid}_so2`,s.so2value,r)),c.appendChild(l(`${s.entityid}_no2`,s.no2value,n)),c.appendChild(l(`${s.entityid}_o3`,s.o3value,o)),c.appendChild(l(`${s.entityid}_pm10`,s.pm10value,a)),c.appendChild(l(`${s.entityid}_pm25`,s.pm25value,i)),e.push(c)})),e}function st(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 lt(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function ct(t,e){document.querySelectorAll(`[${t}]`).forEach((r=>{!function(t,e,r){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,r&&r()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(r.getAttribute(t),r,e)}))}function ut(t){ct("include-html-cabecera",(function(){!function(){const t=lt();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=lt();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),ct("include-html-menu"),ct("include-html-main-container",(function(){(function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])})(),t&&t()})),ct("include-html-copyright")}function ht(t,e,r,n,o,a){let i=!1,s=!1;const l=document.querySelector(t),c=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(l&&l.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")):(l&&l.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 h(t=!0){const e=document.querySelector(r);t?(l&&(l.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),s=!0):(e.classList.remove("blur"),u(),s=!1)}const f=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(s||u(),i||(i=!0,window.setTimeout(h,a)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(l&&(l.setAttribute("sandbox","allow-scripts"),f(l)),c&&(c.setAttribute("sandbox","allow-scripts"),f(c)),document.querySelector(o).addEventListener("click",(()=>{h(!1),window.setTimeout(h,a)}))):document.querySelectorAll(n)[0].style.display="none"}const ft={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=>`${f(t)}€`}}]},pt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const r={};e.forEach((e=>{const n=e[1],o=e[0];o!==t.seriesName||r[n]||(r[n]=0),o===t.seriesName&&(r[n]+=e[2])}));let n=`<p>${t.seriesName}</p>`;for(const[e,o]of Object.entries(r))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${h(o)}</span></div>`;return n};function dt(t,e,r=void 0,n=void 0){const o=null===n?void 0:n,a=new Set(e.map((t=>t[1])));let i;const s={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=>pt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,r,n,o){const a={},i=o.contentSize[1]/2,s=o.viewSize[1],l=t[1];return l<i?a.top=10:l+i>s?a.bottom=10:a.top=l-i,t[0]<o.viewSize[0]/2?a.left=t[0]+20:a.right=o.viewSize[0]-t[0]+20,a}},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=>h(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(a),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>h(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};o&&o.itemStyle&&Array.isArray(o.itemStyle.borderColor)&&(i=[...o.itemStyle.borderColor],delete o.itemStyle.borderColor);const r=function(t){return t.reduce(((t,e)=>{const r=e[0];return t[r]||(t[r]=[]),t[r].push(e),t}),{})}(e),n=Object.keys(r);a.forEach((t=>{n.forEach((e=>{void 0===r[e].find((e=>e[1]===t))&&(r[e].push([r[e][0][0],t,void 0]),r[e].sort())}))}));const s=[];return Object.keys(r).forEach((e=>{i&&(t.itemStyle={borderColor:i.shift()}),t.name=e,t.data=r[e].map((t=>t[2]));let n={};n=void 0!==o?N(t,o):t,s.push({...n})})),s})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let l={};l=void 0!==r?N(s,r):s,g(t,l)}function gt(t){let e={};return e=N(t,ft),e}function mt(t,e,r={},o={}){let a={};a=N(r,{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"]}},s=null===o?i:N(o,i),l=e;l.forEach(((t,e)=>{l[e][0]=n(t[0])})),dt(t,l,a,s)}function yt(t,e=void 0){const r={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=>v(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?N(r,e):r,g(t,n)}const St="es_ES",At={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 bt(t){return Math.max(...t.map((t=>Number(t[0]))))}function Et(t){const e=t.filter((e=>Number(e[0])===bt(t))),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function vt(t){const e=t.filter((e=>Number(e[0])===bt(t)-1)),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function It(t,e,r=void 0){const n=bt(e).toString(),o=(bt(e)-1).toString();yt(t,N({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[o,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:u(At,St),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:o,type:"bar",data:vt(e)},{name:n,type:"bar",barGap:0,data:Et(e)}]},r))}function Mt(t,e,r){const n=document.querySelector(e),o=document.querySelector(t);let a=!1;o.addEventListener("click",(()=>{!1===a&&(a=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",r),n.onload=()=>{a=!1})})),o.disabled=!1}const wt="id",Tt="fecha",Ct="value";function Lt(t,e,r,n){const[o,a]=function(t,e,r){const n=[],o=[];return t.forEach((t=>{e.includes(`${t[wt]}`)?n.push(`${t[Tt]}`):r.includes(`${t[wt]}`)&&o.push(`${t[Tt]}`)})),[n.map((t=>[t,0])),o.map((t=>[t,0]))]}(t,r,n);let i="Datos sin validar";0===a.length&&(i="");const s={name:"Datos validados",type:"line",data:[...o,a[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let l="",c="";if(0===a.length){const e=t[t.length-1].fecha;l=e,c=e}else l=a[0][0],c=a[a.length-1][0];return[...e,s,{name:"Datos NO validados",type:"line",data:a,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:i,xAxis:l,yAxis:0},{name:"end",xAxis:c,yAxis:Math.max(...t.filter((t=>null!==t[Ct])).map((t=>parseInt(`${t[Ct]}`,10))))}]]}}]}function _t(t,e,r=void 0){g(t,N({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=>S(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},r))}return e})(),t.exports=e()},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=s(t),i=a[0],l=a[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,i,l)),u=0,h=l>0?i-4:i;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[u++]=e>>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,a=[],i=16383,s=0,c=n-o;s<c;s+=i)a.push(l(t,s,s+i>c?c:s+i));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)r[i]=a[i],n[a.charCodeAt(i)]=i;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var o,a,i=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(r[(a=o)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";const n=r(7526),o=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function s(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=s(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(H(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(H(t,ArrayBuffer)||t&&H(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(H(t,SharedArrayBuffer)||t&&H(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const o=function(t){if(l.isBuffer(t)){const e=0|d(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?s(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),s(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,l.prototype),n}function d(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function g(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||H(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(o)return n?-1:Y(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return _(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function S(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:A(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):A(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,o){let a,i=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,s/=2,l/=2,r/=2}function c(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o){let n=-1;for(a=r;a<s;a++)if(c(t,a)===c(e,-1===n?0:a-n)){if(-1===n&&(n=a),a-n+1===l)return n*i}else-1!==n&&(a-=a-n),n=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;n<l;n++)if(c(t,a+n)!==c(e,n)){r=!1;break}if(r)return a}return-1}function b(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const a=e.length;let i;for(n>a/2&&(n=a/2),i=0;i<n;++i){const n=parseInt(e.substr(2*i,2),16);if(K(n))return i;t[r+i]=n}return i}function E(t,e,r,n){return J(Y(e,t.length-r),t,r,n)}function v(t,e,r,n){return J(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function I(t,e,r,n){return J(Z(e),t,r,n)}function M(t,e,r,n){return J(function(t,e){let r,n,o;const a=[];for(let i=0;i<t.length&&!((e-=2)<0);++i)r=t.charCodeAt(i),n=r>>8,o=r%256,a.push(o),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let a=null,i=e>239?4:e>223?3:e>191?2:1;if(o+i<=r){let r,n,s,l;switch(i){case 1:e<128&&(a=e);break;case 2:r=t[o+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(a=l));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:r=t[o+1],n=t[o+2],s=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,i=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=i}return function(t){const e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=C));return r}(n)}e.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},l.allocUnsafe=function(t){return h(t)},l.allocUnsafeSlow=function(t){return h(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(H(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),H(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,a=Math.min(r,n);o<a;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=l.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(H(e,Uint8Array))o+e.length>n.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,o){if(H(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(e>>>=0);const s=Math.min(a,i),c=this.slice(n,o),u=t.slice(e,r);for(let t=0;t<s;++t)if(c[t]!==u[t]){a=c[t],i=u[t];break}return a<i?-1:i<a?1:0},l.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},l.prototype.indexOf=function(t,e,r){return S(this,t,e,r,!0)},l.prototype.lastIndexOf=function(t,e,r){return S(this,t,e,r,!1)},l.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return I(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function L(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function _(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function D(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=q[t[n]];return o}function N(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function x(t,e,r,n,o){V(e,n,o,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,r}function P(t,e,r,n,o){V(e,n,o,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;let i=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=i,i>>=8,t[r+2]=i,i>>=8,t[r+1]=i,i>>=8,t[r]=i,r+8}function R(t,e,r,n,o,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(t,e,r,n,a){return e=+e,r>>>=0,a||R(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,a){return e=+e,r>>>=0,a||R(t,0,r,8),o.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],o=1,a=0;for(;++a<e&&(o*=256);)n+=this[t+a]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),l.prototype.readBigUInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],o=1,a=0;for(;++a<e&&(o*=256);)n+=this[t+a]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,o=1,a=this[t+--n];for(;n>0&&(o*=256);)a+=this[t+--n]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=X((function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=X((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let o=0,a=1,i=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===i&&0!==this[e+o-1]&&(i=1),this[e+o]=(t/a|0)-i&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let o=r-1,a=1,i=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===i&&0!==this[e+o+1]&&(i=1),this[e+o]=(t/a|0)-i&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=X((function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=X((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},l.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const a=l.isBuffer(t)?t:l.from(t,n),i=a.length;if(0===i)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=a[o%i]}return this};const $={};function F(t,e,r){$[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function V(t,e,r,n,o,a){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=a>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||j(e,t.length-(r+1))}(n,o,a)}function z(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function j(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let r;e=e||1/0;const n=t.length;let o=null;const a=[];for(let i=0;i<n;++i){if(r=t.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Z(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function J(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function H(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const q=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8075:(t,e,r)=>{"use strict";var n=r(453),o=r(487),a=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&a(t,".prototype.")>-1?o(r):r}},487:(t,e,r)=>{"use strict";var n=r(6743),o=r(453),a=r(6897),i=r(9675),s=o("%Function.prototype.apply%"),l=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(l,s),u=r(655),h=o("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new i("a function is required");var e=c(n,l,arguments);return a(e,1+h(0,t.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};u?u(t.exports,"apply",{value:f}):t.exports.apply=f},41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),a=r(9675),i=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!i&&i(t,e);if(n)n(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:r,writable:null===l&&h?h.writable:!l});else{if(!u&&(s||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},655:(t,e,r)=>{"use strict";var n=r(453)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),"[object Array]"===o.call(t)?function(t,e,r){for(var n=0,o=t.length;n<o;n++)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,i):"string"==typeof t?function(t,e,r){for(var n=0,o=t.length;n<o;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,i):function(t,e,r){for(var n in t)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,i)}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};t.exports=function(t){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var a,i=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=r(0,o.length-i.length),l=[],c=0;c<s;c++)l[c]="$"+c;if(a=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(l)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var e=o.apply(this,n(i,arguments));return Object(e)===e?e:this}return o.apply(t,n(i,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,a.prototype=new u,u.prototype=null}return a}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453:(t,e,r)=>{"use strict";var n,o=r(9383),a=r(1237),i=r(9290),s=r(9538),l=r(8068),c=r(9675),u=r(5345),h=Function,f=function(t){try{return h('"use strict"; return ('+t+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(t){p=null}var d=function(){throw new c},g=p?function(){try{return d}catch(t){try{return p(arguments,"callee").get}catch(t){return d}}}():d,m=r(4039)(),y=r(24)(),S=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),A={},b="undefined"!=typeof Uint8Array&&S?S(Uint8Array):n,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&S?S([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&S?S(S([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&S?S((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&S?S((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&S?S(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":g,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(S)try{null.error}catch(t){var v=S(S(t));E["%Error.prototype%"]=v}var I=function t(e){var r;if("%AsyncFunction%"===e)r=f("async function () {}");else if("%GeneratorFunction%"===e)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=f("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&S&&(r=S(o.prototype))}return E[e]=r,r},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(6743),T=r(9957),C=w.call(Function.call,Array.prototype.concat),L=w.call(Function.apply,Array.prototype.splice),_=w.call(Function.call,String.prototype.replace),D=w.call(Function.call,String.prototype.slice),N=w.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,x=function(t,e){var r,n=t;if(T(M,n)&&(n="%"+(r=M[n])[0]+"%"),T(E,n)){var o=E[n];if(o===A&&(o=I(n)),void 0===o&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=D(t,0,1),r=D(t,-1);if("%"===e&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return _(t,O,(function(t,e,r,o){n[n.length]=r?_(o,U,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=x("%"+n+"%",e),a=o.name,i=o.value,s=!1,u=o.alias;u&&(n=u[0],L(r,C([0,1],u)));for(var h=1,f=!0;h<r.length;h+=1){var d=r[h],g=D(d,0,1),m=D(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===m||"'"===m||"`"===m)&&g!==m)throw new l("property names with quotes must have matching quotes");if("constructor"!==d&&f||(s=!0),T(E,a="%"+(n+="."+d)+"%"))i=E[a];else if(null!=i){if(!(d in i)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(p&&h+1>=r.length){var y=p(i,d);i=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:i[d]}else f=T(i,d),i=i[d];f&&!s&&(E[a]=i)}}return i}},5795:(t,e,r)=>{"use strict";var n=r(453)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592:(t,e,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},24:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=r(6743);t.exports=a.call(n,o)},251:(t,e)=>{e.read=function(t,e,r,n,o){var a,i,s=8*o-n-1,l=(1<<s)-1,c=l>>1,u=-7,h=r?o-1:0,f=r?-1:1,p=t[e+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=f,u-=8);for(i=a&(1<<-u)-1,a>>=-u,u+=n;u>0;i=256*i+t[e+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),a-=c}return(p?-1:1)*i*Math.pow(2,a-n)},e.write=function(t,e,r,n,o,a){var i,s,l,c=8*a-o-1,u=(1<<c)-1,h=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,i=u):(i=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-i))<1&&(i--,l*=2),(e+=i+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(i++,l/=2),i+h>=u?(s=0,i=u):i+h>=1?(s=(e*l-1)*Math.pow(2,o),i+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),i=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(i=i<<o|s,c+=o;c>0;t[r+p]=255&i,p+=d,i/=256,c-=8);t[r+p-d]|=128*g}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7244:(t,e,r)=>{"use strict";var n=r(9092)(),o=r(8075)("Object.prototype.toString"),a=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},i=function(t){return!!a(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=i,t.exports=s?a:i},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var a=/^\s*class\b/,i=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},s=function(t){try{return!i(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var f=document.all;l.call(f)===l.call(document.all)&&(h=function(t){if((u||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!i(t)&&s(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(i(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},8184:(t,e,r)=>{"use strict";var n,o=Object.prototype.toString,a=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=r(9092)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(i.test(a.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},6578:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,l=[],c=!1,u=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var t=i(h);c=!0;for(var e=l.length;e;){for(s=l,l=[];++u<e;)s&&s[u].run();u=-1,e=l.length}s=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new p(t,e)),1!==l.length||c||i(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6897:(t,e,r)=>{"use strict";var n=r(453),o=r(41),a=r(592)(),i=r(5795),s=r(9675),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&i){var u=i(t,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(c=!1)}return(n||c||!r)&&(a?o(t,"length",e,!0,!0):o(t,"length",e)),t}},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9032:(t,e,r)=>{"use strict";var n=r(7244),o=r(8184),a=r(5767),i=r(5680);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(l)var d=s(BigInt.prototype.valueOf);if(c)var g=s(Symbol.prototype.valueOf);function m(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function y(t){return"[object Map]"===u(t)}function S(t){return"[object Set]"===u(t)}function A(t){return"[object WeakMap]"===u(t)}function b(t){return"[object WeakSet]"===u(t)}function E(t){return"[object ArrayBuffer]"===u(t)}function v(t){return"undefined"!=typeof ArrayBuffer&&(E.working?E(t):t instanceof ArrayBuffer)}function I(t){return"[object DataView]"===u(t)}function M(t){return"undefined"!=typeof DataView&&(I.working?I(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=o,e.isTypedArray=i,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):i(t)||M(t)},e.isUint8Array=function(t){return"Uint8Array"===a(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===a(t)},e.isUint16Array=function(t){return"Uint16Array"===a(t)},e.isUint32Array=function(t){return"Uint32Array"===a(t)},e.isInt8Array=function(t){return"Int8Array"===a(t)},e.isInt16Array=function(t){return"Int16Array"===a(t)},e.isInt32Array=function(t){return"Int32Array"===a(t)},e.isFloat32Array=function(t){return"Float32Array"===a(t)},e.isFloat64Array=function(t){return"Float64Array"===a(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===a(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===a(t)},y.working="undefined"!=typeof Map&&y(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(y.working?y(t):t instanceof Map)},S.working="undefined"!=typeof Set&&S(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(S.working?S(t):t instanceof Set)},A.working="undefined"!=typeof WeakMap&&A(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(A.working?A(t):t instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(t){return b(t)},E.working="undefined"!=typeof ArrayBuffer&&E(new ArrayBuffer),e.isArrayBuffer=v,I.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&I(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=M;var w="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(t){return"[object SharedArrayBuffer]"===u(t)}function C(t){return void 0!==w&&(void 0===T.working&&(T.working=T(new w)),T.working?T(t):t instanceof w)}function L(t){return m(t,h)}function _(t){return m(t,f)}function D(t){return m(t,p)}function N(t){return l&&m(t,d)}function O(t){return c&&m(t,g)}e.isSharedArrayBuffer=C,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===u(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===u(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===u(t)},e.isGeneratorObject=function(t){return"[object Generator]"===u(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===u(t)},e.isNumberObject=L,e.isStringObject=_,e.isBooleanObject=D,e.isBigIntObject=N,e.isSymbolObject=O,e.isBoxedPrimitive=function(t){return L(t)||_(t)||D(t)||N(t)||O(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(v(t)||C(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},537:(t,e,r)=>{var n=r(5606),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},a=/%[sdj%]/g;e.format=function(t){if(!A(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(t).replace(a,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])y(s)||!v(s)?i+=" "+s:i+=" "+c(s);return i},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var i={},s=/^$/;if(n.env.NODE_DEBUG){var l=n.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+l+"$","i")}function c(t,r){var n={seen:[],stylize:h};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,t,n.depth)}function u(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function h(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&w(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return A(o)||(o=f(t,o,n)),o}var a=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(A(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return S(e)?t.stylize(""+e,"number"):m(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,r);if(a)return a;var i=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(r)),M(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(r);if(0===i.length){if(w(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(I(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return p(r)}var c,u="",h=!1,v=["{","}"];return g(r)&&(h=!0,v=["[","]"]),w(r)&&(u=" [Function"+(r.name?": "+r.name:"")+"]"),E(r)&&(u=" "+RegExp.prototype.toString.call(r)),I(r)&&(u=" "+Date.prototype.toUTCString.call(r)),M(r)&&(u=" "+p(r)),0!==i.length||h&&0!=r.length?n<0?E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,o){for(var a=[],i=0,s=e.length;i<s;++i)_(e,String(i))?a.push(d(t,e,r,n,String(i),!0)):a.push("");return o.forEach((function(o){o.match(/^\d+$/)||a.push(d(t,e,r,n,o,!0))})),a}(t,r,n,s,i):i.map((function(e){return d(t,r,n,s,e,h)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,u,v)):v[0]+u+v[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,o,a){var i,s,l;if((l=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),_(n,o)||(i="["+o+"]"),s||(t.seen.indexOf(l.value)<0?(s=y(r)?f(t,l.value,null):f(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return s;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.slice(1,-1),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+s}function g(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function S(t){return"number"==typeof t}function A(t){return"string"==typeof t}function b(t){return void 0===t}function E(t){return v(t)&&"[object RegExp]"===T(t)}function v(t){return"object"==typeof t&&null!==t}function I(t){return v(t)&&"[object Date]"===T(t)}function M(t){return v(t)&&("[object Error]"===T(t)||t instanceof Error)}function w(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(s.test(t)){var r=n.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=g,e.isBoolean=m,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=S,e.isString=A,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=E,e.types.isRegExp=E,e.isObject=v,e.isDate=I,e.types.isDate=I,e.isError=M,e.types.isNativeError=M,e.isFunction=w,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[C((t=new Date).getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":"),[t.getDate(),L[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(D&&t[D]){var e;if("function"!=typeof(e=t[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,D,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],a=0;a<arguments.length;a++)o.push(arguments[a]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),D&&Object.defineProperty(e,D,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,o(t))},e.promisify.custom=D,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var o=e.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var a=this,i=function(){return o.apply(a,arguments)};t.apply(this,e).then((function(t){n.nextTick(i.bind(null,null,t))}),(function(t){n.nextTick(N.bind(null,t,i))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,o(t)),e}},5767:(t,e,r)=>{"use strict";var n=r(2682),o=r(9209),a=r(487),i=r(8075),s=r(5795),l=i("Object.prototype.toString"),c=r(9092)(),u="undefined"==typeof globalThis?r.g:globalThis,h=o(),f=i("String.prototype.slice"),p=Object.getPrototypeOf,d=i("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},g={__proto__:null};n(h,c&&s&&p?function(t){var e=new u[t];if(Symbol.toStringTag in e){var r=p(e),n=s(r,Symbol.toStringTag);if(!n){var o=p(r);n=s(o,Symbol.toStringTag)}g["$"+t]=a(n.get)}}:function(t){var e=new u[t],r=e.slice||e.set;r&&(g["$"+t]=a(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!c){var e=f(l(t),8,-1);return d(h,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(g,(function(r,n){if(!e)try{r(t),e=f(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(g,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=f(n,1))}catch(t){}})),e}(t):null}},4047:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=t,this.position=0,this.isBigEndian=e||!1}function a(t,e,r){return function(){var n;return n=this.isBigEndian?e.call(this.buffer,this.position):t.call(this.buffer,this.position),this.position+=r,n}}t.exports=o,o.prototype.readUInt8=a(n.prototype.readUInt8,n.prototype.readUInt8,1),o.prototype.readUInt16=a(n.prototype.readUInt16LE,n.prototype.readUInt16BE,2),o.prototype.readUInt32=a(n.prototype.readUInt32LE,n.prototype.readUInt32BE,4),o.prototype.readInt8=a(n.prototype.readInt8,n.prototype.readInt8,1),o.prototype.readInt16=a(n.prototype.readInt16LE,n.prototype.readInt16BE,2),o.prototype.readInt32=a(n.prototype.readInt32LE,n.prototype.readInt32BE,4),o.prototype.readFloat=a(n.prototype.readFloatLE,n.prototype.readFloatBE,4),o.prototype.readDouble=a(n.prototype.readDoubleLE,n.prototype.readDoubleBE,8),o.prototype.readVarInt=function(){var t,e=0,r=0;do{e+=(127&(t=this.buffer[this.position+r]))<<7*r,r++}while(t>=128);return this.position+=r,e}},1199:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=new n(t),this.position=0,this.allowResize=e}function a(t,e){return function(r,n){this.ensureSize(e),t.call(this.buffer,r,this.position,n),this.position+=e}}t.exports=o,o.prototype.writeUInt8=a(n.prototype.writeUInt8,1),o.prototype.writeUInt16LE=a(n.prototype.writeUInt16LE,2),o.prototype.writeUInt16BE=a(n.prototype.writeUInt16BE,2),o.prototype.writeUInt32LE=a(n.prototype.writeUInt32LE,4),o.prototype.writeUInt32BE=a(n.prototype.writeUInt32BE,4),o.prototype.writeInt8=a(n.prototype.writeInt8,1),o.prototype.writeInt16LE=a(n.prototype.writeInt16LE,2),o.prototype.writeInt16BE=a(n.prototype.writeInt16BE,2),o.prototype.writeInt32LE=a(n.prototype.writeInt32LE,4),o.prototype.writeInt32BE=a(n.prototype.writeInt32BE,4),o.prototype.writeFloatLE=a(n.prototype.writeFloatLE,4),o.prototype.writeFloatBE=a(n.prototype.writeFloatBE,4),o.prototype.writeDoubleLE=a(n.prototype.writeDoubleLE,8),o.prototype.writeDoubleBE=a(n.prototype.writeDoubleBE,8),o.prototype.writeBuffer=function(t){this.ensureSize(t.length),t.copy(this.buffer,this.position,0,t.length),this.position+=t.length},o.prototype.writeVarInt=function(t){for(var e=1;4294967168&t;)this.writeUInt8(127&t|128),t>>>=7,e++;return this.writeUInt8(127&t),e},o.prototype.ensureSize=function(t){if(this.buffer.length<this.position+t){if(!this.allowResize)throw new RangeError("index out of range");var e=new n(this.position+t);this.buffer.copy(e,0,0,this.buffer.length),this.buffer=e}}},2957:(t,e,r)=>{var n=r(8287).Buffer;t.exports=m;var o=r(740),a=r(4263),i=r(350),s=r(743),l=r(3452),c=r(3959),u=r(9236),h=r(1141),f=r(4047),p=r(1199),d=r(2104),g=r(1865);function m(){this.srid=void 0,this.hasZ=!1,this.hasM=!1}m.parse=function(t,e){if("string"==typeof t||t instanceof d)return m._parseWkt(t);if(n.isBuffer(t)||t instanceof f)return m._parseWkb(t,e);throw new Error("first argument must be a string or Buffer")},m._parseWkt=function(t){var e,r,n=(e=t instanceof d?t:new d(t)).matchRegex([/^SRID=(\d+);/]);n&&(r=parseInt(n[1],10));var f=e.matchType(),p=e.matchDimension(),g={srid:r,hasZ:p.hasZ,hasM:p.hasM};switch(f){case o.wkt.Point:return a._parseWkt(e,g);case o.wkt.LineString:return i._parseWkt(e,g);case o.wkt.Polygon:return s._parseWkt(e,g);case o.wkt.MultiPoint:return l._parseWkt(e,g);case o.wkt.MultiLineString:return c._parseWkt(e,g);case o.wkt.MultiPolygon:return u._parseWkt(e,g);case o.wkt.GeometryCollection:return h._parseWkt(e,g)}},m._parseWkb=function(t,e){var r,n,p,d={};switch((r=t instanceof f?t:new f(t)).isBigEndian=!r.readInt8(),n=r.readUInt32(),d.hasSrid=!(536870912&~n),d.isEwkb=536870912&n||1073741824&n||2147483648&n,d.hasSrid&&(d.srid=r.readUInt32()),d.hasZ=!1,d.hasM=!1,d.isEwkb||e&&e.isEwkb?(2147483648&n&&(d.hasZ=!0),1073741824&n&&(d.hasM=!0),p=15&n):n>=1e3&&n<2e3?(d.hasZ=!0,p=n-1e3):n>=2e3&&n<3e3?(d.hasM=!0,p=n-2e3):n>=3e3&&n<4e3?(d.hasZ=!0,d.hasM=!0,p=n-3e3):p=n,p){case o.wkb.Point:return a._parseWkb(r,d);case o.wkb.LineString:return i._parseWkb(r,d);case o.wkb.Polygon:return s._parseWkb(r,d);case o.wkb.MultiPoint:return l._parseWkb(r,d);case o.wkb.MultiLineString:return c._parseWkb(r,d);case o.wkb.MultiPolygon:return u._parseWkb(r,d);case o.wkb.GeometryCollection:return h._parseWkb(r,d);default:throw new Error("GeometryType "+p+" not supported")}},m.parseTwkb=function(t){var e,r={},n=(e=t instanceof f?t:new f(t)).readUInt8(),p=e.readUInt8(),d=15&n;if(r.precision=g.decode(n>>4),r.precisionFactor=Math.pow(10,r.precision),r.hasBoundingBox=1&p,r.hasSizeAttribute=p>>1&1,r.hasIdList=p>>2&1,r.hasExtendedPrecision=p>>3&1,r.isEmpty=p>>4&1,r.hasExtendedPrecision){var m=e.readUInt8();r.hasZ=!(1&~m),r.hasM=!(2&~m),r.zPrecision=g.decode((28&m)>>2),r.zPrecisionFactor=Math.pow(10,r.zPrecision),r.mPrecision=g.decode((224&m)>>5),r.mPrecisionFactor=Math.pow(10,r.mPrecision)}else r.hasZ=!1,r.hasM=!1;if(r.hasSizeAttribute&&e.readVarInt(),r.hasBoundingBox){var y=2;r.hasZ&&y++,r.hasM&&y++;for(var S=0;S<y;S++)e.readVarInt(),e.readVarInt()}switch(d){case o.wkb.Point:return a._parseTwkb(e,r);case o.wkb.LineString:return i._parseTwkb(e,r);case o.wkb.Polygon:return s._parseTwkb(e,r);case o.wkb.MultiPoint:return l._parseTwkb(e,r);case o.wkb.MultiLineString:return c._parseTwkb(e,r);case o.wkb.MultiPolygon:return u._parseTwkb(e,r);case o.wkb.GeometryCollection:return h._parseTwkb(e,r);default:throw new Error("GeometryType "+d+" not supported")}},m.parseGeoJSON=function(t){return m._parseGeoJSON(t)},m._parseGeoJSON=function(t,e){var r;switch(t.type){case o.geoJSON.Point:r=a._parseGeoJSON(t);break;case o.geoJSON.LineString:r=i._parseGeoJSON(t);break;case o.geoJSON.Polygon:r=s._parseGeoJSON(t);break;case o.geoJSON.MultiPoint:r=l._parseGeoJSON(t);break;case o.geoJSON.MultiLineString:r=c._parseGeoJSON(t);break;case o.geoJSON.MultiPolygon:r=u._parseGeoJSON(t);break;case o.geoJSON.GeometryCollection:r=h._parseGeoJSON(t);break;default:throw new Error("GeometryType "+t.type+" not supported")}if(t.crs&&t.crs.type&&"name"===t.crs.type&&t.crs.properties&&t.crs.properties.name){var n=t.crs.properties.name;if(0===n.indexOf("EPSG:"))r.srid=parseInt(n.substring(5));else{if(0!==n.indexOf("urn:ogc:def:crs:EPSG::"))throw new Error("Unsupported crs: "+n);r.srid=parseInt(n.substring(22))}}else e||(r.srid=4326);return r},m.prototype.toEwkt=function(){return"SRID="+this.srid+";"+this.toWkt()},m.prototype.toEwkb=function(){var t=new p(this._getWkbSize()+4),e=this.toWkb();return t.writeInt8(1),t.writeUInt32LE((536870912|e.slice(1,5).readUInt32LE(0))>>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},m.prototype._getWktType=function(t,e){var r=t;return this.hasZ&&this.hasM?r+=" ZM ":this.hasZ?r+=" Z ":this.hasM&&(r+=" M "),!e||this.hasZ||this.hasM||(r+=" "),e&&(r+="EMPTY"),r},m.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},m.prototype._writeWkbType=function(t,e,r){var n=0;void 0!==this.srid||r&&void 0!==r.srid?(this.hasZ&&(n|=2147483648),this.hasM&&(n|=1073741824)):this.hasZ&&this.hasM?n+=3e3:this.hasZ?n+=1e3:this.hasM&&(n+=2e3),t.writeUInt32LE(n+e>>>0,!0)},m.getTwkbPrecision=function(t,e,r){return{xy:t,z:e,m:r,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,r)}},m.prototype._writeTwkbHeader=function(t,e,r,n){var o=(g.encode(r.xy)<<4)+e,a=(this.hasZ||this.hasM)<<3;if(a+=n<<4,t.writeUInt8(o),t.writeUInt8(a),this.hasZ||this.hasM){var i=0;this.hasZ&&(i|=1),this.hasM&&(i|=2),t.writeUInt8(i)}},m.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}},1141:(t,e,r)=>{t.exports=s;var n=r(537),o=r(740),a=r(2957),i=r(1199);function s(t,e){a.call(this),this.geometries=t||[],this.srid=e,this.geometries.length>0&&(this.hasZ=this.geometries[0].hasZ,this.hasM=this.geometries[0].hasM)}n.inherits(s,a),s.Z=function(t,e){var r=new s(t,e);return r.hasZ=!0,r},s.M=function(t,e){var r=new s(t,e);return r.hasM=!0,r},s.ZM=function(t,e){var r=new s(t,e);return r.hasZ=!0,r.hasM=!0,r},s._parseWkt=function(t,e){var r=new s;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{r.geometries.push(a.parse(t))}while(t.isMatch([","]));return t.expectGroupEnd(),r},s._parseWkb=function(t,e){var r=new s;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.geometries.push(a.parse(t,e));return r},s._parseTwkb=function(t,e){var r=new s;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=t.readVarInt(),o=0;o<n;o++)r.geometries.push(a.parseTwkb(t));return r},s._parseGeoJSON=function(t){for(var e=new s,r=0;r<t.geometries.length;r++)e.geometries.push(a._parseGeoJSON(t.geometries[r],!0));return e.geometries.length>0&&(e.hasZ=e.geometries[0].hasZ),e},s.prototype.toWkt=function(){if(0===this.geometries.length)return this._getWktType(o.wkt.GeometryCollection,!0);for(var t=this._getWktType(o.wkt.GeometryCollection,!1)+"(",e=0;e<this.geometries.length;e++)t+=this.geometries[e].toWkt()+",";return(t=t.slice(0,-1))+")"},s.prototype.toWkb=function(){var t=new i(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.GeometryCollection),t.writeUInt32LE(this.geometries.length);for(var e=0;e<this.geometries.length;e++)t.writeBuffer(this.geometries[e].toWkb({srid:this.srid}));return t.buffer},s.prototype.toTwkb=function(){var t=new i(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.geometries.length;if(this._writeTwkbHeader(t,o.wkb.GeometryCollection,e,r),this.geometries.length>0){t.writeVarInt(this.geometries.length);for(var n=0;n<this.geometries.length;n++)t.writeBuffer(this.geometries[n].toTwkb())}return t.buffer},s.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.geometries.length;e++)t+=this.geometries[e]._getWkbSize();return t},s.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.GeometryCollection,e.geometries=[];for(var r=0;r<this.geometries.length;r++)e.geometries.push(this.geometries[r].toGeoJSON());return e}},350:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),a=r(740),i=r(4263),s=r(1199);function l(t,e){o.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(l,o),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(i._readWkbPoint(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++)r.points.push(i._readTwkbPoint(t,e,n));return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(i._readGeoJSONPoint(t.coordinates[r]));return e},l.prototype.toWkt=function(){return 0===this.points.length?this._getWktType(a.wkt.LineString,!0):this._getWktType(a.wkt.LineString,!1)+this._toInnerWkt()},l.prototype._toInnerWkt=function(){for(var t="(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,a.wkb.LineString,t),e.writeUInt32LE(this.points.length);for(var r=0;r<this.points.length;r++)this.points[r]._writeWkbPoint(e);return e.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,a.wkb.LineString,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new i(0,0,0,0),l=0;l<this.points.length;l++)this.points[l]._writeTwkbPoint(t,e,n)}return t.buffer},l.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),9+this.points.length*t},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);e.type=a.geoJSON.LineString,e.coordinates=[];for(var r=0;r<this.points.length;r++)this.hasZ?e.coordinates.push([this.points[r].x,this.points[r].y,this.points[r].z]):e.coordinates.push([this.points[r].x,this.points[r].y]);return e}},3959:(t,e,r)=>{t.exports=c;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(350),l=r(1199);function c(t,e){a.call(this),this.lineStrings=t||[],this.srid=e,this.lineStrings.length>0&&(this.hasZ=this.lineStrings[0].hasZ,this.hasM=this.lineStrings[0].hasM)}n.inherits(c,a),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart(),r.lineStrings.push(new s(t.matchCoordinates(e))),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.lineStrings.push(a.parse(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++){var l=new s;l.hasZ=e.hasZ,l.hasM=e.hasM;for(var u=t.readVarInt(),h=0;h<u;h++)l.points.push(i._readTwkbPoint(t,e,n));r.lineStrings.push(l)}return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.lineStrings.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},c.prototype.toWkt=function(){if(0===this.lineStrings.length)return this._getWktType(o.wkt.MultiLineString,!0);for(var t=this._getWktType(o.wkt.MultiLineString,!1)+"(",e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(){var t=new l(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiLineString),t.writeUInt32LE(this.lineStrings.length);for(var e=0;e<this.lineStrings.length;e++)t.writeBuffer(this.lineStrings[e].toWkb({srid:this.srid}));return t.buffer},c.prototype.toTwkb=function(){var t=new l(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.lineStrings.length;if(this._writeTwkbHeader(t,o.wkb.MultiLineString,e,r),this.lineStrings.length>0){t.writeVarInt(this.lineStrings.length);for(var n=new i(0,0,0,0),s=0;s<this.lineStrings.length;s++){t.writeVarInt(this.lineStrings[s].points.length);for(var c=0;c<this.lineStrings[s].points.length;c++)this.lineStrings[s].points[c]._writeTwkbPoint(t,e,n)}}return t.buffer},c.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._getWkbSize();return t},c.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiLineString,e.coordinates=[];for(var r=0;r<this.lineStrings.length;r++)e.coordinates.push(this.lineStrings[r].toGeoJSON().coordinates);return e}},3452:(t,e,r)=>{t.exports=l;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(1199);function l(t,e){a.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(l,a),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(a.parse(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++)r.points.push(i._readTwkbPoint(t,e,n));return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(i._parseGeoJSON({coordinates:t.coordinates[r]}));return e},l.prototype.toWkt=function(){if(0===this.points.length)return this._getWktType(o.wkt.MultiPoint,!0);for(var t=this._getWktType(o.wkt.MultiPoint,!1)+"(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(){var t=new s(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPoint),t.writeUInt32LE(this.points.length);for(var e=0;e<this.points.length;e++)t.writeBuffer(this.points[e].toWkb({srid:this.srid}));return t.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,o.wkb.MultiPoint,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new i(0,0,0,0),l=0;l<this.points.length;l++)this.points[l]._writeTwkbPoint(t,e,n)}return t.buffer},l.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t+=5,9+this.points.length*t},l.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPoint,e.coordinates=[];for(var r=0;r<this.points.length;r++)e.coordinates.push(this.points[r].toGeoJSON().coordinates);return e}},9236:(t,e,r)=>{t.exports=c;var n=r(537),o=r(740),a=r(2957),i=r(4263),s=r(743),l=r(1199);function c(t,e){a.call(this),this.polygons=t||[],this.srid=e,this.polygons.length>0&&(this.hasZ=this.polygons[0].hasZ,this.hasM=this.polygons[0].hasM)}n.inherits(c,a),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart();var n=[],o=[];for(t.expectGroupStart(),n.push.apply(n,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),o.push(t.matchCoordinates(e)),t.expectGroupEnd();r.polygons.push(new s(n,o)),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.polygons.push(a.parse(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=0;a<o;a++){var l=new s;l.hasZ=e.hasZ,l.hasM=e.hasM;for(var u=t.readVarInt(),h=t.readVarInt(),f=0;f<h;f++)l.exteriorRing.push(i._readTwkbPoint(t,e,n));for(f=1;f<u;f++){for(var p=[],d=t.readVarInt(),g=0;g<d;g++)p.push(i._readTwkbPoint(t,e,n));l.interiorRings.push(p)}r.polygons.push(l)}return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&t.coordinates[0].length>0&&t.coordinates[0][0].length>0&&(e.hasZ=t.coordinates[0][0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.polygons.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},c.prototype.toWkt=function(){if(0===this.polygons.length)return this._getWktType(o.wkt.MultiPolygon,!0);for(var t=this._getWktType(o.wkt.MultiPolygon,!1)+"(",e=0;e<this.polygons.length;e++)t+=this.polygons[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(){var t=new l(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPolygon),t.writeUInt32LE(this.polygons.length);for(var e=0;e<this.polygons.length;e++)t.writeBuffer(this.polygons[e].toWkb({srid:this.srid}));return t.buffer},c.prototype.toTwkb=function(){var t=new l(0,!0),e=a.getTwkbPrecision(5,0,0),r=0===this.polygons.length;if(this._writeTwkbHeader(t,o.wkb.MultiPolygon,e,r),this.polygons.length>0){t.writeVarInt(this.polygons.length);for(var n=new i(0,0,0,0),s=0;s<this.polygons.length;s++){t.writeVarInt(1+this.polygons[s].interiorRings.length),t.writeVarInt(this.polygons[s].exteriorRing.length);for(var c=0;c<this.polygons[s].exteriorRing.length;c++)this.polygons[s].exteriorRing[c]._writeTwkbPoint(t,e,n);for(c=0;c<this.polygons[s].interiorRings.length;c++){t.writeVarInt(this.polygons[s].interiorRings[c].length);for(var u=0;u<this.polygons[s].interiorRings[c].length;u++)this.polygons[s].interiorRings[c][u]._writeTwkbPoint(t,e,n)}}}return t.buffer},c.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.polygons.length;e++)t+=this.polygons[e]._getWkbSize();return t},c.prototype.toGeoJSON=function(t){var e=a.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPolygon,e.coordinates=[];for(var r=0;r<this.polygons.length;r++)e.coordinates.push(this.polygons[r].toGeoJSON().coordinates);return e}},4263:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),a=r(740),i=r(1199),s=r(1865);function l(t,e,r,n,a){o.call(this),this.x=t,this.y=e,this.z=r,this.m=n,this.srid=a,this.hasZ=void 0!==this.z,this.hasM=void 0!==this.m}n.inherits(l,o),l.Z=function(t,e,r,n){var o=new l(t,e,r,void 0,n);return o.hasZ=!0,o},l.M=function(t,e,r,n){var o=new l(t,e,void 0,r,n);return o.hasM=!0,o},l.ZM=function(t,e,r,n,o){var a=new l(t,e,r,n,o);return a.hasZ=!0,a.hasM=!0,a},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();var n=t.matchCoordinate(e);return r.x=n.x,r.y=n.y,r.z=n.z,r.m=n.m,t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=l._readWkbPoint(t,e);return r.srid=e.srid,r},l._readWkbPoint=function(t,e){return new l(t.readDouble(),t.readDouble(),e.hasZ?t.readDouble():void 0,e.hasM?t.readDouble():void 0)},l._parseTwkb=function(t,e){var r=new l;return r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty||(r.x=s.decode(t.readVarInt())/e.precisionFactor,r.y=s.decode(t.readVarInt())/e.precisionFactor,r.z=e.hasZ?s.decode(t.readVarInt())/e.zPrecisionFactor:void 0,r.m=e.hasM?s.decode(t.readVarInt())/e.mPrecisionFactor:void 0),r},l._readTwkbPoint=function(t,e,r){return r.x+=s.decode(t.readVarInt())/e.precisionFactor,r.y+=s.decode(t.readVarInt())/e.precisionFactor,e.hasZ&&(r.z+=s.decode(t.readVarInt())/e.zPrecisionFactor),e.hasM&&(r.m+=s.decode(t.readVarInt())/e.mPrecisionFactor),new l(r.x,r.y,r.z,r.m)},l._parseGeoJSON=function(t){return l._readGeoJSONPoint(t.coordinates)},l._readGeoJSONPoint=function(t){return 0===t.length?new l:t.length>2?new l(t[0],t[1],t[2]):new l(t[0],t[1])},l.prototype.toWkt=function(){return void 0===this.x&&void 0===this.y&&void 0===this.z&&void 0===this.m?this._getWktType(a.wkt.Point,!0):this._getWktType(a.wkt.Point,!1)+"("+this._getWktCoordinate(this)+")"},l.prototype.toWkb=function(t){var e=new i(this._getWkbSize());return e.writeInt8(1),this._writeWkbType(e,a.wkb.Point,t),void 0===this.x&&void 0===this.y?(e.writeDoubleLE(NaN),e.writeDoubleLE(NaN),this.hasZ&&e.writeDoubleLE(NaN),this.hasM&&e.writeDoubleLE(NaN)):this._writeWkbPoint(e),e.buffer},l.prototype._writeWkbPoint=function(t){t.writeDoubleLE(this.x),t.writeDoubleLE(this.y),this.hasZ&&t.writeDoubleLE(this.z),this.hasM&&t.writeDoubleLE(this.m)},l.prototype.toTwkb=function(){var t=new i(0,!0),e=o.getTwkbPrecision(5,0,0),r=void 0===this.x&&void 0===this.y;return this._writeTwkbHeader(t,a.wkb.Point,e,r),r||this._writeTwkbPoint(t,e,new l(0,0,0,0)),t.buffer},l.prototype._writeTwkbPoint=function(t,e,r){var n=this.x*e.xyFactor,o=this.y*e.xyFactor,a=this.z*e.zFactor,i=this.m*e.mFactor;t.writeVarInt(s.encode(n-r.x)),t.writeVarInt(s.encode(o-r.y)),this.hasZ&&t.writeVarInt(s.encode(a-r.z)),this.hasM&&t.writeVarInt(s.encode(i-r.m)),r.x=n,r.y=o,r.z=a,r.m=i},l.prototype._getWkbSize=function(){var t=21;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);return e.type=a.geoJSON.Point,void 0===this.x&&void 0===this.y?e.coordinates=[]:void 0!==this.z?e.coordinates=[this.x,this.y,this.z]:e.coordinates=[this.x,this.y],e}},743:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),a=r(740),i=r(4263),s=r(1199);function l(t,e,r){o.call(this),this.exteriorRing=t||[],this.interiorRings=e||[],this.srid=r,this.exteriorRing.length>0&&(this.hasZ=this.exteriorRing[0].hasZ,this.hasM=this.exteriorRing[0].hasM)}n.inherits(l,o),l.Z=function(t,e,r){var n=new l(t,e,r);return n.hasZ=!0,n},l.M=function(t,e,r){var n=new l(t,e,r);return n.hasM=!0,n},l.ZM=function(t,e,r){var n=new l(t,e,r);return n.hasZ=!0,n.hasM=!0,n},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;for(t.expectGroupStart(),t.expectGroupStart(),r.exteriorRing.push.apply(r.exteriorRing,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),r.interiorRings.push(t.matchCoordinates(e)),t.expectGroupEnd();return t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;var n=t.readUInt32();if(n>0){for(var o=t.readUInt32(),a=0;a<o;a++)r.exteriorRing.push(i._readWkbPoint(t,e));for(a=1;a<n;a++){for(var s=[],c=t.readUInt32(),u=0;u<c;u++)s.push(i._readWkbPoint(t,e));r.interiorRings.push(s)}}return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new i(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),a=t.readVarInt(),s=0;s<a;s++)r.exteriorRing.push(i._readTwkbPoint(t,e,n));for(s=1;s<o;s++){for(var c=[],u=t.readVarInt(),h=0;h<u;h++)c.push(i._readTwkbPoint(t,e,n));r.interiorRings.push(c)}return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++){r>0&&e.interiorRings.push([]);for(var n=0;n<t.coordinates[r].length;n++)0===r?e.exteriorRing.push(i._readGeoJSONPoint(t.coordinates[r][n])):e.interiorRings[r-1].push(i._readGeoJSONPoint(t.coordinates[r][n]))}return e},l.prototype.toWkt=function(){return 0===this.exteriorRing.length?this._getWktType(a.wkt.Polygon,!0):this._getWktType(a.wkt.Polygon,!1)+this._toInnerWkt()},l.prototype._toInnerWkt=function(){for(var t="((",e=0;e<this.exteriorRing.length;e++)t+=this._getWktCoordinate(this.exteriorRing[e])+",";for(t=t.slice(0,-1),t+=")",e=0;e<this.interiorRings.length;e++){t+=",(";for(var r=0;r<this.interiorRings[e].length;r++)t+=this._getWktCoordinate(this.interiorRings[e][r])+",";t=t.slice(0,-1),t+=")"}return t+")"},l.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,a.wkb.Polygon,t),this.exteriorRing.length>0?(e.writeUInt32LE(1+this.interiorRings.length),e.writeUInt32LE(this.exteriorRing.length)):e.writeUInt32LE(0);for(var r=0;r<this.exteriorRing.length;r++)this.exteriorRing[r]._writeWkbPoint(e);for(r=0;r<this.interiorRings.length;r++){e.writeUInt32LE(this.interiorRings[r].length);for(var n=0;n<this.interiorRings[r].length;n++)this.interiorRings[r][n]._writeWkbPoint(e)}return e.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.exteriorRing.length;if(this._writeTwkbHeader(t,a.wkb.Polygon,e,r),this.exteriorRing.length>0){t.writeVarInt(1+this.interiorRings.length),t.writeVarInt(this.exteriorRing.length);for(var n=new i(0,0,0,0),l=0;l<this.exteriorRing.length;l++)this.exteriorRing[l]._writeTwkbPoint(t,e,n);for(l=0;l<this.interiorRings.length;l++){t.writeVarInt(this.interiorRings[l].length);for(var c=0;c<this.interiorRings[l].length;c++)this.interiorRings[l][c]._writeTwkbPoint(t,e,n)}}return t.buffer},l.prototype._getWkbSize=function(){var t=16;this.hasZ&&(t+=8),this.hasM&&(t+=8);var e=9;this.exteriorRing.length>0&&(e+=4+this.exteriorRing.length*t);for(var r=0;r<this.interiorRings.length;r++)e+=4+this.interiorRings[r].length*t;return e},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);if(e.type=a.geoJSON.Polygon,e.coordinates=[],this.exteriorRing.length>0){for(var r=[],n=0;n<this.exteriorRing.length;n++)this.hasZ?r.push([this.exteriorRing[n].x,this.exteriorRing[n].y,this.exteriorRing[n].z]):r.push([this.exteriorRing[n].x,this.exteriorRing[n].y]);e.coordinates.push(r)}for(var i=0;i<this.interiorRings.length;i++){for(var s=[],l=0;l<this.interiorRings[i].length;l++)this.hasZ?s.push([this.interiorRings[i][l].x,this.interiorRings[i][l].y,this.interiorRings[i][l].z]):s.push([this.interiorRings[i][l].x,this.interiorRings[i][l].y]);e.coordinates.push(s)}return e}},740:t=>{t.exports={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7},geoJSON:{Point:"Point",LineString:"LineString",Polygon:"Polygon",MultiPoint:"MultiPoint",MultiLineString:"MultiLineString",MultiPolygon:"MultiPolygon",GeometryCollection:"GeometryCollection"}}},2104:(t,e,r)=>{t.exports=a;var n=r(740),o=r(4263);function a(t){this.value=t,this.position=0}a.prototype.match=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,t[e];return null},a.prototype.matchRegex=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++){var r=this.value.substring(this.position).match(t[e]);if(r)return this.position+=r[0].length,r}return null},a.prototype.isMatch=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,!0;return!1},a.prototype.matchType=function(){var t=this.match([n.wkt.Point,n.wkt.LineString,n.wkt.Polygon,n.wkt.MultiPoint,n.wkt.MultiLineString,n.wkt.MultiPolygon,n.wkt.GeometryCollection]);if(!t)throw new Error("Expected geometry type");return t},a.prototype.matchDimension=function(){switch(this.match(["ZM","Z","M"])){case"ZM":return{hasZ:!0,hasM:!0};case"Z":return{hasZ:!0,hasM:!1};case"M":return{hasZ:!1,hasM:!0};default:return{hasZ:!1,hasM:!1}}},a.prototype.expectGroupStart=function(){if(!this.isMatch(["("]))throw new Error("Expected group start")},a.prototype.expectGroupEnd=function(){if(!this.isMatch([")"]))throw new Error("Expected group end")},a.prototype.matchCoordinate=function(t){var e;if(!(e=t.hasZ&&t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]):t.hasZ||t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]):this.matchRegex([/^(\S*)\s+([^\s,)]*)/])))throw new Error("Expected coordinates");return t.hasZ&&t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4])):t.hasZ?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])):t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),void 0,parseFloat(e[3])):new o(parseFloat(e[1]),parseFloat(e[2]))},a.prototype.matchCoordinates=function(t){var e=[];do{var r=this.isMatch(["("]);e.push(this.matchCoordinate(t)),r&&this.expectGroupEnd()}while(this.isMatch([","]));return e},a.prototype.skipWhitespaces=function(){for(;this.position<this.value.length&&" "===this.value[this.position];)this.position++}},543:(t,e,r)=>{e.Types=r(740),e.Geometry=r(2957),e.Point=r(4263),e.LineString=r(350),e.Polygon=r(743),e.MultiPoint=r(3452),e.MultiLineString=r(3959),e.MultiPolygon=r(9236),e.GeometryCollection=r(1141)},1865:t=>{t.exports={encode:function(t){return t<<1^t>>31},decode:function(t){return t>>1^-(1&t)}}},9209:(t,e,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof o[n[e]]&&(t[t.length]=n[e]);return t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.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";r.r(n),r.d(n,{BOTTOM_GRID:()=>s,CENTER_VALENCIA:()=>S,COLORS:()=>m,DAY_VALUE:()=>d,DEFAULT_NAME_MARGIN_Y:()=>p,DIVSIZE:()=>y,HEIGH_GRID:()=>u,IDIOMA:()=>e,LEFT_GRID:()=>a,NAME_MARGIN_Y_BARRIOS:()=>Ar,NIGHT_VALUE:()=>g,RIGTH_GRID:()=>i,RIGTH_TOOLBOX:()=>h,TOP_GRID:()=>l,TOP_GRID_SIN_LEYENDA:()=>c,TOP_LEGEND:()=>o,TOP_TOOLBOX:()=>f,addDatesToGaps:()=>Nt,addPointInteger:()=>E,calcularRuta:()=>ht,calculateXAxisMonth:()=>v,calculateXAxisStart:()=>Mt,calculateXAxisYear:()=>I,changeImg:()=>ct,chargeData:()=>ze,chartHeaderOptions:()=>Kn,chartOptions:()=>Hn,clearInputs:()=>Be,closeFilter:()=>lt,closePopUp:()=>it,commonPostFetch:()=>et,configureDataGaugeMonth:()=>Q,configureDataLine:()=>X,configureGaugeYearBig:()=>Ct,createChart:()=>Fn,createCheckBoxFilter:()=>dt,createCheckBoxFilterVar:()=>mt,createGauge:()=>q,createLeafletMap:()=>ee,createLeafletMapPolygon:()=>te,createObjectMarkerElements:()=>re,createSerie:()=>je,drawMarkers:()=>oe,drawMarkersPolygon:()=>ae,echartAccesosBarYear:()=>he,echartAccesosGaugeMonth:()=>pe,echartAccesosGaugeVehicles:()=>Yt,echartAccesosGaugeYear:()=>ge,echartAccesosHorStackedBarVehicles:()=>qt,echartAccesosLineMonth:()=>ye,echartAccesosPieVehicles:()=>Kt,echartAccesosVerStackedBarVehicles:()=>Xt,echartAccessosCiutat:()=>xt,echartAccessosCiutatPortada:()=>Pt,echartAcessosAnellCiclista:()=>le,echartAiguaBarMonth:()=>kr,echartAiguaGaugeSemicircle:()=>Br,echartAiguaRelojSemicircle:()=>$r,echartAiguaStackedBarYears:()=>Fr,echartAnellBarYear:()=>ue,echartAnellCiclista:()=>ce,echartAnellGaugeMonth:()=>fe,echartAnellGaugeYear:()=>de,echartAnellLineMonth:()=>me,echartBarrisBarYear:()=>Gr,echartBarrisGaugeMonth:()=>Wr,echartBarrisGaugeYear:()=>jr,echartBarrisLineMonth:()=>Vr,echartBenimamet:()=>Mr,echartConsumAguaBarris:()=>wr,echartConsumTotalAgua:()=>Tr,echartDesKgsBar:()=>an,echartDesKgsGauge:()=>nn,echartDesKgsHorStackedBar:()=>Qr,echartDesKgsPerTipusResidu:()=>Kr,echartDesKgsPie:()=>sn,echartDesKgsStackedBar:()=>tn,echartExposicio:()=>Lr,echartGaugeMonth:()=>F,echartGaugeYear:()=>G,echartHeatMap:()=>go,echartInstancesSeuElectronicaBarMonth:()=>hn,echartInstancesSeuElectronicaRelojSemicircle:()=>gn,echartInstancesSeuElectronicaStackedBarYears:()=>Sn,echartInstanciesDonadesAlta:()=>bn,echartInstanciesSeuElectronica:()=>un,echartIntensidadAnualCiclista:()=>ve,echartIntensidadDiarialCiclista:()=>Me,echartIntensidadMensualCiclista:()=>Ie,echartIntensidadRealTimeCiclista:()=>we,echartKgsResidus:()=>Yr,echartKgsResidusBarMonth:()=>on,echartKgsResidusRelojSemicircle:()=>en,echartKgsResidusStackedBarYears:()=>Xr,echartLine:()=>Tt,echartLineLinia:()=>Ze,echartLineTitol:()=>Ye,echartMalilla:()=>Dr,echartMestalla:()=>Or,echartNO:()=>to,echartNO2:()=>Xn,echartNO2Portada:()=>qn,echartNO2PresupuestosParticipativos:()=>Qn,echartNOPresupuestosParticipativos:()=>eo,echartNOX:()=>ro,echartNOXPresupuestosParticipativos:()=>no,echartNotificacionsTelematic:()=>vn,echartO3:()=>uo,echartO3PresupuestosParticipativos:()=>ho,echartPIAEDonadesAltaBarMonth:()=>Pn,echartPIAEDonadesAltaGaugeMonth:()=>kn,echartPIAEDonadesAltaGaugeYear:()=>Bn,echartPIAEDonadesAltaStackedBarYears:()=>Rn,echartPM1:()=>io,echartPM10:()=>oo,echartPM10PresupuestosParticipativos:()=>ao,echartPM1PresupuestosParticipativos:()=>so,echartPM25:()=>lo,echartPM25PresupuestosParticipativos:()=>co,echartPerellonet:()=>xr,echartPuntosMedidaBicis:()=>Ae,echartPuntosMedidaTrafico:()=>se,echartResolucionsAssentades:()=>En,echartSO2:()=>fo,echartSO2PresupuestosParticipativos:()=>po,echartSeuElectronica:()=>cn,echartSeuElectronicaBarMonth:()=>fn,echartSeuElectronicaRelojSemicircle:()=>mn,echartSeuElectronicaStackedBarYears:()=>An,echartSonometroManana:()=>zn,echartSonometroNoche:()=>Wn,echartSonometroTarde:()=>jn,echartSotenis:()=>Rr,echartTemperatureMitjanaDiaria:()=>$n,echartUsuarisPerLinea:()=>pr,echartUsuarisPerLiniaBarYear:()=>Sr,echartUsuarisPerLiniaGaugeMonth:()=>or,echartUsuarisPerLiniaGaugeYear:()=>rr,echartUsuarisPerLiniaLineMonth:()=>mr,echartUsuarisPerTitol:()=>hr,echartUsuarisPerTitolBarYear:()=>yr,echartUsuarisPerTitolGaugeMonth:()=>nr,echartUsuarisPerTitolGaugeYear:()=>er,echartUsuarisPerTitolLineMonth:()=>gr,echartUsuarisTotals:()=>cr,echartUsuarisTotalsBarMonth:()=>Ne,echartUsuarisTotalsGaugeMonth:()=>sr,echartUsuarisTotalsGaugeYear:()=>tr,echartUsuarisTotalsStackedBarYears:()=>lr,echartVerStackedBar:()=>B,echartVieBarYear:()=>Ht,echartVieGaugeMonth:()=>zt,echartVieGaugeYear:()=>Zt,echartVieLineMonth:()=>Jt,echartViePrincCiutat:()=>$t,echartYearInstancesSeuElectronicaGaugeSemicircle:()=>pn,echartYearKgsResidusGaugeSemicircle:()=>rn,echartYearSeuElectronicaGaugeSemicircle:()=>dn,filterData:()=>Ke,filterDatesUpdate:()=>T,filterEMT1Update:()=>$e,filterEMT2Update:()=>Fe,filterVarUpdate:()=>gt,filterWindow:()=>st,formatDDMM:()=>vt,formatName:()=>K,formatRoundTooltip:()=>z,formatSixDigitDate:()=>At,formatTooltip:()=>M,formatearFecha:()=>Et,formatoFecha:()=>yt,formatoFecha2:()=>St,formatoFecha3:()=>bt,formatterReloj:()=>R,generateDatesArray:()=>Dt,getCommonOptionDonut:()=>W,getCommonOptionGaugeUmbral:()=>j,getCommonOptionPie:()=>Y,getCommonOptions:()=>k,getCommonOptionsBar:()=>V,getCommonOptionsGaugeMonth:()=>H,getCommonOptionsGaugeYears:()=>J,getCommonOptionsLimited:()=>Er,getConfigurationGaugeYears:()=>Z,getDateFromStr:()=>Lt,getMaxValue:()=>x,getMonth:()=>_,getMonthComplete:()=>D,getStringFromDate:()=>_t,getTime:()=>It,getWidthElementChart:()=>P,handlerActivarFiltro:()=>Je,handlerDesactivarFiltro:()=>He,includeHTMLCabecera:()=>rt,includeHTMLFooter:()=>ot,includeHTMLMenu:()=>nt,indoPopUp:()=>at,initChart:()=>tt,initStackedBarChartSedeElec:()=>yn,listeneresAgua:()=>vr,listeneresContamina:()=>Jn,listeneresEMT:()=>qe,listeneresVehicles:()=>Bt,llamadasIniciales:()=>pt,loadAnaliticaFrames:()=>Zn,loadContamincaioMap:()=>Ao,loadMap:()=>Yn,mapPuntosMedidaBicis:()=>Se,mapPuntosMedidaTrafico:()=>ie,normalImg:()=>ut,obtenerGeoJson:()=>ne,obtenerRuta:()=>ft,prepareData:()=>br,printDataChart:()=>O,printNoDataChart:()=>N,setDOMData:()=>_e,splitData:()=>U,tableAcceso:()=>Ft,tableVariacio:()=>Gt,tableVias:()=>Vt,tramosBicis:()=>De,usdEmtUsuarisPerLinea:()=>dr,usdEmtUsuarisPerTitol:()=>fr,usdEmtUsuarisTotals:()=>ur,xAxisFormatWithoutYear:()=>wt,yAxisFormat:()=>w});var t=r(2725);const e="ca_ES",o="8%",a="2.5%",i="5%",s="18%",l="20%",c="10%",u="90%",h="1%",f="0%",p=0,d=65,g=55,m=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],y=33,S=[39.46975,-.37739],A=27,b=30;function E(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const r={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",r):t.toLocaleString(e,r)}function v(t){return 100*(1-17/t)}function I(t){return 100*(1-7/t)}function M(t,e=!1){let r=`<p>${t[0].name}</p>`;return t.forEach((t=>{const n=e?Math.round(t.data):t.data,o=`<div>${a=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${a}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?E(n):"-"}</strong></div>`;var a;r+=o})),r}function w(t){return E(t)}function T(){const t=$("#formFilterDates").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterDatesParam",e),Dashboards.fireChange("updateFilter","True")}function C(){const t=$("#formFilterDates").find("input");$(t).each(((t,e)=>{e.checked&&(e.checked=!1)}));const e=$("#formFilterVar").find("input");$(e).each(((t,e)=>{e.checked&&(e.checked=!1)})),function(){let t=0;const e=$("#formFilterDates").find("input");$(e).each(((e,r)=>{t+=1,r.checked=!0})),t=0;const r=$("#formFilterVar").find("input");$(r).each(((e,r)=>{t+=1,null!=render_tableVariacio?t<=2&&(r.checked=!0):t<=3&&(r.checked=!0)})),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}()}function _(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())]}function D(t){return{1:"GENER",2:"FEBRER",3:"MARÇ",4:"ABRIL",5:"MAIG",6:"JUNY",7:"JULIO",8:"AGOST",9:"SETEMBRE",10:"OCTUBRE",11:"NOVEMBRE",12:"DESEMBRE"}[t]}function N(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function O(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function U(t,e){return t.reduce(((t,r)=>{const n=r[e];return t[n]||(t[n]=[]),t[n].push(r),t}),{})}function x(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function P(t){return Math.round(document.getElementById(t).offsetWidth/y)}function R(t,e,r){const n=E(Math.round(e)),o=_(t[r][0]),a=t[r][1],i=`\n\n\n${o} ${a} : ${n}`,s=`${n}\n${o} ${a}`;return window.innerWidth<=1710?i:s}function k(t,e,r,n,p,d,g,m=5,y="",S=p,A=100,b,E=void 0,v=void 0){return{title:{text:y,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>M(t),textStyle:{fontFamily:"Montserrat"}},legend:e?{type:"plain",data:e,textStyle:{fontFamily:"Montserrat"},top:E||o,selected:b}:null,grid:{left:a,right:i,bottom:s,top:e?E?"30%":l:c,heigh:u,containLabel:!0},xAxis:{type:"category",data:r,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:n,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,g]},type:"value",scale:!0,min:v,axisLabel:{margin:m,formatter:w,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:d,data:r,start:S,end:A,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:{show:d,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:h,top:f}}}function B(t,e,r,n,o="",c="total",h=0,f=1,p=2,d=m){if(0===r.length)N(`#${t}`,`#${e}`);else{O(`#${e}`,`#${t}`);const g=[];let m=U(r,h);const y=new Set(r.map((t=>t[f]))),S=Object.keys(m);y.forEach((t=>{S.forEach((e=>{void 0===m[e].find((e=>e[f]===t))&&(m[e].push([m[e][0][h],t,void 0]),m[e][0][1].length>4?m[e].sort(((t,e)=>{const[r,n]=t[1].split("/"),[o,a]=e[1].split("/"),i=new Date(n,r-1,1),s=new Date(a,o-1,1);return i.getTime()-s.getTime()})):m[e].sort())}))}));const A=Object.entries(m).sort(((t,e)=>t[0].localeCompare(e[0]))),b=""===c?90:0;m=Object.fromEntries(A),Object.keys(m).forEach((t=>{g.push({name:t,type:"bar",stack:c,label:{show:!0,fontFamily:"Montserrat",rotate:b,formatter:t=>E(Math.round(t.value))},emphasis:{focus:"series"},data:m[t].map((t=>t[p]))})}));const T=""!==c?v(y.size):I(y.size);tt(t,{color:d,title:{text:o,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat"},formatter:t=>M(t,!0)},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:a,right:i,bottom:s,top:l,heigh:u,containLabel:!0},yAxis:{type:"value",splitNumber:4,name:n,nameLocation:"end",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666"},axisLabel:{formatter:w,textStyle:{fontSize:8,fontFamily:"Montserrat",color:"#666"}}},xAxis:{type:"category",data:[...y],axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:g,toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50},dataZoom:[{show:!0,data:[...y],start:T,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)"}}}]})}}function F(t,e,r,n,o,a,i){if(0===o.length)N(`#${t}`,`#${r}`),N(`#${e}`,`#${n}`);else{O(`#${r}`,`#${t}`),O(`#${n}`,`#${e}`);const s=0,l=2,c=Q(o,l,1),u=c[0],h=c[1],f=c[2],p=c[3],d=c[5],g=P(t),m=q(u,l,s,d,g),y=q(h,l,s,d,g);tt(t,Z(`${a}${D(String(Object.keys(f)[1]))}`,p,m,g)),tt(e,Z(`${i}${D(String(Object.keys(f)[0]))}`,p,y,g))}}function G(t,e,r,n){0===r.length?N(`#${t}`,`#${e}`):O(`#${e}`,`#${t}`);const o=x(r,1,1.1),a=P(t);let i=180;o>9999999&&(i=95);const s=q(r,1,0,i,a);tt(t,Z(`${n} ${r[0][2]}`,o,s,a))}function V(t,e,r=-45,n="",o=e){const a=new Set,i=[];t.forEach((t=>{const e=t[0].toString().padStart(2,"0");a.add(`${e}/${t[1]}`),i.push(Math.round(t[2]))}));const s=i.length<100?40:80;return k({name:o,type:"bar",smooth:!1,barMaxWidth:40,itemStyle:{color:"#5470c6"},textStyle:{fontFamily:"Montserrat"},data:i},null,Array.from(a.values()),e,s,!0,r,25,n)}function z(t,e){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let n=`${t.name} : `;return n+=`<span style="font-weight:bold">${E(t.value)}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),r+n}function j(t,e,r,n){return{series:[{type:"gauge",center:["50%","50%"],startAngle:200,endAngle:-20,min:0,max:100,splitNumber:0,progress:{show:!1,width:5,itemStyle:{color:"#666"}},axisLine:{lineStyle:{width:18}},axisTick:{show:!1},splitLine:{length:15,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:25,color:"#999",fontSize:20,show:!1},anchor:{show:!0,showAbove:!0,size:25,itemStyle:{borderWidth:10},show:!1},pointer:{show:!0,icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"12%",width:20,offsetCenter:[0,"-40%"],itemStyle:{color:"#ccc"}},axisLine:{lineStyle:{width:35,color:[[e,"#e56b6f"],[e+r,"#ffbf69"],[1,"#a1c483"]]}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{show:!0,offsetCenter:[0,"45%"],textStyle:{color:"#000",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:15}},detail:{fontSize:30,offsetCenter:[0,"90%"],valueAnimation:!0,color:"#666",textStyle:{color:"#000",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:35}},data:[{value:t,name:n}]}]}}function W(t,e,r,n){return{tooltip:{trigger:"item",formatter:t=>z(t,!1),textStyle:{fontSize:13.5,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},title:{text:e,left:"center",top:"40%",textStyle:{fontSize:13.5,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{left:"center",bottom:"0%",textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},series:[{top:"0%",bottom:"15%",type:"pie",radius:r||["65%","75%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:5,borderColor:"#f1f1f1",borderWidth:1},label:{show:!1,position:"center",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},emphasis:{label:{show:!1,fontSize:20}},labelLine:{show:!1},color:n||["#fcb9b2","#ffd97d","#64a6bd","#98c9a3","#ff9b85"],data:t}]}}function Y(t,e,r,n=m){return{textStyle:{fontFamily:"Montserrat"},title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:r-4,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"item",textStyle:{fontFamily:"Montserrat"},formatter:t=>z(t,!0)},legend:{orient:"horizontal",textStyle:{fontFamily:"Montserrat"},left:e.length>5?"10%":"12%",bottom:"10%",top:"65%",selectedMode:!1},series:[{type:"pie",radius:"33%",data:e,color:n,top:"-30%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:10,top:20}}}function Z(t,e,r,n){return{color:m,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>z(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>E(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:r,detail:{fontSize:n/1.2,color:"inherit",formatter:t=>E(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:A,top:b}}}function J(t,e="",r){const n=[],o=x(t,1,1.1),a=o.toString().length>=9?100:95,i=115===a?-45:-35;let s=t.length<5?t.length*i:-190;for(let e=0;e<t.length;e+=1)n.push({value:t[e][1],name:String(t[e][0]),title:{offsetCenter:[String(s),"20%"],fontFamily:"Montserrat"},detail:{offsetCenter:[String(s),"35%"],fontFamily:"Montserrat"}}),s+=a;return Z(e,o,n,r)}function H(t,e,r="",n){return{title:{text:r,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:x(t,2),itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:10,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:t=>E(Math.round(t))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[-5,"-10%"],fontSize:n+5,fontWeight:"bolder",formatter:r=>R(t,r,e),fontFamily:"Montserrat",color:"inherit"},data:[{value:t[e][2]}]},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:A,top:b}}}function K(t){if(t.length>=29){const e=t.split(" ");let r="",n="";for(const t of e)`${r} ${t}`.length<=29?r+=(r?" ":"")+t:(n+=`${r}\n`,r=t);return n+=r,n}return t}function q(t,e,r,n,o){let a=20,i=35,s=-190,l=n;t.length<=2&&(s=-140,l+=100,a=25,i=42);const c=m.slice(),u=[];for(let n=0;n<t.length;n+=1)u.push({value:t[n][e],name:K(t[n][r]),color:c.shift(),title:{offsetCenter:[String(s),`${String(a)}%`],fontFamily:"Montserrat",fontSize:o-3},detail:{offsetCenter:[String(s),`${String(i)}%`],fontFamily:"Montserrat"}}),s+=l,(n+1)%3==0&&(i+=30,a+=30,s=-190);return u}function X(t,e,r=!1){const{resultset:n}={resultset:t},o=new Set,a=new Set,i=e,s=n.map((([t,e,n])=>{const i=r?Math.round(n):n;return o.add(t),a.add(e),{day:e,type:t,value:i}})),l=Array.from(a.values()),c=Array.from(o.values());return c.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[c.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=l.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,type:"line",symbol:"circle",color:i.shift(),symbolSize:6,smooth:!1,data:r}})),a,c]}function Q(t,e,r){const n=x(t,e,1.1);let o=50,a=180;n>9999999&&(o=65,a=95);const i=U(t,r);let[s,l]=Object.values(i);return Object.values(i).slice(1).forEach((t=>{l=t})),[l,s,i,n,o,a]}function tt(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);return n.setOption(e,!0),$(window).on("resize",(()=>{null!=n&&void 0!==n&&n.resize()})),n}function et(){$("#chart2").css("width","100%")}function rt(){let t,e,r,n;const o=document.getElementsByTagName("*");for(t=0;t<o.length;t+=1)if(e=o[t],r=e.getAttribute("include-html-cabecera"),r)return n=new XMLHttpRequest,n.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(e.innerHTML=this.responseText),404===this.status&&(e.innerHTML="No se ha podido cargar correctamente."))},n.open("GET",r,!0),void n.send()}function nt(t){let e,r,n,o;const a=document.getElementsByTagName("*");for(e=0;e<a.length;e+=1)if(r=a[e],n=r.getAttribute("include-html-menu"),n)return o=new XMLHttpRequest,o.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(r.innerHTML=this.responseText,$(t).removeClass("imgNavMenu"),$(t).addClass("imgNavMenuActive")),404===this.status&&(r.innerHTML="No se ha podido cargar correctamente."))},o.open("GET",n,!0),void o.send()}function ot(){let t,e,r,n;const o=document.getElementsByTagName("*");for(t=0;t<o.length;t+=1)if(e=o[t],r=e.getAttribute("include-html-footer"),r)return n=new XMLHttpRequest,n.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(e.innerHTML=this.responseText),404===this.status&&(e.innerHTML="No se ha podido cargar correctamente."))},n.open("GET",r,!0),void n.send()}function at(){$("#idPopupInfo").show()}function it(){$("#idPopupInfo").hide()}function st(){"none"===$("#layoutFilter").css("display")?$("#layoutFilter").show():$("#layoutFilter").hide()}function lt(){$("#layoutFilter").hide()}function ct(t,e){0!==t.childNodes[1].childNodes.length?$(`#${t.children[0].children[0].children[0].children[0].id}`).attr("src",`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages/${t.children[0].children[0].children[0].children[0].src.split("/").pop().split(".")[0]}_hover.svg}`):t.children[0].src=`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages%3A${e}_hover.svg/content`}function ut(t,e){0!=t.childNodes[1].childNodes.length?$(`#${t.children[0].children[0].children[0].children[0].id}`).attr("src",`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages/${t.children[0].children[0].children[0].children[0].src.split("/").pop().split("_")[0]}.svg}`):t.children[0].src=`/pentaho/api/repos/%3Apublic%3Asc_valencia%3ACiutat%3Abuild%3Aimages%3A${e}.svg/content`}function ht(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 ft(t){return`${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 pt(t){$(document).click((()=>{const t=$("#layoutFilter");t.is(event.target)||t.has(event.target).length||t.hide()})),rt(),nt(t),ot()}function dt(t,e,r){const n=$("#formFilterDates");if(""===Dashboards.getParameterValue("updateFilter")){const r=new Set;for(let n=t-1;n>0;--n)r.add(e[n]);for(const[t,e]of r.entries())n.append(`<input type="checkbox" id="${t}" onclick="legacy.filterDatesUpdate();" />${e}<br /></input>`);C(),T()}}function gt(){const t=$("#idFilterVar").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id.replaceAll("/","-"))})),Dashboards.fireChange("filterVarParam",e),Dashboards.fireChange("updateFilterVar","True")}function mt(t,e){const r=$("#formFilterVar");if(""===Dashboards.getParameterValue("updateFilterVar")){for(let t=e.length-1;t>=0;t--)r.append(`<input type="checkbox" id="${e[t]}" onclick="legacy.filterVarUpdate();" />${e[t]}<br /></input>`);C(),gt()}}function yt(t){return t.replace(/^(\d{4})[-|\/](\d{2})[-|\/](\d{2})$/g,"$3/$2/$1")}function St(t){return t.replace(/^(\d{4})(\d{2})(\d{2})$/g,"$3/$2/$1")}function At(t){const e=`20${t.slice(0,2)}`,r=t.slice(2,4);return`${t.slice(4,6)}/${r}/${e}`}function bt(t,e){const r=t.slice(0,2),n=t.slice(3,6);let o;return o=null==e?`20${t.slice(7,9)}`:`20${e.slice(5,7)}`,2===o.length&&(o="2022"),`${r}/${{Gen:"01",Feb:"02",Mar:"03",Abr:"04",Mai:"05",Jun:"06",Jul:"07",Ago:"08",Sep:"09",Oct:"10",Nov:"11",Des:"12"}[n]}/${o}`}function Et(t){let e=t.getUTCDate().toString();1===e.length&&(e=`0${e}`);let r=(t.getMonth()+1).toString();return 1===r.length&&(r=`0${r}`),`${e}/${r}/${t.getFullYear().toString()}`}function vt(t){const e=t.slice(0,2);return`${t.slice(3,5)}/${e}`}function It(t){const e=t.toString().match(/(\d{2}:\d{2})/);return e?e[1]:null}function Mt(t){return 100*(t-120)/t}function wt(t){return Array.from(t.values()).map((t=>{const[e,r]=t.split("/");return vt(t)}))}function Tt(t,e,r,n,o,a,i,s,l=!1,c=!1,u=void 0,h=!0,f=m.slice(),p=!1,d=void 0,g=void 0){const y=t.resultset||t;if(0===y.length)N(`#${a}`,`#${i}`),s&&N(`#${s}`,`#${i}`);else{O(`#${i}`,`#${a}`),s&&O(`#${i}`,`#${s}`);const t=X(y,f,p),m=t[0],S=t[1],A=t[2],b=h?A:null,E=c?wt(S):Array.from(S.values());void 0===u&&(u=l?v(S.size):Mt(S.size)),tt(a,k(m,b,E,o,u,e,r,void 0,n,void 0,void 0,void 0,d,g))}}function Ct(t,e,r=!1){const n=[],o=1.1*x(t,1);let a,i=50,s=250,l=20,c=30,u=-80;o>9999999&&(i=65,s=75);const h=r?4:3;for(let r=0;r<t.length;r+=1)a=String(t[r][0]).replace(/\[.*?\]/g,""),a=K(a),n.push({value:t[r][1],name:a,title:{offsetCenter:[`${String(u)}%`,`${String(l)}%`],fontFamily:"Montserrat",fontSize:e},detail:{offsetCenter:[`${String(u)}%`,`${String(c)}%`],fontFamily:"Montserrat",fontSize:e}}),u+=s,(r+1)%h==0&&(c+=30,l+=30,u=-80);return[o,n,i]}function Lt(t){const e=t.split("/"),r=parseInt(e[0],10),n=parseInt(e[1],10)-1,o=parseInt(e[2],10);return new Date(o,n,r)}function _t(t){return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getFullYear())}`}function Dt(t,e){const r=[];for(;t<=e;){const e=_t(t);r.push(e),t.setDate(t.getDate()+1)}return r}function Nt(t){const e=Array.from(t.keys(),(t=>Lt(t))),r=[],n=[],o=Dt(new Date(Math.min(...e)),new Date(Math.max(...e)));return o.forEach((e=>{if(t.has(e)){const r=t.get(e);n.push(r)}else n.push(null)})),r.push(o),r.push(n),r}const Ot="ca_ES",Ut={es_ES:new Map([["chartAccesosGauge","ACCESOS A LA CIUDAD: ACUMULADO AÑO }"],["chartViesGaugeYear","VIAS PRINCIPALES DE LA\nCIUDAD: ACUMULADO AÑO }"],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]]),ca_ES:new Map([["chartAccesosGauge","ACCESSOS A LA CIUTAT: ACUMULAT ANY "],["chartViesGaugeYear","VIES PRINCIPALS DE LA\nCIUTAT: ACUMULAT ANY "],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]])};function xt(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],l=Mt(a.size),c=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),h={title:{text:`${Ut[Ot].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:`${Ut[Ot].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:i,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAcessosCiutat",u,h)}function Pt(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],l=(0,t.resultsetWithFields)(r),c=l.map((t=>t.value)),u=Math.max(...c),h=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),f={grid:{left:"0",right:"0",bottom:"0",top:"200",containLabel:!0},title:{text:`${Ut[Ot].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i,axisLabel:{margin:15}},yAxis:{name:`${Ut[Ot].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w},max:u},dataZoom:{show:!1},toolbox:{show:!1}};(0,t.configureLinesChartValidates)("chartTransitAccessosCiutat",h,f)}function Rt(){document.querySelector("#idFiltrar").style.visibility="visible"}function kt(){document.querySelector("#idFiltrar").style.visibility="hidden"}function Bt(){render_tableVariacio.listeners=["filterVarParam","updateFilterVar"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("updateFilterVar"),document.querySelector("#idVariacio").addEventListener("click",Rt),document.querySelector("#idAcessosCiutat").addEventListener("click",kt),document.querySelector("#idViePrincCiutat").addEventListener("click",kt)}function $t(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],l=Mt(a.size),c=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Accesos-Vias-Coches","KpiValid-365-Accesos-Vias-Coches"],["Kpi-Accesos-Vias-Coches"]),h={title:{text:`${Ut[Ot].get("tituloGraficaVias")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:`${Ut[Ot].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:i,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartViePrincCiutat",u,h)}function Ft(t,e){const r=[];if(null!=e.resultset&&e.resultset.length>0)for(let t=0;t<e.resultset.length;t++){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableAcceso",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}],rowClick(t,e){}})}function Gt(t,e){const r=[],n=Dashboards.getParameterValue("filterVarParam"),o=new Set;if(null!=e.resultset&&e.resultset.length>0){if(n.length>0)for(let t=n.length-1;t>=0;t-=1)for(let a=0;a<e.resultset.length;a+=1)n[t]===e.resultset[a][3]&&(o.add(e.resultset[t][3]),r.push({dat:e.resultset[a][3].replaceAll("-","/"),tram:e.resultset[a][1],int:E(e.resultset[a][6]),vari:E((100*parseFloat(e.resultset[a][5])).toFixed(2)),dataRe:e.resultset[a][2].replaceAll("-","/"),intRe:E(e.resultset[a][7])}));else for(let t=0;t<e.resultset.length;t+=1)o.add(e.resultset[t][3].replaceAll("-","/")),r.push({dat:e.resultset[t][3].replaceAll("-","/"),tram:e.resultset[t][1],int:e.resultset[t][6],vari:(100*parseFloat(e.resultset[t][5])).toFixed(2),dataRe:e.resultset[t][2].replaceAll("-","/"),intRe:e.resultset[t][7]});const t=Array.from(o);mt(t.length,t)}0===n.length?($("#chartVariacio").hide(),$("#no_dataChartVariacio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataChartVariacio").show()):($("#chartVariacio").show(),$("#no_dataChartVariacio").hide()),new Tabulator("#chartVariacio",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["dat"],columns:[{title:"Data",field:"dat",hozAlign:"center",headerHozAlign:"center"},{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",width:560},{title:"Intensitat",field:"int",hozAlign:"center",headerHozAlign:"center"},{title:"Variació",field:"vari",hozAlign:"center",headerHozAlign:"center",formatter:(t,e,r)=>(parseFloat(t.getValue())<0?t.getElement().classList.add("custom-red-cell"):t.getElement().classList.add("custom-green-cell"),t.getValue())},{title:"Data Referència",field:"dataRe",hozAlign:"center",headerHozAlign:"center"},{title:"Intensitat Referència",field:"intRe",hozAlign:"center",headerHozAlign:"center"}],rowClick(t,e){}})}function Vt(t,e){const r=[];if(null!=e.resultset)for(let t=0;t<e.resultset.length;t+=1){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableViaPri",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}],rowClick(t,e){}})}function zt(t,e){document.querySelector("#tabViePrincCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartViesMesActual","chartViesMesAnterior","no_dataViesMesActual","no_dataViesMesAnterior",e.resultset,"VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ","VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ")}))}))}const jt={color:void 0,title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"}},splitNumber:3,series:{type:"gauge",max:void 0,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:10},axisLabel:{show:!0,distance:70,formatter:void 0,fontFamily:"Montserrat",color:"#666"},data:[],detail:{fontSize:12,color:"inherit"}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:30}};function Wt(e,r){const n=r.resultset,o=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"];if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,data:1,time:2},[a,i]=(0,t.configureDataGaugeCommon)(n,r,o.slice(),e.fontSize,e.paramOffsetCenterTitle,e.paramOffsetCenterDetail,e.paramOffsetLabel,e.paramCalculatedOffset,e.paramNumberOfElementsByLine),s={...jt};s.title.text=e.chartName,s.series.max=a,s.series.data=i,s.series.detail.fontSize=e.fontSize,s.series.detail.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.series.axisTick.splitNumber=5,s.color=o.slice(),s.series.axisLabel.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.tooltip.formatter=e=>function(e){let r=`${e.name} : `;return r+=`<span style="font-weight:bold">${(0,t.addPointInteger)(Math.round(e.value))}</span>`,e.marker+r}(e),(0,t.initChart)(e.idChart,s)}}function Yt(t,e){Wt({idChart:"chartAccesosGauge",idNoData:"no_dataAccesosGauge",chartName:`${Ut[Ot].get("chartAccesosGauge")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-75,paramCalculatedOffset:75,paramNumberOfElementsByLine:3},e)}function Zt(t,e){Wt({idChart:"chartViesGaugeYear",idNoData:"no_dataViesGaugeYear",chartName:`${Ut[Ot].get("chartViesGaugeYear")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-90,paramCalculatedOffset:90,paramNumberOfElementsByLine:3},e)}function Jt(t,e){Tt(e,!0,1,"VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC MENSUAL","Vehicles","chartViesLineMonth","no_dataViesLineMonth",void 0,!0)}function Ht(t,e){B("chartViesBar","no_dataViesBar",e.resultset,"Vehicles","VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC ANUAL","")}function Kt(t,e){if(0===e.resultset.length)N("#chartAccesosPie","#no_dataAccesosPie");else{O("#no_dataAccesosPie","#chartAccesosPie");const t=P("chartAccesosPie"),r=e.resultset,n=[],o=0,a=1,i=2;for(let t=0;t<r.length;t+=1)n.push({value:r[t][a],name:r[t][o]});tt("chartAccesosPie",Y(`ACCESSOS A LA CIUTAT: DISTRIBUCIÓ ANY ${r[0][i]}`,n,t+3))}}function qt(e,r){if(0===r.resultset.length)N("#chartAccesosHorStackedBar","#no_dataAccesosHorStackedBar");else{O("#no_dataAccesosHorStackedBar","#chartAccesosHorStackedBar");const e=r.resultset,n={title:{text:"ACCESSOS A LA CIUTAT: HISTÒRIC ANUAL"},color:["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],xAxis:{name:"\n\n\n\nVehicles"}};(0,t.initStackedBarChart)("chartAccesosHorStackedBar",e,n)}}function Xt(t,e){B("chartAccesosStackedBar","no_dataAccesosStackedBar",e.resultset,"Vehicles","ACCESSOS A LA CIUTAT: HISTÒRIC MENSUAL")}let Qt;function te(t,e,r,n,o,a,i,s=!1){const l=ne(r,e.id,e.addres,e.location),c=L.map(t).setView(S,i?i.initialZoom:13),u=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});c.setMinZoom(i?i.minZoom:5),c.setMaxZoom(i?i.maxZoom:20),u.addTo(c),ae(c,l,r,e,s,n,o,a)}function ee(t="myMap",e=5,r=20,n=13,o,a,i,s){const l=L.map(t).setView([39.46975,-.37739],n),c=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});l.setMinZoom(e),l.setMaxZoom(r),c.addTo(l),oe(l,o,a,i,re(),s)}function re(){return{listOfselectedElements:[],elementExist(t){return this.listOfselectedElements.filter((e=>e===t)).length>0},deleteElementOfList(t){const e=this.listOfselectedElements.indexOf(t);e>-1&&this.listOfselectedElements.splice(e,1)}}}function ne(t,e=0,n=1,o=2){const{Buffer:a}=r(8287),i=r(543),s={type:"FeatureCollection",features:[]},l=[],c=new Set;return t.forEach((t=>{const e=t[o];c.has(e)||(c.add(e),l.push(t))})),l.forEach((t=>{const r=i.Geometry.parse(a.from(t[o],"hex")),l={type:"Feature",properties:{objectoId:t[e],address:t[n]},geometry:r.toGeoJSON()};s.features.push(l)})),s}function oe(t,e,r,n,o,a){function i(t){return{iconUrl:ft(t),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[-3,-76]}}const s=L.icon(i(r)),l=L.icon(i(n));L.geoJSON(e,{onEachFeature:function(i,s){i.properties&&i.properties.address&&s.on("click",(()=>{o.elementExist(i.properties.objectoId)?o.deleteElementOfList(i.properties.objectoId):o.listOfselectedElements.push(i.properties.objectoId),a&&Dashboards.fireChange(a,o.listOfselectedElements),oe(t,e,r,n,o,a)}))},pointToLayer(t,e){let r=s;return o.elementExist(t.properties.objectoId)&&(r=l),L.marker(e,{icon:r})}}).addTo(t)}function ae(t,e,r,n,o,a,i,s){L.geoJSON(e,{onEachFeature(t,e){t.properties.address===i&&(Qt=e),function(t,e,r,n,o){const a=r.properties.address,i=r.properties.objectoId;r.properties&&a&&n.on("click",(()=>{const r=t.filter((t=>t[e.id]===i));o(r,a)}))}(r,n,t,e,s),function(t,e,r,n){const o=t.properties.address;r&&(e.on("mouseover",(()=>{e.bindPopup(o).openPopup()})),e.on("mouseout",(()=>{e.closePopup()}))),e.on("click",(()=>{Qt?(Qt.setStyle(n.unselected),e.setStyle(n.selected)):e.setStyle(n.selected),Qt=e}))}(t,e,o,a)},style:t=>t.properties.address===i?a.selected:a.unselected}).addTo(t)}function ie(t,e){document.querySelector("#tabPuntsMesuraCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{ee("idMapPuntsMesuraCiutat",5,20,14,ne(e.resultset,0,1,3),"build/images/mapas/marker-icon-vehiculos.svg/content","build/images/mapas/marker-icon-selected-vehiculos.svg/content","puntoMedidaLaneId")}))}))}function se(t,e){Tt(e,!0,-6,"TRÀNSIT DE VEHICLES: PUNTS DE MESURA DE LA CIUTAT","Vehicles","chartPuntsMesuraCiutat","no_dataPuntsMesuraCiutat")}function le(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],l=Mt(a.size),c=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Trafico-Bicicletas-Accesos-Anillo","KpiValid-365-Trafico-Bicicletas-Accesos-Anillo"],["Kpi-Trafico-Bicicletas-Accesos-Anillo"]),h={title:{text:"TRÀNSIT CICLISTA: ACCESSOS ANELL CICLISTA"},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:"Bicicletes",axisLabel:{formatter:w}},dataZoom:{show:!0,data:i,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAccessosAnellCiclista",u,h)}function ce(e,r){const n=m.slice(),o=X(r.resultset||r,n,!1),a=o[1],i=Array.from(a.values()),s=o[2],l=Mt(a.size),c=(0,t.resultsetWithFields)(r),u=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Trafico-Bicicletas-Anillo","KpiValid-365-Trafico-Bicicletas-Anillo"],["Kpi-Trafico-Bicicletas-Anillo"]),h={title:{text:"TRÀNSIT CICLISTA: ANELL CICLISTA"},legend:{show:!0,data:s},xAxis:{type:"category",data:i},yAxis:{name:"Bicicletes",axisLabel:{formatter:w}},dataZoom:{show:!0,data:i,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAnellCiclista",u,h)}function ue(t,e){B("chartAnellBar","no_dataAnellBar",e.resultset,"Bicicletes","ANELL CICLISTA: HISTÒRIC ANUAL","")}function he(t,e){B("chartAccessosAnellBar","no_dataAccessosAnellBar",e.resultset,"Bicicletes","ACCESSOS ANELL CICLISTA: HISTÒRIC ANUAL","")}function fe(t,e){F("chartAnellMesActual","chartAnellMesAnterior","no_dataAnellMesActual","no_dataAnellMesAnterior",e.resultset,"ANELL CICLISTA: EVOLUCIÓ ","ANELL CICLISTA: EVOLUCIÓ ")}function pe(t,e){document.querySelector("#tabAccessosAnellCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartAccessosAnellMesActual","chartAccessosAnellMesAnterior","no_dataAccessosAnellMesActual","no_dataAccessosAnellMesAnterior",e.resultset,"ACCESSOS ANELL CICLISTA: EVOLUCIÓ ","ACCESSOS ANELL CICLISTA: EVOLUCIÓ ")}))}))}function de(t,e){G("chartAnellGaugeYear","no_dataAnellGaugeYear",e.resultset,"ANELL CICLISTA: EVOLUCIÓ ANY")}function ge(t,e){document.querySelector("#tabAccessosAnellCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{G("chartAccessosAnellGaugeYear","no_dataAcessosAnellGaugeYear",e.resultset,"ACCESSOS ANELL CICLISTA: EVOLUCIÓ ANY")}))}))}function me(t,e){Tt(e,!0,1,"ANELL CICLISTA: HISTÒRIC MENSUAL","Bicicletes","chartAnellLineMonth","no_dataAnellLineMonth",void 0,!0)}function ye(t,e){Tt(e,!0,1,"ACCESSOS ANELL CICLISTA: HISTÒRIC MENSUAL","Bicicletes","chartAccessosAnellLineMonth","no_dataAccessosAnellLineMonth",void 0,!0)}function Se(t,e){document.querySelector("#tabPuntsMesuraCiclista").addEventListener("click",(()=>{requestAnimationFrame((()=>{ee("idMapPuntsMesuraCiclista",5,20,14,ne(e.resultset,0,1,3),"build/images/mapas/marker-icon-bicis.svg/content","build/images/mapas/marker-icon-selected-bicis.svg/content","puntoMedidaLaneId")}))}))}function Ae(t,e){Tt(e,!0,-6,"TRÀNSIT CICLISTA: PUNTS DE MESURA CICLISTA","Bicicletes","chartPuntsMesuraCiclista","no_dataPuntsMesuraCiclista")}function be(t,e){return{title:{text:t,padding:20,textStyle:{fontSize:16}},yAxis:{data:e.map((t=>t[0]))},label:{show:!0,position:[15,"35%"],formatter:"{b}",fontSize:10,align:"left",color:"#000"},grid:{top:"20%"},series:[{data:e.map((t=>t[1])),itemStyle:{color:t=>["#B7C258","#A3BF62","#8EBC6D","#7AB877","#65B581","#50B28B"][t.dataIndex]}}]}}const Ee={es_ES:new Map([["graficaUmbral","Vehiculos / hora"],["graficaIntensidadMensual","Mayor intensidad mensual"],["graficaIntensidadAnual","Mayor intensidad anual"]]),ca_ES:new Map([["graficaUmbral","Vehicles / hora"],["graficaIntensidadMensual","Major intensitat mensual"],["graficaIntensidadAnual","Major intensitat anual"]])};function ve(r,n){const o=be(Ee[e].get("graficaIntensidadAnual"),n.resultset.reverse().map((t=>[t[0],t[1]])));(0,t.initBarChart)("chartIntensidadAnualCiclista",o)}function Ie(r,n){const o=be(Ee[e].get("graficaIntensidadMensual"),n.resultset.reverse().map((t=>[t[0],t[1]])));(0,t.initBarChart)("chartIntensidadMensualCiclista",o)}function Me(t,e){tt("chartIntensidadDiarialCiclista",W(e.resultset.map((([t,e])=>({name:t,value:e}))),"Major intensitat diària",void 0,["#4EA8DE","#FFBF69","#83C5BE","#E56B6F","#CDB4DB"]))}function we(t,e){tt("chartIntensidadRealTimeCiclista",W(e.resultset.map((([t,e])=>({name:t,value:e}))),"Major intensitat darrera hora"))}const Te={weight:5,color:"#ADB4B7",opacity:1,fillColor:"#ADB4B7"},Ce={weight:5,color:"#9D8BB8",opacity:1,fillColor:"#9D8BB8"},Le=t=>{tt("graficaRT",j(t,.2,.3,Ee[e].get("graficaUmbral")))};function _e(t,e){const r=document.querySelector("#textoNombreTramo"),n=document.querySelector("#textoHoraActualizacion"),o=document.querySelector("#textoFechaActualizacion"),a=document.querySelector("#dataDia"),i=document.querySelector("#dataMes"),s=document.querySelector("#dataAnyo"),l=t.filter((t=>t[1].includes("daily"))).map((t=>E(Math.round(t[3])))),c=t.filter((t=>t[1].includes("monthly"))).map((t=>E(Math.round(t[3])))),u=t.filter((t=>t[1].includes("annual"))).map((t=>E(Math.round(t[3])))),h=t.filter((t=>t[1].includes("rt"))).map((t=>({intensidad:E(Math.round(t[3])),fecha:t[5]})));r.textContent=e,a.textContent=l,i.textContent=c,s.textContent=u,Le(h[0].intensidad),n.textContent=It(new Date(h[0].fecha)),o.textContent=Et(new Date(h[0].fecha))}function De(t,e){const r=function(t){const e=t.map((t=>t[3])),r=Math.max(...e);return t.filter((t=>t[3]===r)).flat()[2]}(e.resultset);document.querySelector("#tabIntensidadCiclista").addEventListener("click",(()=>{const t=[];e.resultset.forEach((e=>{const r=function(t,e){const r=t.match(/_f\d{1,2}/);return r?e+r[0]:""}(e[1],e[2]);e.push(r),t.push(e)})),_e(e.resultset.filter((t=>t[2]===r)),r);const n={id:6,addres:2,location:4},o={minZoom:5,maxZoom:20,initialZoom:14},a={unselected:Te,selected:Ce};requestAnimationFrame((()=>{te("mapBicis",n,e.resultset,a,r,_e,o,!0)}))}))}function Ne(t,e){0===e.resultset.length?N("#chartUsuarisTotalsBarMonth","#no_dataUsuarisTotalsBarMonth"):(O("#no_dataUsuarisTotalsBarMonth","#chartUsuarisTotalsBarMonth"),tt("chartUsuarisTotalsBarMonth",V(e.resultset,"Viatges",void 0,"ÚS D'EMT. USUARIS TOTALS: EVOLUCIÓ MENSUAL","Nombre viatges EMT")))}let Oe,Ue,xe,Pe,Re={start:void 0,end:void 0},ke={start:void 0,end:void 0};function Be(t=null){let e=$("#formFilterDates").find("input");e=$("#formFilterDates").find("input"),$(e).each(((t,r)=>{r.checked&&(e[t].checked=!1)}));const r=$("#formFilterEMT1").find("input");if($(r).each(((t,e)=>{e.checked&&(r[t].checked=!1)})),t){const t=$("#formFilterEMT2").find("input");$(t).each(((e,r)=>{r.checked&&(t[e].checked=!1)}))}const n=$("#formFilterVar").find("input");$(n).each(((t,e)=>{e.checked&&(n[t].checked=!1)})),function(t){let e=0;const r=$("#formFilterDates").find("input");$(r).each((t=>{e+=1,r[t].checked=!0})),e=0;const n=$("#formFilterEMT1").find("input");$(n).each((t=>{e+=1,e<=6&&(n[t].checked=!0)}));const o=$("#formFilterEMT2").find("input");$(o).each((r=>{t&&t.includes(o[r].id)&&(e+=1,e<=6&&(o[r].checked=!0))})),e=0;const a=$("#formFilterVar").find("input");$(a).each((t=>{e+=1,e<=2&&(a[t].checked=!0)})),Dashboards.getParameterValue("filterDatesParam").length>0&&(Dashboards.fireChange("filterDatesParam"),render_echartAccessosCiutat.listeners=["filterDatesParam"],Dashboards.fireChange("filterDatesParam"),render_echartAccessosCiutat.listeners=[""]),Dashboards.getParameterValue("filterEMT2Param").length>0&&Dashboards.fireChange("filterEMT2Param"),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}(t)}function $e(){Oe&&([Re]=Oe.getOption().dataZoom);const t=$("#formFilterEMT1").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterEMT1Param",e),Dashboards.fireChange("updateFilterEMT1","True")}function Fe(){xe&&([ke]=xe.getOption().dataZoom);const t=$("#formFilterEMT2").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id)})),Dashboards.fireChange("filterEMT2Param",e),Dashboards.fireChange("updateFilterEMT2","True")}function Ge(t,e="number",r=null){let n;return"number"===e?n=new Map([...t].filter((([t])=>!Number.isNaN(Number(t))))):"includes"===e&&(n=new Map([...t].filter((([t])=>t.includes(r))))),n}function Ve(t){const e=Array.from(t.keys()).sort(((t,e)=>t-e)),r=new Map;return e.forEach((e=>{r.set(e,t.get(e))})),r}function ze(t,e,r=!1){const n=[],o=new Set,a=r?new Map:new Set;for(let i=0;i<e.length;i+=1)(0===t.length||t.includes(e[i][0]))&&(r?a.set(e[i][0],e[i][0]):a.add(e[i][0]),n.push({day:e[i][1],type:e[i][0],value:e[i][2]}),o.add(e[i][1]));return[a,n,Array.from(o.values())]}function je(t,e,r){const n=m.slice();return t.map((t=>{const o=e.filter((e=>e.type===t)),a=r.map((t=>{const e=o.findIndex((e=>e.day===t));return-1!==e?o[e].value:null}));return{name:t,type:"line",symbol:"circle",color:n.shift(),symbolSize:6,smooth:!1,data:a}}))}function We(t){const e={};t.forEach((t=>{const r=t.type,n=t.value;e[r]=(e[r]||0)+n}));const r=Object.keys(e).map((t=>({tipo:t,valor:e[t]})));return r.sort(((t,e)=>e.valor-t.valor)),r.map((t=>t.tipo))}function Ye(t,e,r,n,o){const a=Dashboards.getParameterValue("filterEMT1Param");if(0===r.length)N(`#${t}`,`#${e}`);else{O(`#${e}`,`#${t}`);const[i,s,l]=ze(a,r);if(!o){const t=We(s);!function(t,e){const r=$("#formFilterEMT1");""===Dashboards.getParameterValue("updateFilterEMT1")&&(e.forEach((t=>{r.append(`<input type="checkbox" id="${t}" class="titol-${t}" onclick="legacy.filterEMT1Update();" /> ${t} </br>`)})),Be(),T(),$e())}(t.length,t),a&&a.sort(((t,e)=>t.localeCompare(e)))}if(a){const r=k(je(a,s,l),a,l,"Viatges",o?v(l.length):Mt(l.length),!0,-10,void 0,n,Re.start,Re.end);let i;o?(Ue=tt(t,r),i=Ue):(Oe=tt(t,r),i=Oe),0===$("#formFilterEMT1 :checked").length&&N(`#${t}`,`#${e}`),$(window).on("resize",(()=>{null!=i&&void 0!==i&&i.resize()}))}}}function Ze(t,e,r,n,o){const a=Dashboards.getParameterValue("filterEMT2Param");if(0===r.length)N(`#${t}`,`#${e}`);else{O(`#${e}`,`#${t}`);const[i,s,l]=ze(a,r,!0);if(!o){const t=Array.from(Ve(Ge(i,"number")).values());let e=[];(function(t){const e=[];return t.forEach(((t,r)=>{Array.from(r).forEach((t=>{!e.includes(t)&&Number.isNaN(Number(t))&&e.push(t)}))})),e})(i).forEach((t=>{e=e.concat(Array.from(Ve(function(t){const e=/\d+/g,r=new Map;return t.forEach((n=>{r.set(n.match(e),t.get(n))})),r}(Ge(i,"includes",t))).values()))}));let r=t.concat(e);r=[...new Set(r)];const n=We(s).slice(0,6);!function(t,e,r){const n=$("#formFilterEMT2");""===Dashboards.getParameterValue("updateFilterEMT2")&&(e.forEach((t=>{n.append(`<input type="checkbox" id="${t}" class="linea-${t}" onclick="legacy.filterEMT2Update();" />`)})),Be(r),T(),Fe())}(r.length,r,n)}if(a){const r=k(je(a,s,l),a,l,"Viatges",Mt(l.length),!0,-10,void 0,n,ke.start,ke.end);let i;o?(Pe=tt(t,r),i=Pe):(xe=tt(t,r),i=xe),0===$("#formFilterEMT1 :checked").length&&N(`#${t}`,`#${e}`),$(window).on("resize",(()=>{null!=i&&void 0!==i&&i.resize()}))}}}function Je(){document.querySelector("#idFiltrar").style.visibility="visible"}function He(){document.querySelector("#idFiltrar").style.visibility="hidden"}function Ke(t,e){return t.filter((t=>e.includes(t[0])))}function qe(){const t=["filterDatesParam","updateFilter","filterEMT1Param","updateFilterEMT1"],e=["filterDatesParam","updateFilter","filterEMT2Param","updateFilterEMT2"];render_echartUsuarisPerLinea.listeners=e,render_echartUsuarisPerLiniaLineMonth.listeners=e,render_echartUsuarisPerLiniaGaugeYear.listeners=e,render_echartUsuarisPerLiniaGaugeMonth.listeners=e,render_echartUsuarisPerLiniaBarYear.listeners=e,render_echartUsuarisPerTitol.listeners=t,render_echartUsuarisPerTitolLineMonth.listeners=t,render_echartUsuarisPerTitolGaugeYear.listeners=t,render_echartUsuarisPerTitolGaugeMonth.listeners=t,render_echartUsuarisPerTitolBarYear.listeners=t,render_echartUsuarisTotals.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("filterEMT1Param"),Dashboards.fireChange("updateFilterEMT1"),Dashboards.fireChange("filterEMT2Param"),Dashboards.fireChange("updateFilterEMT2")}const Xe={es_ES:new Map([["chartUsuarisTotalsGaugeYear","USO DE EMT. USUARIOS TOTALES: ÚLTIMOS AÑOS"]]),ca_ES:new Map([["chartUsuarisTotalsGaugeYear","US D'EMT. USUARIS TOTALS: ÚLTIMS ANYS"]])},Qe={es_ES:new Map([["chartUsuarisTotalsGaugeMonth","USO DE EMT. USUARIOS TOTALES: MES ACTUAL"],["chartUsuarisTotalsGaugeLastMonth","USO DE EMT. USUARIOS TOTALES: MES ANTERIOR"]]),ca_ES:new Map([["chartUsuarisTotalsGaugeMonth","ÚS D'EMT. USUARIS TOTALS: MES ACTUAL"],["chartUsuarisTotalsGaugeLastMonth","ÚS D'EMT. USUARIS TOTALS: MES ANTERIOR"]])};function tr(t,e){Wt({idChart:"chartUsuarisTotalsGaugeYear",idNoData:"no_dataUsuarisTotalsGaugeYear",chartName:`${Xe[Ot].get("chartUsuarisTotalsGaugeYear")}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-100,paramCalculatedOffset:50,paramNumberOfElementsByLine:5},e)}function er(t,e){const r=Dashboards.getParameterValue("filterEMT1Param");if(r.length>0){const n=Ke(e.resultset,r);function o(){G("chartUsuarisTitolGaugeYear","no_dataUsuarisTitolGaugeYear",n,"ÚS D'EMT. USUARIS PER TÍTOL: ANY")}r.sort(((t,e)=>t.localeCompare(e))),0===document.querySelector("#chartUsuarisTitolGaugeYear").childElementCount?document.querySelector("#tabUsuarisPerTitol").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}}function rr(t,e){const r=Dashboards.getParameterValue("filterEMT2Param"),n=Ke(e.resultset,r);function o(){G("chartUsuarisLiniaGaugeYear","no_dataUsuarisLiniaGaugeYear",n,"ÚS D'EMT. USUARIS PER LÍNIA: ANY")}n.sort(((t,e)=>Number(t[0])-Number(e[0]))),0===document.querySelector("#chartUsuarisLiniaGaugeYear").childElementCount?document.querySelector("#tabUsuarisPerLinia").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}function nr(t,e){const r=Dashboards.getParameterValue("filterEMT1Param"),n=Ke(e.resultset,r);function o(){F("chartUsuarisTitolMesActual","chartUsuarisTitolMesAnterior","no_dataUsuarisTitolMesActual","no_dataUsuarisTitolMesAnterior",n,"ÚS D'EMT. USUARIS PER TÍTOL: EVOLUCIÓ ","ÚS D'EMT. USUARIS PER TÍTOL: EVOLUCIÓ ")}0===document.querySelector("#chartUsuarisTitolMesActual").childElementCount||0===document.querySelector("#chartUsuarisTitolMesAnterior").childElementCount?document.querySelector("#tabUsuarisPerTitol").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}function or(t,e){const r=Dashboards.getParameterValue("filterEMT2Param"),n=Ke(e.resultset,r);function o(){F("chartUsuarisLiniaMesActual","chartUsuarisLiniaMesAnterior","no_dataUsuarisLiniaMesActual","no_dataUsuarisLiniaMesAnterior",n,"ÚS D'EMT. USUARIS PER LÍNIA: EVOLUCIÓ ","ÚS D'EMT. USUARIS PER LÍNIA: EVOLUCIÓ ")}n.sort(((t,e)=>Number(t[0])-Number(e[0]))),0===document.querySelector("#chartUsuarisLiniaMesActual").childElementCount||0===document.querySelector("#chartUsuarisLiniaMesAnterior").childElementCount?document.querySelector("#tabUsuarisPerLinia").addEventListener("click",(()=>{requestAnimationFrame((()=>{o()}))})):o()}const ar={title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:12,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},series:{type:"gauge",startAngle:-180,endAngle:0,splitNumber:2,max:void 0,itemStyle:{color:"#FFAB91"},progress:{show:!0,width:30},pointer:{show:!1},axisLine:{lineStyle:{width:30}},axisTick:{distance:5,splitNumber:10,lineStyle:{width:2,color:"#999"}},splitLine:{distance:10,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{fontFamily:"Montserrat",color:"#666",fontSize:14,show:!0,distance:40,formatter:e=>(0,t.addPointInteger)(Math.round(e))},anchor:{show:!1},title:{show:!1},detail:{valueAnimation:!0,width:"60%",lineHeight:40,borderRadius:8,offsetCenter:[0,"0%"],fontSize:17,fontWeight:"bolder",formatter:void 0,fontFamily:"Montserrat",color:"inherit"},data:void 0},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:40}};function ir(e,r){const n=r.resultset;if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,time:1,data:2},[o,a,i]=(0,t.configureDataGaugeMonthCommon)(e.idChart,n,r,0),s={...ar};s.title.text=e.chartName,s.series.max=o,s.series.detail.formatter=a,s.series.data=i,(0,t.initChart)(e.idChart,s)}}function sr(t,e){const r={idChart:"chartUsuarisTotalsGaugeMonth",idNoData:"no_dataUsuarisTotalsGaugeMonth",chartName:`${Qe[Ot].get("chartUsuarisTotalsGaugeMonth")}`},n={idChart:"chartUsuarisTotalsGaugeLastMonth",idNoData:"no_dataUsuarisTotalsGaugeLastMonth",chartName:`${Qe[Ot].get("chartUsuarisTotalsGaugeLastMonth")}`};ir(r,e),ir(n,e)}function lr(e,r){if(0===r.resultset.length)N("#chartUsuarisTotalsStackedBarYears","#no_dataUsuarisTotalsStackedBarYears");else{O("#no_dataUsuarisTotalsStackedBarYears","#chartUsuarisTotalsStackedBarYears");const e={title:{text:"ÚS D'EMT. USUARIS TOTALS: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nViatges"}};(0,t.initStackedBarChartMonthSeries)("chartUsuarisTotalsStackedBarYears",r.resultset,e)}}function cr(t,e){Tt(e,!0,1,"ÚS D'EMT: USUARIS TOTALS","Viatges","chartUsuarisTotals","no_dataUsuarisTotals",void 0,void 0,void 0,void 0,!1)}function ur(){He(),$("#idFieldsFilterEmtUsLinea").hide(),$("#idFieldsFilterEmtUsTitol").hide()}function hr(t,e){Ye("chartUsuarisPerTitol","no_dataUsuarisPerTitol",e.resultset,"ÚS D'EMT: USUARIS PER TÍTOL",!1)}function fr(){Je(),$("#idAllFilterFields").show(),$("#idFieldsFilterEmtUsLinea").hide(),$("#idFieldsFilterEmtUsTitol").show()}function pr(t,e){Ze("chartUsuarisPerLinea","no_dataUsuarisPerLinea",e.resultset,"ÚS D'EMT: USUARIS PER LÍNIA",!1)}function dr(){He(),$("#idAllFilterFields").show(),$("#idFieldsFilterEmtUsLinea").show(),$("#idFieldsFilterEmtUsTitol").hide()}function gr(t,e){Ye("chartUsuarisTitolLineMonth","no_dataUsuarisTitolLineMonth",e.resultset,"ÚS D'EMT. USUARIS PER TÍTOL: HISTÒRIC MENSUAL",!0)}function mr(t,e){Ze("chartUsuarisLiniaLineMonth","no_dataUsuarisLiniaLineMonth",e.resultset,"ÚS D'EMT. USUARIS PER LÍNIA: HISTÒRIC MENSUAL",!0)}function yr(t,e){const r=Dashboards.getParameterValue("filterEMT1Param");B("chartUsuarisTitolBar","no_dataUsuarisTitolBar",Ke(e.resultset,r),"Viatges","ÚS D'EMT. USUARIS PER TÍTOL: HISTÒRIC ANUAL","")}function Sr(t,e){const r=Dashboards.getParameterValue("filterEMT2Param");B("chartUsuarisLiniaBar","no_dataUsuarisLiniaBar",Ke(e.resultset,r),"Viatges","ÚS D'EMT. USUARIS PER LÍNIA: HISTÒRIC ANUAL","")}const Ar=-20;function br(t,e,r,n){const o=U(t,n),a=Object.keys(o),i=new Set(t.map((t=>t[e])));return i.forEach((t=>{a.forEach((n=>{void 0===o[n].find((r=>r[e]===t))&&o[n].push([o[n][0][0],t,n,void 0,o[n][0][r]])}))})),a.forEach((t=>{o[t].sort(((t,r)=>{const n=t[e].split("/").reverse().join(""),o=r[e].split("/").reverse().join("");return n.localeCompare(o)}))})),[o,i]}function Er(t,e,r,n,o,a,i,s,l,c=""){const u=k(t,e,r,n,o,a,l,void 0,c);return u.yAxis.nameTextStyle.align="left",delete u.yAxis.axisLabel.margin,u.yAxis.max=i,u.yAxis.min=s,delete u.toolbox.show,u}function vr(){render_echartMestalla.listeners=["filterDatesParam","updateFilter"],render_echartMalilla.listeners=["filterDatesParam","updateFilter"],render_echartPerellonet.listeners=["filterDatesParam","updateFilter"],render_echartExposicio.listeners=["filterDatesParam","updateFilter"],render_echartSotenis.listeners=["filterDatesParam","updateFilter"],render_echartBeninamet.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter")}const Ir=-20;function Mr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartBenimamet").hide(),$("#chartBenimametStacked").hide(),$("#no_dataBeninamet").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataBeninamet").show();else{$("#no_dataBeninamet").hide(),$("#chartBenimamet").css("background","#ffffff"),$("#chartBenimametStacked").css("background","#ffffff"),$("#chartBenimamet").show(),$("#chartBenimametStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE BENIMÀMET",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Benimamet"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null)}const I=Mt(a.size),M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartBenimamet",Er([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],M,Array.from(a.values()),p[0].measureunit,I,!0,null,0,Ir,t)),tt("chartBenimametStacked",Er([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],M,Array.from(a.values()),"%",I,!0,100,0,Ir,t))}}function wr(t,e){let r=e.resultset.filter((t=>"València Ciutat"!==t[1]));r=r.map((t=>t.slice(1))),Tt(r,!0,1,"INJECCIÓ D'AIGUA PER BARRIS","m3","chartConsumAguaBarris","no_dataConsumAguaBarris")}function Tr(t,e){let r=e.resultset.filter((t=>"kpi-valencia-ciudad-total"===t[0]));r=r.map((t=>t.slice(1))),Tt(r,!0,1,"INJECCIÓ TOTAL D'AIGUA: EVOLUCIÓ DIÀRIA","m3","chartConsumTotalAgua","no_dataConsumTotalAgua",void 0,void 0,void 0,void 0,!1)}const Cr=-20;function Lr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartExposicio").hide(),$("#chartExposicioStacked").hide(),$("#no_dataExposicio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExposicio").show();else{$("#no_dataExposicio").hide(),$("#chartExposicio").css("background","#ffffff"),$("#chartExposicioStacked").css("background","#ffffff"),$("#chartExposicio").show(),$("#chartExposicioStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE EXPOSICIÓ",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Exposicio"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=0,m=0,y=0,S=0)}const I=Mt(a.size),M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartExposicio",Er([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],M,Array.from(a.values()),p[0].measureunit,I,!0,null,0,Cr,t)),tt("chartExposicioStacked",Er([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],M,Array.from(a.values()),"%",I,!0,100,0,Cr,t))}}const _r=-20;function Dr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartMalilla").hide(),$("#chartMalillaStacked").hide(),$("#no_dataMalilla").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataMalilla").show();else{$("#no_dataMalilla").hide(),$("#chartMalilla").css("background","#ffffff"),$("#chartMalillaStacked").css("background","#ffffff"),$("#chartMalilla").show(),$("#chartMalillaStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE MALILLA",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Malilla"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=0,m=0,y=0,S=0):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null)}const I=Mt(a.size),M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartMalilla",Er([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],M,Array.from(a.values()),p[0].measureunit,I,!0,null,0,_r,t)),tt("chartMalillaStacked",Er([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],M,Array.from(a.values()),"%",I,!0,100,0,_r,t))}}const Nr=-20;function Or(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length)$("#chartMestalla").hide(),$("#chartMestallaStacked").hide(),$("#no_dataMestalla").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataMestalla").show();else{$("#no_dataMestalla").hide(),$("#chartMestalla").css("background","#ffffff"),$("#chartMestallaStacked").css("background","#ffffff"),$("#chartMestalla").show(),$("#chartMestallaStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE MESTALLA",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Mestalla"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));else{for(let t=0;t<o;t+=1)"Mestalla"===n[t][6]&&("Industrial"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),s.push(n[t][8]),h+=n[t][8]),"Domèstic"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),l.push(n[t][8]),h+=n[t][8]),"Serv.Municipal"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),c.push(n[t][8]),h+=n[t][8]),"Aigua no registrada per comptadors"===n[t][7]&&(a.add(n[t][3]),i.push(n[t][4]),u.push(n[t][8]),h+=n[t][8]),a.add(n[t][3]),i.push(n[t][4]));dt(i.length,i)}let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=0,m=0,y=0,S=0)}const I=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"],M=[{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],w=Mt(a.size);tt("chartMestalla",Er(M,I,Array.from(a.values()),p[0].measureunit,w,!0,null,0,Nr,t)),tt("chartMestallaStacked",Er([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],I,Array.from(a.values()),"%",w,!0,100,0,Nr,t))}}const Ur=-20;function xr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartPerellonet").hide(),$("#chartPerellonetStacked").hide(),$("#no_dataPerellonet").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataPerellonet").show();else{$("#no_dataPerellonet").hide(),$("#chartPerellonet").css("background","#ffffff"),$("#chartPerellonetStacked").css("background","#ffffff"),$("#chartPerellonet").show(),$("#chartPerellonetStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE PERELLONET",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Perellonet"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=0,m=0,y=0,S=0)}const I=Mt(a.size),M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"],w=[{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}];tt("chartPerellonet",Er([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],M,Array.from(a.values()),p[0].measureunit,I,!0,null,0,Ur,t)),tt("chartPerellonetStacked",Er(w,M,Array.from(a.values()),"%",I,!0,100,0,Ur,t))}}const Pr=-20;function Rr(t,e){const r=Dashboards.getParameterValue("filterDatesParam");if(0===e.resultset.length||0===r.length)$("#chartSotenis").hide(),$("#chartSotenisStacked").hide(),$("#no_dataSotenis").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataSotenis").show();else{$("#no_dataSotenis").hide(),$("#chartSotenis").css("background","#ffffff"),$("#chartSotenisStacked").css("background","#ffffff"),$("#chartSotenis").show(),$("#chartSotenisStacked").show();const t="INJECCIÓ D'AIGUA AL BARRI DE SOTERNES",n=e.resultset,o=e.resultset.length,a=new Set,i=[];let s=[],l=[],c=[],u=[],h=0;const f=[],p=[];let d;if(r.length>0)for(let t=r.length;t>=0;t-=1)for(let e=0;e<o;e+=1)r[t]===n[e][4]&&"Soternes"===n[e][6]&&(a.add(yt(n[e][1])),i.push(n[e][4]),d={fecha:n[e][1],mesAbr:n[e][4],diaAbr:n[e][3],tipoUso:n[e][7],valor:n[e][8],measureunit:n[e][9]},p.push(d));let g=0,m=0,y=0,S=0;const A=[],b=[],E=[],v=[];s=[],l=[],c=[],u=[];for(let t=0;t<p.length;t+=1){const e=t+1<p.length?t+1:p.length-1;t===p.length-1?("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null):p[t].fecha===p[e].fecha?(h+=p[t].valor,"Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor)):("Domèstic"===p[t].tipoUso&&(g=p[t].valor),"Industrial"===p[t].tipoUso&&(m=p[t].valor),"Serv.Municipal"===p[t].tipoUso&&(y=p[t].valor),"Aigua no registrada per comptadors"===p[t].tipoUso&&(S=p[t].valor),h+=p[t].valor,s.push(m),l.push(g),c.push(y),u.push(S),g=g/h*100,m=m/h*100,y=y/h*100,S=S/h*100,f.push([g,m,y,S]),A.push(g),b.push(m),E.push(y),v.push(S),h=0,g=null,m=null,y=null,S=null)}const I=Mt(a.size),M=["Aigua no registrada per comptadors","Domèstic","Industrial","Serv.Municipal"];tt("chartSotenis",Er([{name:"Aigua no registrada per comptadors",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u},{name:"Domèstic",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:l},{name:"Industrial",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:s},{name:"Serv.Municipal",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:c}],M,Array.from(a.values()),p[0].measureunit,I,!0,null,0,Pr,t)),tt("chartSotenisStacked",Er([{name:"Aigua no registrada per comptadors",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:v},{name:"Domèstic",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:A},{name:"Industrial",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:b},{name:"Serv.Municipal",type:"bar",stack:"total",label:{show:!1},emphasis:{focus:"series"},data:E}],M,Array.from(a.values()),"%",I,!0,100,0,Pr,t))}}function kr(t,e){0===e.resultset.length?N("#chartAiguaTotalBarMonth","#no_dataAiguaTotalBarMonth"):(O("#no_dataAiguaTotalBarMonth","#chartAiguaTotalBarMonth"),tt("chartAiguaTotalBarMonth",V(e.resultset,"m3",void 0,"INJECCIÓ TOTAL D'AIGUA: EVOLUCIÓ MENSUAL","València Ciutat")))}function Br(t,e){if(0===e.resultset.length)N("#chartYearAiguaTotalgauge_semicircle","#no_dataYearAiguaTotalgauge_semicircle");else{O("#no_dataYearAiguaTotalgauge_semicircle","#chartYearAiguaTotalgauge_semicircle");const t=P("chartYearAiguaTotalgauge_semicircle");tt("chartYearAiguaTotalgauge_semicircle",J(e.resultset,"INJECCIÓ TOTAL D'AIGUA: ÚLTIMS ANYS",t))}}function $r(t,e){if(0===e.resultset.length)N("#chartAiguaTotalreloj_semicircle","#no_dataAiguaTotalreloj_semicircle"),N("#chartAiguaTotalreloj_semicircle_lastmonth","#no_dataAiguaTotalreloj_semicircle_lastmonth");else{O("#no_dataAiguaTotalreloj_semicircle","#chartAiguaTotalreloj_semicircle"),O("#no_dataAiguaTotalreloj_semicircle_lastmonth","#chartAiguaTotalreloj_semicircle_lastmonth");const t=0,r=1,n=e.resultset,o=P("chartAiguaTotalreloj_semicircle");tt("chartAiguaTotalreloj_semicircle",H(n,t,"INJECCIÓ TOTAL D'AIGUA: MES ACTUAL",o)),tt("chartAiguaTotalreloj_semicircle_lastmonth",H(n,r,"INJECCIÓ TOTAL D'AIGUA: MES ANTERIOR",o))}}function Fr(e,r){if(0===r.resultset.length)N("#chartAiguaTotalstackedBarYears","#no_dataAiguaTotalstackedBarYears");else{O("#no_dataAiguaTotalstackedBarYears","#chartAiguaTotalstackedBarYears");const e={title:{text:"INJECCIÓ TOTAL D'AIGUA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nm3"}};(0,t.initStackedBarChartMonthSeries)("chartAiguaTotalstackedBarYears",r.resultset,e)}}function Gr(t,e){B("chartBarrisBar","no_dataBarrisBar",e.resultset,"m3","INJECCIÓ D'AIGUA PER BARRIS: HISTÒRIC ANUAL","")}function Vr(t,e){Tt(e,!0,1,"INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ: HISTÒRIC MENSUAL","m3","chartBarrisLineMonth","no_dataBarrisLineMonth",void 0,!0,void 0,void 0,void 0,void 0,!0)}const zr={es_ES:new Map([["chartNameBarrisGaugeYear","INYECCIÓN DE AGUA POR BARRIOS: EVOLUCIÓN DEL AÑO"]]),ca_ES:new Map([["chartNameBarrisGaugeYear","INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ANY"]])};function jr(t,e){document.querySelector("#tabConsumAguaBarris").addEventListener("click",(()=>{requestAnimationFrame((()=>{Wt({idChart:"chartBarrisGaugeYear",idNoData:"no_dataBarrisGaugeYear",chartName:`${zr[Ot].get("chartNameBarrisGaugeYear")} ${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-100,paramCalculatedOffset:100,paramNumberOfElementsByLine:3},e)}))}))}function Wr(t,e){document.querySelector("#tabConsumAguaBarris").addEventListener("click",(()=>{requestAnimationFrame((()=>{F("chartBarrisMesActual","chartBarrisMesAnterior","no_dataBarrisMesActual","no_dataBarrisMesAnterior",e.resultset,"INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ","INJECCIÓ D'AIGUA PER BARRIS: EVOLUCIÓ ")}))}))}function Yr(t,e){if(0===e.resultset.length)N("#chartKgsResidus","#no_dataKgsResidus");else{O("#no_dataKgsResidus","#chartKgsResidus");const t="KGS. DE RESIDUS EN CONTENIDORS: EVOLUCIÓ DIÀRIA",r="KGS. DE RESIDUS EN MOBLES: EVOLUCIÓ DIÀRIA",n=e.resultset,o=0,a=1,i=2,s=3,l=new Map,c=new Map;let u=[],h=[];n.forEach((t=>{"Contenidor"===t[i]&&"total"===t[a]&&l.set(t[o],t[s]),"Moble"===t[i]&&c.set(t[o],t[s])})),u=Nt(l),h=Nt(c);const f=Mt(u[0].length),p=Mt(h[0].length),d=-30,g=[{name:"Contenidor",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:u[1]}],m=[{name:"Moble",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:h[1]}];tt("chartKgsResidus",k(g,null,u[0],"Kgs",f,!0,d,void 0,t)),tt("chartKgsResidusMoble",k(m,null,h[0],"Kgs",p,!0,d,void 0,r))}}function Zr(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const Jr=["#0077b6","#ffc300","#55828b","#a26769","#b1a7a6","#38b000"],Hr=Jr.slice(0,-2).concat(Jr.slice(-1));function Kr(t,e){Tt(e,!0,0,"DESAGREGACIÓ KGS. CONTENIDORS PER TIPUS DE RESIDUS","Kgs","chartDesKgsPerTipusResidu","no_dataDesKgsPerTipusResidu",void 0,void 0,void 0,void 0,void 0,Jr)}const qr={es_ES:new Map([["chartResidusContenidorstackedBarYears","KGS. DE RESIDUOS EN CONTENEDORES: DESGLOSE DE LOS ÚLTIMOS AÑOS"],["chartResidusMoblesstackedBarYears","KGS. DE RESIDUOS EN MUEBLES: DESGLOSE DE LOS ÚLTIMOS AÑOS"],["chartDesKgsHorStackedBar","KGS. DE RESIDUOS DE RECICLAJE: HISTORICO ANUAL"]]),ca_ES:new Map([["chartResidusContenidorstackedBarYears","KGS. DE RESIDUS EN CONTENIDORS: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["chartResidusMoblesstackedBarYears","KGS. DE RESIDUS EN MOBLES: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["chartDesKgsHorStackedBar","KGS. DE RESIDUS DE RECICLATGE: HISTÒRIC ANUAL"]])};function Xr(e,r){function n(e,n,o){if(0===r.resultset.length)(0,t.printNoDataChart)(`#${e}`,`#${n}`);else{const r={title:{text:qr[Ot].get(e)},xAxis:{name:"\n\n\n\nKgs"}};(0,t.initStackedBarChartMonthSeries)(e,o,r)}}const o=(0,t.splitDataset)(r.resultset),a=o.Cont,i=o.Mob;n("chartResidusContenidorstackedBarYears","no_dataResidusContenidorstackedBarYears",a),n("chartResidusMoblesstackedBarYears","no_dataResidusMoblesstackedBarYears",i)}function Qr(e,r){const n="chartDesKgsHorStackedBar",o="no_dataDesKgsHorStackedBar";if(0===r.resultset.length)(0,t.printNoDataChart)(`#${n}`,`#${o}`);else{(0,t.printDataChart)(`#${o}`,`#${n}`);const e={title:{text:qr[Ot].get(n)},color:Hr,xAxis:{name:"\n\n\n\nKgs"}};(0,t.initStackedBarChart)(n,r.resultset,e)}}function tn(t,e){B("chartDesKgsStackedBar","no_dataDesKgsStackedBar",e.resultset,"Kgs","KGS. DE RESIDUS DE RECICLATGE: HISTÒRIC MENSUAL",void 0,void 0,void 0,void 0,Hr)}function en(t,e){if(0===e.resultset.length)N("#chartResidusContenidorreloj_semicircle","#no_dataResidusContenidorreloj_semicircle"),N("#chartResidusContenidorreloj_semicircle_lastmonth","#no_dataResidusContenidorreloj_semicircle_lastmonth"),N("#chartResidusMoblesreloj_semicircle","#no_dataResidusMoblesreloj_semicircle"),N("#chartResidusMoblesreloj_semicircle_lastmonth","#no_dataResidusMoblesreloj_semicircle_lastmonth");else{O("#no_dataResidusContenidorreloj_semicircle","#chartResidusContenidorreloj_semicircle"),O("#no_dataResidusContenidorreloj_semicircle_lastmonth","#chartResidusContenidorreloj_semicircle_lastmonth"),O("#no_dataResidusMoblesreloj_semicircle","#chartResidusMoblesreloj_semicircle"),O("#no_dataResidusMoblesreloj_semicircle_lastmonth","#chartResidusMoblesreloj_semicircle_lastmonth");const t=0,r=1,n=Zr(e.resultset),o=n.Cont,a=n.Mob,i=P("chartResidusContenidorreloj_semicircle");tt("chartResidusContenidorreloj_semicircle",H(o,t,"KGS. DE RESIDUS EN CONTENIDORS: MES ACTUAL",i)),tt("chartResidusContenidorreloj_semicircle_lastmonth",H(o,r,"KGS. DE RESIDUS EN CONTENIDORS: MES ANTERIOR",i)),tt("chartResidusMoblesreloj_semicircle",H(a,t,"KGS. DE RESIDUS EN MOBLES: MES ACTUAL",i)),tt("chartResidusMoblesreloj_semicircle_lastmonth",H(a,r,"KGS. DE RESIDUS EN MOBLES: MES ANTERIOR",i))}}function rn(t,e){if(0===e.resultset.length)N("#chartYearResidusContenidorgauge_semicircle","#no_dataYearResidusContenidorgauge_semicircle"),N("#chartYearResidusMoblesgauge_semicircle","#no_dataYearResidusMoblesgauge_semicircle");else{O("#no_dataYearResidusContenidorgauge_semicircle","#chartYearResidusContenidorgauge_semicircle"),O("#no_dataYearResidusMoblesgauge_semicircle","#chartYearResidusMoblesgauge_semicircle");const t=Zr(e.resultset,!1),r=t.Cont,n=t.Mob,o=P("chartYearResidusContenidorgauge_semicircle");tt("chartYearResidusContenidorgauge_semicircle",J(r,"KGS. DE RESIDUS EN CONTENIDORS: ÚLTIMS ANYS",o)),tt("chartYearResidusMoblesgauge_semicircle",J(n,"KGS. DE RESIDUS EN MOBLES: ÚLTIMS ANYS",o))}}function nn(t,e){if(0===e.resultset.length)N("#chartDesKgsGauge","#no_dataDesKgsPie");else{O("#no_dataDesKgsPie","#chartDesKgsGauge");const t=e.resultset;document.querySelector("#idDesKgs").addEventListener("click",(()=>{requestAnimationFrame((()=>{const e=P("chartDesKgsGauge"),r=Ct(t,e);tt("chartDesKgsGauge",Z("KGS. DE RESIDUS RSU RESTA: ÚLTIMS ANYS",r[0],r[1],e))}))}))}}function on(t,e){if(0===e.resultset.length)N("#chartResidusContenidorBarMonth","#no_dataResidusContenidorBarMonth");else{O("#no_dataResidusContenidorBarMonth","#chartResidusContenidorBarMonth");const t=Zr(e.resultset),r=t.Cont,n=t.Mob;tt("chartResidusContenidorBarMonth",V(r,"Kgs",void 0,"KGS. DE RESIDUS EN CONTENIDORS: EVOLUCIÓ MENSUAL","Contenidor")),tt("chartResidusMoblesBarMonth",V(n,"Kgs",void 0,"KGS. DE RESIDUS EN MOBLES: EVOLUCIÓ MENSUAL","Moble"))}}function an(t,e){0===e.resultset.length?N("#chartDesKgsBar","#no_dataDesKgsBar"):(O("#no_dataDesKgsBar","#chartDesKgsBar"),tt("chartDesKgsBar",V(e.resultset,"Kgs",void 0,"KGS. DE RESIDUS RSU RESTA: HISTÒRIC MENSUAL","RSU Resta")))}function sn(t,e){if(0===e.resultset.length)N("#chartDesKgsPie","#no_dataDesKgsPie");else{O("#no_dataDesKgsPie","#chartDesKgsPie");const t=e.resultset,r=[],n=0,o=1,a=2;for(let e=0;e<t.length;e+=1)r.push({value:t[e][o],name:t[e][n]});document.querySelector("#idDesKgs").addEventListener("click",(()=>{requestAnimationFrame((()=>{const e=P("chartDesKgsPie");tt("chartDesKgsPie",Y(`KGS. DE RESIDUS DE RECICLATGE: DISTRIBUCIÓ ANY ${t[0][a]}`,r,e+5,Hr))}))}))}}const ln={es_ES:new Map([["TittleAccChart","EVOLUCIÓN DIARIA ACCESOS A LA SEDE ELECTRÓNICA"],["Acces","Accesos"],["TittleInstancesChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN DIARIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instancias"],["TittleInstancesYearlyChart","INSTANCIAS SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleAccessYearlyChart","ACCESOS A LA SEDE ELECTRÓNICA: DESGLOSE DE LOS ULTIMOS AÑOS"],["TittleInstancesMonthlyChart","INSTANCIAS SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleAccessMonthlyChart","ACCESOS A SEDE ELECTRÓNICA: EVOLUCIÓN MENSUAL"],["TittleInstancesPrevYearsChart","INSTANCIAS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleAccessPrevYearsChart","ACCESOS SEDE ELECTRÓNICA: ULTIMOS AÑOS"],["TittleInstancesCurrMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTANCIAS SEDE ELECTRÓNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESOS SEDE ELECTRÓNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESOS SEDE ELECTRÓNICA: MES ANTERIOR"]]),ca_ES:new Map([["TittleAccChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["Acces","Accessos"],["TittleInstancesChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ DIÀRIA"],["InstancesChartText","Instancias electrónicas"],["Instances","Instàncies"],["TittleInstancesYearlyChart","INSTÀNCIES SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleAccessYearlyChart","ACCESSOS A SEU ELECTRÒNICA: DESGLOSSAMENT DELS ÚLTIMS ANYS"],["TittleInstancesMonthlyChart","INSTÀNCIES SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleAccessMonthlyChart","ACCESSOS A SEU ELECTRÒNICA: EVOLUCIÓ MENSUAL"],["TittleInstancesPrevYearsChart","INSTÀNCIES SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleAccessPrevYearsChart","ACCESSOS A SEU ELECTRÒNICA: ÚLTIMS ANYS"],["TittleInstancesCurrMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ACTUAL"],["TittleInstancesPrevMonth","INSTÀNCIES SEU ELECTRÒNICA: MES ANTERIOR"],["TittleAccessCurrMonth","ACCESSOS SEU ELECTRÒNICA: MES ACTUAL"],["TittleAccessPrevMonth","ACCESSOS A SEU ELECTRÒNICA: MES ANTERIOR"]])};function cn(t,r){if(0===r.resultset.length)N("#chartSeuElectronica","#no_dataSeuElectronica");else{O("#no_dataSeuElectronica","#chartSeuElectronica");const t=r.resultset,n=r.resultset.length,o=new Set,a=[];for(let e=0;e<n;e+=1)o.add(t[e][0]),a.push(t[e][1]);const i=Mt(o.size);tt("chartSeuElectronica",k([{name:ln[e].get("Acces"),type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:a}],null,Array.from(o.values()),ln[e].get("Acces"),i,!0,p,void 0,ln[e].get("TittleAccChart")))}}function un(t,r){if(0===r.resultset.length)N("#chartInstanciesSeuElectronica","#no_dataInstanciesSeuElectronica");else{O("#no_dataInstanciesSeuElectronica","#chartInstanciesSeuElectronica");const t=r.resultset,n=r.resultset.length,o=new Set,a=[],i=[];for(let e=0;e<n;e+=1)o.add(yt(t[e][0])),a.push(yt(t[e][0])),i.push(t[e][1]);const s=Mt(o.size);tt("chartInstanciesSeuElectronica",k([{name:ln[e].get("InstancesChartText"),type:"line",symbol:"circle",symbolSize:6,smooth:!1,itemStyle:{color:"#3f02f7"},data:i}],null,Array.from(o.values()),ln[e].get("Instances"),s,!0,20,void 0,ln[e].get("TittleInstancesChart")))}}function hn(t,r){0===r.resultset.length?N("#chartInstancesSeuElectronica_BarMonth","#no_dataInstancesSeuElectronica_BarMonth"):(O("#no_dataInstancesSeuElectronica_BarMonth","#chartInstancesSeuElectronica_BarMonth"),tt("chartInstancesSeuElectronica_BarMonth",V(r.resultset,ln[e].get("Instances"),void 0,ln[e].get("TittleInstancesMonthlyChart"),ln[e].get("InstancesChartText"))))}function fn(t,r){0===r.resultset.length?N("#chartSeuElectronica_BarMonth","#no_dataSeuElectronica_BarMonth"):(O("#no_dataSeuElectronica_BarMonth","#chartSeuElectronica_BarMonth"),tt("chartSeuElectronica_BarMonth",V(r.resultset,ln[e].get("Acces"),void 0,ln[e].get("TittleAccessMonthlyChart"))))}function pn(t,r){if(0===r.resultset.length)N("#chartYearInstancesSeuElectronica_gauge_semicircle","#no_dataYearInstancesSeuElectronica_gauge_semicircle");else{O("#no_dataYearInstancesSeuElectronica_gauge_semicircle","#chartYearInstancesSeuElectronica_gauge_semicircle");const t=P("chartYearSeuElectronica_gauge_semicircle");tt("chartYearInstancesSeuElectronica_gauge_semicircle",J(r.resultset,ln[e].get("TittleInstancesPrevYearsChart"),t))}}function dn(t,r){if(0===r.resultset.length)N("#chartYearSeuElectronica_gauge_semicircle","#no_dataYearSeuElectronica_gauge_semicircle");else{O("#no_dataYearSeuElectronica_gauge_semicircle","#chartYearSeuElectronica_gauge_semicircle");const t=P("chartYearSeuElectronica_gauge_semicircle");tt("chartYearSeuElectronica_gauge_semicircle",J(r.resultset,ln[e].get("TittleAccessPrevYearsChart"),t))}}function gn(t,r){if(0===r.resultset.length)N("#chartInstancesSeuElectronica_reloj_semicircle","#no_dataInstancesSeuElectronica_reloj_semicircle"),N("#chartInstancesSeuElectronica_reloj_semicircle_lastmonth","#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth");else{O("#no_dataInstancesSeuElectronica_reloj_semicircle","#chartInstancesSeuElectronica_reloj_semicircle"),O("#no_dataInstancesSeuElectronica_reloj_semicircle_lastmonth","#chartInstancesSeuElectronica_reloj_semicircle_lastmonth");const t=0,n=1,o=r.resultset,a=P("chartSeuElectronica_reloj_semicircle");tt("chartInstancesSeuElectronica_reloj_semicircle",H(o,t,ln[e].get("TittleInstancesCurrMonth"),a)),tt("chartInstancesSeuElectronica_reloj_semicircle_lastmonth",H(o,n,ln[e].get("TittleInstancesPrevMonth"),a))}}function mn(t,r){if(0===r.resultset.length)N("#chartSeuElectronica_reloj_semicircle","#no_dataSeuElectronica_reloj_semicircle"),N("#chartSeuElectronica_reloj_semicircle_lastmonth","#no_dataSeuElectronica_reloj_semicircle_lastmonth");else{O("#no_dataSeuElectronica_reloj_semicircle","#chartSeuElectronica_reloj_semicircle"),O("#no_dataSeuElectronica_reloj_semicircle_lastmonth","#chartSeuElectronica_reloj_semicircle_lastmonth");const t=0,n=1,o=r.resultset,a=P("chartSeuElectronica_reloj_semicircle");tt("chartSeuElectronica_reloj_semicircle",H(o,t,ln[e].get("TittleAccessCurrMonth"),a)),tt("chartSeuElectronica_reloj_semicircle_lastmonth",H(o,n,ln[e].get("TittleAccessPrevMonth"),a))}}function yn(e,r){if(0===r.resultset.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{const n={title:{text:e.chartName},xAxis:{name:`\n\n\n\n${e.yAxisName}`}};(0,t.initStackedBarChartMonthSeries)(e.idChart,r.resultset,n)}}function Sn(t,e){yn({idChart:"chartInstancesSeuElectronica_stackedBarYears",idNoData:"no_dataInstancesSeuElectronica_stackedBarYears",chartName:ln[Ot].get("TittleInstancesYearlyChart"),yAxisName:ln[Ot].get("Instances")},e)}function An(t,e){yn({idChart:"chartSeuElectronica_stackedBarYears",idNoData:"no_dataSeuElectronica_stackedBarYears",chartName:ln[Ot].get("TittleAccessYearlyChart"),yAxisName:ln[Ot].get("Acces")},e)}function bn(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataInstanciesDonadesAlta").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show();const t=e.resultset,r=new Set,n=[],o=[],a=[],i=1130,s=1124,l=1122;t.forEach((t=>{t[0]===i&&(r.add(t[1]),n.push(t[2])),t[0]===l&&(r.add(t[1]),a.push(t[2])),t[0]===s&&(r.add(t[1]),o.push(t[2]))}));const c=Mt(r.size),u=25,h=-5,f=[{name:"Instàncies",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:a}],p=[{name:"Expedients",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],d=k([{name:"Tasques",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:n}],null,Array.from(r.values()),"Tasques",c,!0,h,void 0,"TASQUES ADMINISTRATIVES PIAE REALITZADES: EVOLUCIÓ DIÀRIA"),g=k(f,null,Array.from(r.values()),"Instàncies",c,!0,u,void 0,"INSTÀNCIES PIAE DONADES D'ALTA: EVOLUCIÓ DIÀRIA"),m=k(p,null,Array.from(r.values()),"Expedients",c,!0,u,void 0,"EXPEDIENTS PIAE DONADES D'ALTA: EVOLUCIÓ DIÀRIA");tt("chartInstanciesDonadesAlta",g),tt("chartAdministrativesRealitzades",d),tt("chartExpDonatsAlta",m)}}function En(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataResolucionsAssentades").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show(),$("#chartResolucionsAssentades").css("background","#ffffff"),$("#chartResolucionsAssentades").show(),$("#chartNotificacionsTelematic").css("background","#ffffff"),$("#chartNotificacionsTelematic").show();const t=e.resultset,r=e.resultset.length,n=new Set,o=[];for(let e=0;e<r;e+=1)n.add(t[e][0]),o.push(t[e][1]);const a=Mt(n.size),i=35;tt("chartResolucionsAssentades",k([{name:"Resolucions",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],null,Array.from(n.values()),"Resolucions",a,!0,i,void 0,"RESOLUCIONS PIAE ASSENTADES: EVOLUCIÓ DIÀRIA"))}}function vn(t,e){if(0===e.resultset.length)$("#chartInstanciesDonadesAlta").hide(),$("#chartExpDonatsAlta").hide(),$("#chartAdministrativesRealitzades").hide(),$("#no_dataInstanciesDonadesAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataInstanciesDonadesAlta").show(),$("#no_dataExpDonatsAlta").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataExpDonatsAlta").show(),$("#no_dataAdministrativesRealitzades").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataAdministrativesRealitzades").show();else{$("#no_dataNotificacionsTelematic").hide(),$("#no_dataExpDonatsAlta").hide(),$("#no_dataAdministrativesRealitzades").hide(),$("#chartInstanciesDonadesAlta").css("background","#ffffff"),$("#chartInstanciesDonadesAlta").show(),$("#chartExpDonatsAlta").css("background","#ffffff"),$("#chartExpDonatsAlta").show(),$("#chartAdministrativesRealitzades").css("background","#ffffff"),$("#chartAdministrativesRealitzades").show(),$("#chartResolucionsAssentades").css("background","#ffffff"),$("#chartResolucionsAssentades").show(),$("#chartNotificacionsTelematic").css("background","#ffffff"),$("#chartNotificacionsTelematic").show();const t=e.resultset,r=e.resultset.length,n=new Set,o=[];for(let e=0;e<r;e+=1)n.add(t[e][0]),o.push(t[e][1]);const a=Mt(n.size),i=40;tt("chartNotificacionsTelematic",k([{name:"Notificacions",type:"line",smooth:!1,symbol:"circle",symbolSize:6,itemStyle:{color:"#3f02f7"},data:o}],null,Array.from(n.values()),"Notificacions",a,!0,i,void 0,"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: EVOLUCIÓ DIÀRIA"))}}const In=0,Mn=1,wn=2,Tn=3,Cn=4,Ln=1130,_n=1124,Dn=1122,Nn=1143,On=1139;function Un(t){const e=[],r=[],n=[],o=[],a=[];return t.forEach((t=>{t[0]===Ln?n.push([t[1],t[2],t[3]]):t[0]===Dn?e.push([t[1],t[2],t[3]]):t[0]===_n?r.push([t[1],t[2],t[3]]):t[0]===Nn?o.push([t[1],t[2],t[3]]):t[0]===On&&a.push([t[1],t[2],t[3]])})),[e,r,n,a,o]}function xn(t,e){[{chartId:`#chartInstanciesDonadesAlta${t}`,noDataId:`#no_dataInstanciesDonadesAlta${t}`},{chartId:`#chartExpDonadesAlta${t}`,noDataId:`#no_dataExpDonadesAlta${t}`},{chartId:`#chartAdministrativesDonadesAlta${t}`,noDataId:`#no_dataAdministrativesDonadesAlta${t}`},{chartId:`#chartResDonadesAlta${t}`,noDataId:`#no_dataResDonadesAlta${t}`},{chartId:`#chartNotificacionsDonadesAlta${t}`,noDataId:`#no_dataNotificacionsDonadesAlta${t}`}].forEach((({chartId:t,noDataId:r})=>{e?O(t,r):N(r,t)}))}function Pn(t,e){if(0===e.resultset.length)xn("BarMonth");else{xn("BarMonth");const t=Un(e.resultset),r=-30,n=V(t[In],"Instàncies",r,"INSTÀNCIES PIAE DONADES D'ALTA: EVOLUCIÓ MENSUAL"),o=V(t[Mn],"Expedients",r,"EXPEDIENTS PIAE DONADES D'ALTA: EVOLUCIÓ MENSUAL"),a=V(t[wn],"Tasques",r,"TASQUES ADMINISTRATIVES PIAE REALITZADES: EVOLUCIÓ MENSUAL"),i=V(t[Tn],"Resolucions",r,"RESOLUCIONS PIAE ASSENTADES: EVOLUCIÓ MENSUAL"),s=V(t[Cn],"Notificacions",r+15,"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: EVOLUCIÓ MENSUAL");tt("chartInstanciesDonadesAltaBarMonth",n),tt("chartExpDonadesAltaBarMonth",o),tt("chartAdministrativesDonadesAltaBarMonth",a),tt("chartResDonadesAltaBarMonth",i),tt("chartNotificacionsDonadesAltaBarMonth",s)}}function Rn(e,r){if(0===r.resultset.length)xn("StackedBarYears");else{xn("StackedBarYears");const e=Un(r.resultset),n={title:{text:"INSTÀNCIES PIAE DONADES D'ALTA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nInstàncies"}};(0,t.initStackedBarChartMonthSeries)("chartInstanciesDonadesAltaStackedBarYears",e[In],n);const o={title:{text:"EXPEDIENTS PIAE DONATS D'ALTA: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nExpedients"}};(0,t.initStackedBarChartMonthSeries)("chartExpDonadesAltaStackedBarYears",e[Mn],o);const a={title:{text:"TASQUES ADMINISTRATIVES PIAE REALITZADES: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nTasques"}};(0,t.initStackedBarChartMonthSeries)("chartAdministrativesDonadesAltaStackedBarYears",e[wn],a);const i={title:{text:"RESOLUCIONS PIAE ASSENTADES: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nResolucions"}};(0,t.initStackedBarChartMonthSeries)("chartResDonadesAltaStackedBarYears",e[Tn],i);const s={title:{text:"NOTIFICACIONS PIAE AMB ENVIAMENT TELEMATIC: DESGLOSSAMENT DELS ÚLTIMS ANYS"},xAxis:{name:"\n\n\n\nNotificacions"}};(0,t.initStackedBarChartMonthSeries)("chartNotificacionsDonadesAltaStackedBarYears",e[Cn],s)}}function kn(t,e){if(0===e.resultset.length)xn("GaugeMonth");else{xn("GaugeMonth");const t=0,r=1,n=Un(e.resultset),o=P("chartInstanciesDonadesAltaGaugeMonth"),a=H(n[In],t,"INSTÀNCIES PIAE DONADES D'ALTA: MES ACTUAL",o),i=H(n[Mn],t,"EXPEDIENTS PIAE DONADES D'ALTA: MES ACTUAL",o),s=H(n[wn],t,"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: MES ACTUAL",o),l=H(n[Tn],t,"RESOLUCIONS PIAE ASSENTADES: MES ACTUAL",o),c=H(n[Cn],t,"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: MES ACTUAL",o);tt("chartInstanciesDonadesAltaGaugeMonth",a),tt("chartExpDonadesAltaGaugeMonth",i),tt("chartAdministrativesDonadesAltaGaugeMonth",s),tt("chartResDonadesAltaGaugeMonth",l),tt("chartNotificacionsDonadesAltaGaugeMonth",c);const u=H(n[In],r,"INSTÀNCIES PIAE DONADES D'ALTA: MES ANTERIOR",o),h=H(n[Mn],r,"EXPEDIENTS PIAE DONADES D'ALTA: MES ANTERIOR",o),f=H(n[wn],r,"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: MES ANTERIOR",o),p=H(n[Tn],r,"RESOLUCIONS PIAE ASSENTADES: MES ANTERIOR",o),d=H(n[Cn],r,"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: MES ANTERIOR",o);tt("chartInstanciesDonadesAltaGaugeLastMonth",u),tt("chartExpDonadesAltaGaugeLastMonth",h),tt("chartAdministrativesDonadesAltaGaugeLastMonth",f),tt("chartResDonadesAltaGaugeLastMonth",p),tt("chartNotificacionsDonadesAltaGaugeLastMonth",d)}}function Bn(t,e){if(0===e.resultset.length)xn("GaugeYear");else{xn("GaugeYear");const t=function(t){const e=[],r=[],n=[],o=[],a=[];return t.forEach((t=>{t[0]===Ln?n.push([t[1],t[2]]):t[0]===Dn?e.push([t[1],t[2]]):t[0]===_n?r.push([t[1],t[2]]):t[0]===Nn?a.push([t[1],t[2]]):t[0]===On&&o.push([t[1],t[2]])})),[e,r,n,o,a]}(e.resultset),r=P("chartInstanciesDonadesAltaGaugeYear"),n=J(t[In],"INSTÀNCIES PIAE DONADES D'ALTA: ÚLTIMS ANYS",r),o=J(t[Mn],"EXPEDIENTS PIAE DONADES D'ALTA: ÚLTIMS ANYS",r),a=J(t[wn],"TASQUES ADMINISTRATIVES PIAE\nREALITZADES: ÚLTIMS ANYS",r),i=J(t[Tn],"RESOLUCIONS PIAE ASSENTADES: ÚLTIMS ANYS",r),s=J(t[Cn],"NOTIFICACIONS PIAE AMB\nENVIAMENT TELEMATIC: ÚLTIMS ANYS",r);tt("chartInstanciesDonadesAltaGaugeYear",n),tt("chartExpDonadesAltaGaugeYear",o),tt("chartAdministrativesDonadesAltaGaugeYear",a),tt("chartResDonadesAltaGaugeYear",i),tt("chartNotificacionsDonadesAltaGaugeYear",s)}}function $n(t,e){Tt(e,!0,15,"TEMPERATURA MITJANA DIÀRIA","ºC","chartTemperatureMitjanaDiaria","no_dataTemperatureMitjanaDiaria",void 0,void 0,!0,0)}function Fn(t,e){let r="MITJANA DIÀRIA DE SOROLL : ";const n=e.filter((e=>e[5]===t)),o=new Set(["Matí","Vesprada","Nit"]),a=new Set,i={name:"Matí",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:d}],lineStyle:{color:"#5470c6"}}},s={name:"Vesprada",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:d}],lineStyle:{color:"#5470c6"}}},l={name:"Nit",type:"line",smooth:!1,symbol:"circle",symbolSize:6,data:[],markLine:{data:[{yAxis:g}],lineStyle:{color:"#fac858"}}};r+=n[0][5],n.forEach((t=>{i.data.push(t[6]),s.data.push(t[7]),l.data.push(t[8]),a.add(yt(t[1]))}));const c=Mt(a.size);tt("chartSonometroMapa",k([i,s,l],Array.from(o.values()),Array.from(a.values()),"dB",c,!0,-10,void 0,r))}const Gn="MITJANA DE SOROLL: ";function Vn(t,e,r,n,o,a){const i=e.resultset,s=`resultadoDirecciones${a}`,l=Dashboards.getParameterValue(s).map((t=>t[0])),c=[],u={},h=i.map((t=>{const e=t[0].split("-");return`${e[2]}/${e[1]}/${e[0]}`}));Array.from(new Set(h)).forEach((t=>{u[t]=Array(l.length).fill(null)})),i.forEach((t=>{const e=yt(t[0]);l.every(((r,n)=>t[1].toString()!==r||(u[e][n]=t[2],!1)))})),l.forEach(((t,e)=>{const r={name:"",type:"line",smooth:!1,data:[],symbol:"circle",symbolSize:6,markLine:{data:[{yAxis:n}],lineStyle:{color:"#ff9933"}}},o=Object.values(u).map((t=>t[e]));r.name=t,r.data=o,c.push(r)}));const f=Mt(Array.from(Object.keys(u)).length),p=l.map((t=>({[t]:!1}))),d={};p.forEach(((t,e)=>{const r=Object.keys(t)[0];d[r]=e<4||t[r]})),tt(r,k(c,l,Array.from(Object.keys(u)),"dB",f,!0,-10,void 0,o,void 0,void 0,d))}function zn(t,e,r,n){const o=`${n.toUpperCase()} MATÍ`;Vn(0,e,r+n,d,Gn+o,n)}function jn(t,e,r,n){const o=`${n.toUpperCase()} VESPRADA`;Vn(0,e,r+n,d,Gn+o,n)}function Wn(t,e,r,n){const o=`${n.toUpperCase()} NIT`;Vn(0,e,r+n,g,Gn+o,n)}function Yn(){var t;let e;const r=L.icon({iconUrl:ft("build/images/mapas/marker-icon-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]}),n=L.icon({iconUrl:ft("build/images/mapas/marker-icon-selected-sonometros.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]});t=L.map("myMap").setView([39.47225,-.37739],14);let o=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});t.setMinZoom(5),t.setMaxZoom(20),o.addTo(t),L.geoJSON(legacy.obtenerGeoJson(resultadoSonometros,0,5,9),{onEachFeature:function(t,o){!function(t,e){if(t.properties&&t.properties.objectoId){let r=t.properties.address;e.bindPopup(r),e.on("click",(()=>legacy.createChart(r,resultadoSonometros)))}}(t,o),function(t){t.on("click",(t=>{var o;o=t.target,e&&e.setIcon(r),e=o,e.setIcon(n)}))}(o)},pointToLayer:function(t,e){return L.marker(e,{icon:r})}}).addTo(t)}function Zn(){(0,t.loadIframeOnClickEvent)("#tabSmartCity","#iframeSmartCity","https://lookerstudio.google.com/embed/reporting/ff43c17f-23cb-4edb-923b-a7b061d829dc/page/6WdoC?hl=ca"),(0,t.loadIframeOnClickEvent)("#tabCdmCiutat","#iframeCdMCiutat","https://lookerstudio.google.com/embed/reporting/2da9d93e-d833-4a00-833a-19ac0746dc9f/page/6WdoC?hl=ca"),document.querySelector("#iframeValenciaMinut").setAttribute("src","https://lookerstudio.google.com/embed/reporting/14a41533-3cd8-4f75-b303-9a494c0e4a9d/page/6WdoC?hl=ca")}function Jn(){render_echartPM10.listeners=["filterDatesParam","updateFilter"],render_echartPM1.listeners=["filterDatesParam","updateFilter"],render_echartPM25.listeners=["filterDatesParam","updateFilter"],render_echartO3.listeners=["filterDatesParam","updateFilter"],render_echartSO2.listeners=["filterDatesParam","updateFilter"],render_echartNO2.listeners=["filterDatesParam","updateFilter"],render_echartNO.listeners=["filterDatesParam","updateFilter"],render_echartNOX.listeners=["filterDatesParam","updateFilter"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter")}function Hn(t,e,r,n,o,a){return{title:{text:n},legend:{show:!0,data:e},xAxis:{type:"category",data:t},yAxis:{name:o,nameTextStyle:{padding:[-25,0,0,-22]},axisLabel:{formatter:w}},dataZoom:{show:a,data:t,start:r},toolbox:{show:!0}}}function Kn(t,e,r,n,o,a){return{grid:{left:"5",right:"0",bottom:"0",top:"200"},title:{text:n},legend:{show:!0,data:e},xAxis:{type:"category",data:t,axisLabel:{margin:15}},yAxis:{name:o,nameGap:"25",nameTextStyle:{padding:[0,0,0,-28],align:"left"},axisLabel:{formatter:w,align:"right",padding:[0,0,0,0]}},dataZoom:{show:a,data:t,start:r},toolbox:{show:!1}}}function qn(t,e){yo(e,"µg/m3","echartNO2Portada","CONTAMINACIÓ NO2",!1,!0),TEXTS_GAUGE_YEAR[DEFAULT_LANGUAGE].get("tituloGrafica"),legendData,xAxisData,maxValue}function Xn(t,e){yo(e,"µg/m3","chartNO2CEAM","CONTAMINACIÓ NO2\nEstacions CEAM")}function Qn(t,e){So(e,"µg/m3","chartNO2PRESUPUESTO","CONTAMINACIÓ NO2\nEstacions de Pressupostos Participatius")}function to(t,e){yo(e,"µg/m3","chartNOCEAM","CONTAMINACIÓ NO\nEstacions CEAM")}function eo(t,e){So(e,"µg/m3","chartNOPRESUPUESTO","CONTAMINACIÓ NO\nEstacions de Pressupostos Participatius")}function ro(t,e){yo(e,"µg/m3","chartNOXCEAM","CONTAMINACIÓ NOX\nEstacions CEAM")}function no(t,e){So(e,"µg/m3","chartNOXPRESUPUESTO","CONTAMINACIÓ NOX\nEstacions de Pressupostos Participatius")}function oo(t,e){yo(e,"µg/m3","chartPM10CEAM","CONTAMINACIÓ PM10\nEstacions CEAM")}function ao(t,e){So(e,"µg/m3","chartPM10PRESUPUESTO","CONTAMINACIÓ PM10\nEstacions de Pressupostos Participatius")}function io(t,e){yo(e,"µg/m3","chartPM1CEAM","CONTAMINACIÓ PM1\nEstacions CEAM")}function so(t,e){So(e,"µg/m3","chartPM1PRESUPUESTO","CONTAMINACIÓ PM1\nEstacions de Pressupostos Participatius")}function lo(t,e){yo(e,"µg/m3","chartPM25CEAM","CONTAMINACIÓ PM2,5\nEstacions CEAM")}function co(t,e){So(e,"µg/m3","chartPM25PRESUPUESTO","CONTAMINACIÓ PM25\nEstacions de Pressupostos Participatius")}function uo(t,e){yo(e,"µg/m3","chartO3CEAM","CONTAMINACIÓ O3\nEstacions CEAM")}function ho(t,e){So(e,"µg/m3","chartO3PRESUPUESTO","CONTAMINACIÓ O3\nEstacions de Pressupostos Participatius")}function fo(t,e){yo(e,"µg/m3","chartSO2CEAM","CONTAMINACIÓ SO2\nEstacions CEAM")}function po(t,e){So(e,"µg/m3","chartSO2PRESUPUESTO","CONTAMINACIÓ SO2\nEstacions de Pressupostos Participatius")}function go(t,e){let r=[],n=[],o=[],a=[];r=function(t){const e=["A01_AVFRANCIA_24h_va","A02_BULEVARDSUD_24h_va","A03_MOLISOL_24h_va","A04_PISTASILLA_24h_va","A05_POLITECNIC_24h_va","A06_VIVERS_24h_va","A07_VALENCIACENTRE_24h_va","A01_AVFRANCIA_24h_vm","A02_BULEVARDSUD_24h_vm","A03_MOLISOL_24h_vm","A04_PISTASILLA_24h_vm","A05_POLITECNIC_24h_vm","A06_VIVERS_24h_vm","A07_VALENCIACENTRE_24h_vm"],r=["A01_AVFRANCIA_24h","A02_BULEVARDSUD_24h","A03_MOLISOL_24h","A04_PISTASILLA_24h","A05_POLITECNIC_24h","A06_VIVERS_24h","A07_VALENCIACENTRE_24h"];let n=[],o=[],a=[],i=[];return t.forEach((t=>{r.includes(t[2])?n.push(t):e.includes(t[2])&&o.push(t),a.push(t[1])})),i.push(o),i.push(n),i.push(a),i}(e.filter((e=>e[8]===t))),n=r[0],o=r[1],a=r[2];const i="pm10",s="pm25";!function(t,e,r){var n=document.getElementById("chartGasometroMapa");if(n){var o,a=echarts.init(n,null,{renderer:"canvas",useDirtyRect:!1});(o={title:{text:r,textStyle:{color:"#000",fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat",fontSize:30}},tooltip:{renderMode:"html",formatter:function(t){return t.data,["<b>"+t.seriesName+'</b><hr size=1 style="margin: 3px 0">'+t.value[0]+':<br/> <span style="display: block; text-align: right;"><b style="font-size: 120%;">'+t.value[2]+"</b> µg/m<sup>3</sup></span>"].join("")},textStyle:{color:"#000",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:15}},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}},right:10,top:10},legend:{data:["NO2","SO2","PM10","PM-2.5","O3"],top:"5%",show:!1,textStyle:{color:"#333",fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat",fontSize:15}},grid:{top:"18%",left:".5%",right:".5%",bottom:"3%",containLabel:!0,height:"67%"},xAxis:{type:"category",data:t,axisLabel:{formatter:"{value}",textStyle:{fontSize:12,fontFamily:"Montserrat",color:"#333",fontWeight:"500"},margin:15},nameGap:"5px"},yAxis:{type:"category",data:["NO2","SO2","PM10","PM25","O3"],axisLabel:{formatter:"{value}",textStyle:{fontSize:16,fontFamily:"Montserrat",color:"#333",fontWeight:"600"},margin:15},splitArea:{show:!1}},dataZoom:[{type:"slider",show:!0,xAxisIndex:[0],start:97,end:100}],series:[{name:"O<sup>3</sup> validados",type:"heatmap",data:e.o3.validate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.5},emphasis:{itemStyle:{opacity:1}}},{name:"O<sup>3</sup> no validados",type:"heatmap",data:e.o3.invalidate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.3},emphasis:{itemStyle:{opacity:1}}},{name:"NO2 validados",name:"NO<sup>2</sup> validados",type:"heatmap",data:e.no2.validate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.5},emphasis:{itemStyle:{opacity:1}}},{name:"NO2 no validados",name:"NO<sup>2</sup> no validados",type:"heatmap",data:e.no2.invalidate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.3},emphasis:{itemStyle:{opacity:1}}},{name:"SO2 validados",name:"SO<sup>2</sup> validados",type:"heatmap",data:e.so2.validate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.5},emphasis:{itemStyle:{opacity:1}}},{name:"SO2 no validados",name:"SO<sup>2</sup> no validados",type:"heatmap",data:e.so2.invalidate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.3},emphasis:{itemStyle:{opacity:1}}},{name:"PM-10 validados",type:"heatmap",data:e.pm10.validate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.5},emphasis:{itemStyle:{opacity:1}}},{name:"PM-10 no validados",type:"heatmap",data:e.pm10.invalidate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.3},emphasis:{itemStyle:{opacity:1}}},{name:"PM-25 validados",type:"heatmap",data:e.pm25.validate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.5},emphasis:{itemStyle:{opacity:1}}},{name:"PM-25 no validados",type:"heatmap",data:e.pm25.invalidate,label:{show:!0,position:["50%","50%"],color:"transparent",fontSize:10,emphasis:{fontSize:26,color:"#000"},align:"center",verticalAlign:"middle",opacity:1,fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat"},itemStyle:{color:function(t){return t.value[2]>=0&&t.value[2]<=40?"#00ffff":t.value[2]>40&&t.value[2]<=90?"#00b050":t.value[2]>90&&t.value[2]<=120?"#ffcc00":t.value[2]>120&&t.value[2]<=230?"#ff3300":t.value[2]>231&&t.value[2]<=330?"#9a0000":t.value[2]>331&&t.value[2]<=430?"#9a00ff":void 0},opacity:.3},emphasis:{itemStyle:{opacity:1}}}]})&&a.setOption(o),window.addEventListener("resize",a.resize)}else console.error("Element with id 'chartGasometroMapa' not found")}(a,{no2:{validate:mo(n,"no2"),invalidate:mo(o,"no2")},so2:{validate:mo(n,"so2"),invalidate:mo(o,"so2")},pm10:{validate:mo(n,i),invalidate:mo(o,i)},pm25:{validate:mo(n,s),invalidate:mo(o,s)},o3:{validate:mo(n,"o3"),invalidate:mo(o,"o3")}},t)}function mo(t,e){let r;switch(e.toUpperCase()){case"NO2":r=4;break;case"SO2":r=5;break;case"PM10":r=6;break;case"PM25":r=7;break;case"O3":r=8;break;default:return console.error("Unknown pollutant: ",e),[]}return t.map((t=>{const n=t[1],o=t[r-1];return[n,e.toUpperCase(),o]}))}function yo(e,r,n,o="Estaciones CEAM ",a=!0,i=!1){const s=m.slice(),l=X(e.resultset||e,s,!1),c=l[1],u=Array.from(c.values()),h=l[2],f=Mt(c.size),p=(0,t.resultsetWithFields)(e),d=(0,t.configureDataValidate)(p,l[0],["A01_AVFRANCIA_24h_va","A02_BULEVARDSUD_24h_va","A03_MOLISOL_24h_va","A04_PISTASILLA_24h_va","A05_POLITECNIC_24h_va","A06_VIVERS_24h_va","A07_VALENCIACENTRE_24h_va","A09_CABANYAL_24h_va","A01_AVFRANCIA_24h_vm","A02_BULEVARDSUD_24h_vm","A03_MOLISOL_24h_vm","A04_PISTASILLA_24h_vm","A05_POLITECNIC_24h_vm","A06_VIVERS_24h_vm","A07_VALENCIACENTRE_24h_vm","A09_CABANYAL_24h_vm"],["A01_AVFRANCIA_24h","A02_BULEVARDSUD_24h","A03_MOLISOL_24h","A04_PISTASILLA_24h","A05_POLITECNIC_24h","A06_VIVERS_24h","A07_VALENCIACENTRE_24h","A09_CABANYAL_24h"]);if(!1===i){const e=Hn(u,h,f,o,r,a);(0,t.configureLinesChartValidates)(n,d,e)}else{const e=Kn(u,h,f,o,r,a);(0,t.configureLinesChartValidates)(n,d,e)}}function So(e,r,n,o){e=function(t){return t.resultset=t.resultset.map((t=>(t[0]=t[0].replace(/^A\d{2}_/,""),t))),t}(e);const a=m.slice(),i=X(e.resultset||e,a,!1),s=i[1],l=Array.from(s.values()),c=i[2],u=Mt(s.size),h=(0,t.resultsetWithFields)(e),f=(0,t.configureDataValidate)(h,i[0],[],["A08_DR_LLUCH_24h","A10_OLIVERETA_24h","A11_PATRAIX_24h"]),p=Hn(l,c,u,o,r);(0,t.configureLinesChartValidates)(n,f,p)}function Ao(){var t;let e;const r=L.icon({iconUrl:ft("build/images/mapas/marker-icon-polucion.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]}),n=L.icon({iconUrl:ft("build/images/mapas/marker-icon-selected-polucion.svg/content"),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[0,-26]});t=L.map("myMap").setView([39.47225,-.37739],14);let o=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});t.setMinZoom(5),t.setMaxZoom(20),o.addTo(t),L.geoJSON(legacy.obtenerGeoJson(resultadoContaminacion,0,8,9),{onEachFeature:function(t,o){!function(t,e){if(t.properties&&t.properties.objectoId){let r=t.properties.address;e.bindPopup(r),e.on("click",(()=>go(r,resultadoContaminacion)))}}(t,o),function(t){t.on("click",(t=>{var o;o=t.target,e&&e.setIcon(r),e=o,e.setIcon(n)}))}(o)},pointToLayer:function(t,e){return L.marker(e,{icon:r})}}).addTo(t)}r(5606)})(),n})()));
|