ar-poncho 2.0.320 → 2.0.321
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/.editorconfig +1 -1
- package/.github/workflows/build-poncho.yml +13 -29
- package/dist/css/device-breadcrumb.css +1 -1
- package/dist/css/icono-arg.css +168 -8
- package/dist/css/poncho-map.css +1 -1
- package/dist/css/poncho-table-1.1.css +1 -0
- package/dist/css/poncho.css +2 -2
- package/dist/css/poncho.min.css +2 -2
- package/dist/css/poncho_mobile.css +2 -2
- package/dist/fonts/{icono-arg_9fd8913a0f55b524cf2c5287f865d425.eot → icono-arg_02c1319743cdcf3da43dbf293119dc6c.eot} +0 -0
- package/dist/fonts/{icono-arg_9fd8913a0f55b524cf2c5287f865d425.svg → icono-arg_02c1319743cdcf3da43dbf293119dc6c.svg} +679 -40
- package/dist/fonts/{icono-arg_9fd8913a0f55b524cf2c5287f865d425.ttf → icono-arg_02c1319743cdcf3da43dbf293119dc6c.ttf} +0 -0
- package/dist/fonts/icono-arg_02c1319743cdcf3da43dbf293119dc6c.woff +0 -0
- package/dist/fonts/icono-arg_02c1319743cdcf3da43dbf293119dc6c.woff2 +0 -0
- package/dist/ilustraciones/ilus-arg-adultos-mayores-16x9.svg +303 -0
- package/dist/ilustraciones/ilus-arg-adultos-mayores-640x360.svg +297 -0
- package/dist/ilustraciones/ilus-arg-argentinos-por-el-mundo-16x9.svg +111 -0
- package/dist/ilustraciones/ilus-arg-argentinos-por-el-mundo-640x360.svg +106 -0
- package/dist/ilustraciones/ilus-arg-artistas-16x9.svg +425 -0
- package/dist/ilustraciones/ilus-arg-artistas-640x360.svg +420 -0
- package/dist/ilustraciones/ilus-arg-circula-con-auto-o-moto-16x9.svg +469 -0
- package/dist/ilustraciones/ilus-arg-circula-con-auto-o-moto-640x360.svg +464 -0
- package/dist/ilustraciones/ilus-arg-consumidores-16x9.svg +258 -0
- package/dist/ilustraciones/ilus-arg-consumidores-640x360.svg +251 -0
- package/dist/ilustraciones/ilus-arg-discapacidad-16x9.svg +158 -0
- package/dist/ilustraciones/ilus-arg-discapacidad-640x360.svg +151 -0
- package/dist/ilustraciones/ilus-arg-documentacion-16x9.svg +67 -0
- package/dist/ilustraciones/ilus-arg-documentacion-640x360.svg +60 -0
- package/dist/ilustraciones/ilus-arg-educacion-16x9.svg +108 -0
- package/dist/ilustraciones/ilus-arg-educacion-640x360.svg +100 -0
- package/dist/ilustraciones/ilus-arg-emergencias-16x9.svg +466 -0
- package/dist/ilustraciones/ilus-arg-emergencias-640x360.svg +460 -0
- package/dist/ilustraciones/ilus-arg-emprendimientos-y-negocios-16x9.svg +127 -0
- package/dist/ilustraciones/ilus-arg-emprendimientos-y-negocios-640x360.svg +121 -0
- package/dist/ilustraciones/ilus-arg-extranjeros-16x9.svg +196 -0
- package/dist/ilustraciones/ilus-arg-extranjeros-640x360.svg +190 -0
- package/dist/ilustraciones/ilus-arg-pav-celular-16x9.svg +48 -0
- package/dist/ilustraciones/ilus-arg-pav-computadora1-16x9.svg +97 -0
- package/dist/ilustraciones/ilus-arg-pav-computadora2-16x9.svg +82 -0
- package/dist/ilustraciones/ilus-arg-pav-computadora3-16x9.svg +46 -0
- package/dist/ilustraciones/ilus-arg-pav-persona-16x9.svg +51 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar1-16x9.svg +52 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar10-16x9.svg +95 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar11-16x9.svg +116 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar2-16x9.svg +122 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar3-16x9.svg +60 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar4-16x9.svg +61 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar5-16x9.svg +103 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar6-16x9.svg +61 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar7-16x9.svg +56 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar8-16x9.svg +66 -0
- package/dist/ilustraciones/ilus-arg-salud-malestar9-16x9.svg +72 -0
- package/dist/ilustraciones/ilus-arg-trabajo-16x9.svg +183 -0
- package/dist/ilustraciones/ilus-arg-trabajo-640x360.svg +177 -0
- package/dist/ilustraciones/ilus-arg-transito-16x9.svg +769 -0
- package/dist/ilustraciones/ilus-arg-transito-640x360.svg +764 -0
- package/dist/ilustraciones/ilus-arg-vacaciones-16x9.svg +172 -0
- package/dist/ilustraciones/ilus-arg-vacaciones-640x360.svg +166 -0
- package/dist/ilustraciones/ilus-arg-violencia-y-abuso-16x9.svg +80 -0
- package/dist/ilustraciones/ilus-arg-violencia-y-abuso-640x360.svg +74 -0
- package/dist/ilustraciones/ilus-arg-vivienda-16x9.svg +4468 -0
- package/dist/ilustraciones/ilus-arg-vivienda-640x360.svg +4462 -0
- package/dist/js/device-breadcrumb.js +1 -1
- package/dist/js/mapa-argentina.js +1 -1
- package/dist/js/poncho-map-provinces-contenidos.js +1 -0
- package/dist/js/poncho.js +2594 -797
- package/dist/js/poncho.min.js +21 -1
- package/dist/jsons/icono-arg.json +7813 -0
- package/dist/jsons/illustrations-colors.json +1 -0
- package/dist/jsons/ilus-arg.json +322 -0
- package/dist/jsons/poncho-colors.json +1 -0
- package/dist/jsons/poncho-headers-colors.json +1 -0
- package/gulpfile.js +41 -12
- package/noresults.txt +1 -0
- package/package.json +58 -48
- package/readme.md +1 -1
- package/test/collections.test.js +51 -0
- package/test/html.test.js +6 -0
- package/test/poncho-gapi-legacy.test.js +18 -1
- package/test/string.test.js +42 -1
- package/.npmignore +0 -2
- package/dist/css/argentina.css +0 -8
- package/dist/fonts/icono-arg_9fd8913a0f55b524cf2c5287f865d425.woff +0 -0
- package/dist/fonts/icono-arg_9fd8913a0f55b524cf2c5287f865d425.woff2 +0 -0
- package/package-lock.json +0 -10493
- package/test/color.test.js +0 -24
- package/yarn.lock +0 -5545
package/dist/js/poncho.min.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
const ponchoColorDefinitionsList=[{description:"",name:"Azul",color:"#0072BB",code:"primary",alias:["azul","primary"]},{description:"Acción principal o exitosa",name:"Verde",color:"#2E7D33",code:"success",alias:["verde","success"]},{description:"Atención o peligro",name:"Rojo",color:"#C62828",code:"danger",alias:["rojo","danger"]},{description:"Foco o alerta",name:"Amarillo",color:"#F9A822",code:"warning",alias:["amarillo","warning"]},{description:"",name:"Celeste",color:"#2897D4",code:"info",alias:["celeste","info"]},{description:"Elementos básicos",name:"Negro",color:"#333333",code:"black",alias:["negro","black"]},{description:"Enlace visitado",name:"Uva",color:"#6A1B99",code:"uva",alias:["uva"]},{description:"Texto secundario (subtitulos)",name:"Gris",color:"#525252",code:"muted",alias:["gris","muted"]},{description:"Gris área",name:"Gris intermedio",color:"#F2F2F2",code:"gray",alias:["grisintermedio","gris-area","gray"]},{description:"Fondo footer/header",name:"Celeste Argentina",color:"#37BBED",code:"celeste-argentina",alias:["celesteargentina","celeste-argentina"]},{description:"",name:"Fucsia",color:"#EC407A",code:"fucsia",alias:["fucsia"]},{description:"",name:"Arándano",color:"#C2185B",code:"arandano",alias:["arandano"]},{description:"",name:"Cielo",color:"#039BE5",code:"cielo",alias:["cielo"]},{description:"",name:"Verdin",color:"#6EA100",code:"verdin",alias:["verdin"]},{description:"",name:"Lima",color:"#CDDC39",code:"lima",alias:["lima"]},{description:"",name:"Maiz",color:"#FFCE00",code:"maiz",alias:["maiz","maíz"]},{description:"",name:"Tomate",color:"#EF5350",code:"tomate",alias:["tomate"]},{description:"",name:"Naranja oscuro",color:"#EF6C00",code:"naranja",alias:["naranjaoscuro","naranja"]},{description:"",name:"Verde azulado",color:"#008388",code:"verde-azulado",alias:["verdeazulado","verde-azulado"]},{description:"",name:"Escarapela",color:"#2CB9EE",code:"escarapela",alias:["escarapela"]},{description:"",name:"Lavanda",color:"#9284BE",code:"lavanda",alias:["lavanda"]},{description:"",name:"Mandarina",color:"#F79525",code:"mandarina",alias:["mandarina"]},{description:"",name:"Palta",color:"#50B7B2",code:"palta",alias:["palta"]},{description:"",name:"Cereza",color:"#ED3D8F",code:"cereza",alias:["cereza"]},{description:"",name:"Limón",color:"#D7DF23",code:"limon",alias:["limon"]},{description:"",name:"Verde Jade",color:"#006666",code:"verde-jade",alias:["verdejade","verde-jade"]},{description:"",name:"Verde Aloe",color:"#4FBB73",code:"verde-aloe",alias:["verdealoe","verde-aloe"]},{description:"",name:"Verde Cemento",color:"#B4BEBA",code:"verde-cemento",alias:["verdecemento","verde-cemento"]}],colorVariations={high:["primary","verde-jade","success","naranja","danger","arandano","uva","celeste-argentina","palta","verdin","warning","tomate","fucsia","lavanda","black"],medium:["info","verde-azulado","verdin","warning","tomate","fucsia","lavanda","palta","lima","maiz","muted"]},ponchoColorDefinitions=t=>{return ponchoColorDefinitionsList.find(e=>e.alias.some(e=>null!=typeof t&&e==t))||!1},ponchoColor=e=>ponchoColorDefinitions(e)?.color||e,cleanUpHex=e=>{let t=e.toString().replace("#","").trim().toUpperCase();return!(t.length<3||6<t.length)&&"#"+(t=3==t.length?Array.from(t).map(e=>e.repeat(2)).join(""):t)},ponchoColorByHex=t=>ponchoColorDefinitionsList.find(e=>{return cleanUpHex(t)==cleanUpHex(e.color)});async function fetch_json(e,t={}){t=Object.assign({},{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"},redirect:"follow"},t),e=await fetch(e,t);if(e.ok)return e.json();throw new Error("HTTP error! status: "+e.status)}const replaceSpecialChars=e=>{if(!e)return"";var t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż",s="aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz";const a=t+t.toUpperCase(),r=s+s.toUpperCase();t=new RegExp(a.split("").join("|"),"g");return e.toString().replace(t,e=>r.charAt(a.indexOf(e)))},slugify=e=>{if(!e)return e;const t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;";var s=new RegExp(t.split("").join("|"),"g");return e.toString().toLowerCase().replace(/\s+/g,"-").replace(s,e=>"aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------".charAt(t.indexOf(e))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},secureHTML=(e,t=[])=>{var s;return!t.some(e=>"*"===e)&&(e=e.toString().replace(/</g,"<").replace(/>/g,">"),0<t.length)?(s=new RegExp("<("+t.join("|")+")(.*?)>","g"),t=new RegExp("</("+t.join("|")+")(.*?)>","g"),e.replace(s,"<$1$2>").replace(t,"</$1>")):e};function ponchoTable(e){return ponchoTableLegacyPatch(),ponchoTableDependant(e)}ponchoTableLegacyPatch=()=>{document.querySelectorAll("select[id=ponchoTableFiltro]").forEach(e=>{var e=e.parentElement,t=document.createElement("div");t.id="ponchoTableFiltro",t.classList.add("row"),e.parentElement.appendChild(t),e.remove()})};const ponchoTableDependant=h=>{var u,p=[],m=!(!h.hasOwnProperty("wizard")||!h.wizard),d=h.hasOwnProperty("emptyLabel")&&h.emptyLabel?h.emptyLabel:"Todos",f={},s=!(!h.hasOwnProperty("orderFilter")||!h.orderFilter),_={},y=["*"];let r={tables:!0,simpleLineBreaks:!0,extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"]};document.querySelector("#ponchoTable").classList.add("state-loading"),jQuery.fn.DataTable.isDataTable("#ponchoTable")&&jQuery("#ponchoTable").DataTable().destroy();const g=(e,t)=>{return s?(t=t,e.toString().localeCompare(t.toString(),"es",{numeric:!0})):null},b=e=>[...new Set(e)],v=(e=0,t,s,a=!1)=>{var r=document.createElement("option");return r.value=s.toString().trim(),r.dataset.column=e,r.textContent=t.toString().trim(),a&&r.setAttribute("selected","selected"),r},C=(e="")=>e.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x=e=>e<=0?0:e,E=()=>[...document.querySelectorAll("[data-filter]")].map(e=>e.value),k=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter")),S=e=>e.every(e=>{try{return showdown.extension(e),!0}catch(e){return!1}}),w=(e,t)=>{var s=document.createElement("a");return s.setAttribute("aria-label",e),s.classList.add("btn","btn-primary","btn-sm","margin-btn"),s.target="_blank",s.href=t,s.textContent=e,s.setAttribute("rel","noopener noreferrer"),s.outerHTML},j=e=>{var t=e.split("/"),t=new Date(t[2],t[1]-1,t[0]).toISOString().split("T")[0],s=document.createElement("span"),a=(s.style.display="none",s.textContent=t,document.createElement("time"));return a.setAttribute("datetime",t),a.textContent=e,s.outerHTML+a.outerHTML},T=e=>replaceSpecialChars(e.toLowerCase()),n=(n,l,c)=>{l=l==p.length?l-1:l;const d=E();var e=u.entries.flatMap(e=>{t=n,s=e,a=c,r=d;var t,s,a,r,i=[...Array(x(t+1)).keys()].map(e=>s[p[x(t-1)]]==r[x(t-1)]&&s[p[x(t)]]==a||""==r[x(t-1)]).every(e=>e);if(e[p[x(l-1)]]==c&&i){const o=e[p[x(l)]];return L(l,f)?A(l).filter(e=>T(o).includes(T(e))):o}}).filter(e=>e),e=b(e);return e.sort(g),e},L=e=>{var t=Object.keys(f);return!!_.hasOwnProperty("filtro-"+t[e])},A=e=>{var t=Object.keys(f);return _.hasOwnProperty("filtro-"+t[e])?_["filtro-"+t[e]]:[]},a=(t,a)=>{var r=Object.keys(f);const i=E();for(let s=t+1;s<=r.length&&r.length!=s;s++){let e=n(t,s,a);0==e.length&&(e=((s,a,r)=>{var e=u.entries.flatMap(e=>{const t=e[p[x(a)]];return(e[p[x(s)]]==r||""==r)&&(L(a,f)?A(a).filter(e=>T(t).includes(T(e))):t)}).filter(e=>e),e=b(e);return e.sort(g),e})(t,s,a));const o=document.querySelector("#"+r[s]);o.innerHTML="",o.appendChild(v(s,d,"",!0)),e.forEach(e=>{var t;e.trim()&&(t=i[s]==e,o.appendChild(v(s,e,e,t)))})}},i=()=>{return window.location.hash.replace("#","")||!1},o=(_hideTable=(e=!0)=>{const t=e?"none":"block",s=e?"block":"none";document.querySelectorAll('[data-visible-as-table="true"],#ponchoTable_wrapper').forEach(e=>e.style.display=t),document.querySelectorAll('[data-visible-as-table="false"]').forEach(e=>e.style.display=s)},()=>{var e=jQuery.fn.DataTable.ext.type.search;e.string=e=>e?"string"==typeof e?replaceSpecialChars(e):e:"",e.html=e=>e?"string"==typeof e?replaceSpecialChars(e.replace(/<.*?>/g,"")):e:"";let d=jQuery("#ponchoTable").DataTable({initComplete:(e,t)=>{m&&_hideTable()},lengthChange:!1,autoWidth:!1,pageLength:h.cantidadItems,columnDefs:[{type:"html-num",targets:h.tipoNumero},{targets:h.ocultarColumnas,visible:!1}],ordering:h.orden,order:[[h.ordenColumna-1,h.ordenTipo]],dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'i>><'row'<'col-sm-12'tr>><'row'<'col-md-offset-3 col-md-6 col-sm-offset-2 col-sm-8'p>>",language:{sProcessing:"Procesando...",sLengthMenu:"Mostrar _MENU_ registros",sZeroRecords:"No se encontraron resultados",sEmptyTable:"Ningún dato disponible en esta tabla",sInfo:"_TOTAL_ resultados",sInfoEmpty:"No hay resultados",sInfoFiltered:"",sInfoPostFix:"",sSearch:"Buscar:",sUrl:"",sInfoThousands:".",sLoadingRecords:"Cargando...",oPaginate:{sFirst:"<<",sLast:">>",sNext:">",sPrevious:"<"},oAria:{sSortAscending:": Activar para ordenar la columna de manera ascendente",sSortDescending:": Activar para ordenar la columna de manera descendente",paginate:{first:"Ir a la primera página",previous:"Ir a la página anterior",next:"Ir a la página siguiente",last:"Ir a la última página"}}}});jQuery("#ponchoTableSearch").keyup(function(){d.search(jQuery.fn.DataTable.ext.type.search.string(this.value)).draw()}),jQuery("#ponchoTable_filter").parent().parent().remove(),1<document.querySelectorAll("#ponchoTableFiltro option").length&&(document.querySelector("#ponchoTableFiltroCont").style.display="block");const p=e=>{e=document.querySelectorAll(e+" option");return Object.values(e).map(e=>e.value).some(e=>e)};if(jQuery("select[data-filter]").change(function(){var e=jQuery(this).find("option:selected").data("column"),t=jQuery(this).find("option:selected").val();a(e,t),d.columns().search("").columns().search("").draw();const i=Object.keys(f),o=E();if(o.forEach((e,t)=>{s=i[t];var s=Object.keys(u.headers).indexOf("filtro-"+s),a=C(o[t]),r=C(replaceSpecialChars(o[t]));L(t,f)?d.columns(s).search(T(o[t])):d.columns(s).search(o[t]?`^(${a}|${r})$`:"",!0,!1,!0)}),d.draw(),m){var[n,l=0,c=""]=[i,e,t];let r=!1;n.forEach((e,t)=>{var s=p("#"+e);let a="none";s&&c&&t<=l+1?a="block":s&&!c&&t<=l+1&&(document.querySelectorAll("#"+n[l+1]).forEach(e=>e.innerHTML=""),a="block",r=!1),document.querySelectorAll(`[data-filter-name="${e}"]`).forEach(e=>e.style.display=a)}),(r=p("#"+n[l])&&c&&!p("#"+n[l+1])?!0:r)?_hideTable(!1):_hideTable()}}),h.hasOwnProperty("hash")&&h.hash){e=i();const t=e?decodeURIComponent(e):"";document.querySelectorAll("#ponchoTableSearch").forEach(e=>{e.value=t,d.search(jQuery.fn.DataTable.ext.type.search.string(t)).draw()})}}),l=e=>{(u=e).entries="function"==typeof h.refactorEntries&&null!==h.refactorEntries?h.refactorEntries(u.entries):u.entries,u.headers=(h.hasOwnProperty("headers")&&h.headers?h:u).headers,p=Object.keys(u.headers).filter(e=>e.startsWith("filtro-")),_=h.asFilter?h.asFilter(u.entries):{},f=((r,i)=>{let o={};return i.forEach((t,s)=>{let e=[];e=_.hasOwnProperty(i[s])?_[i[s]]:r.entries.map(e=>e[t]);var a=b(e);a.sort(g),t=t.replace("filtro-",""),o[t]=[],a.forEach(e=>{o[t].push({columna:s,value:e})})}),o})(u,p),h.hasOwnProperty("filterContClassList")&&h.filterContClassList&&((e=document.getElementById("ponchoTableFiltroCont")).removeAttribute("class"),e.classList.add(...h.filterContClassList)),h.hasOwnProperty("searchContClassList")&&h.searchContClassList&&((e=document.getElementById("ponchoTableSearchCont")).removeAttribute("class"),e.classList.add(...h.searchContClassList));{var l=u;(e=document.querySelector("#ponchoTable thead")).innerHTML="";const a=document.createElement("tr"),t=(Object.keys(l.headers).forEach((e,t)=>{var s=document.createElement("th");s.textContent=l.headers[e],s.setAttribute("scope","col"),a.appendChild(s)}),e.appendChild(a),(e=document.querySelector("#ponchoTable caption")).innerHTML="",e.textContent=h.tituloTabla,document.querySelector("#ponchoTable tbody"));t.innerHTML="",l.entries.forEach((o,e)=>{if(Object.values(o).some(e=>String(e).trim())){o="function"==typeof h.customEntry&&null!==h.customEntry?h.customEntry(o):o;const n=t.insertRow();n.id="id_"+e;let i;k()&&(e=h.hasOwnProperty("markdownOptions")?h.markdownOptions:r,i=S(e.extensions)?e:{}),Object.keys(l.headers).forEach(e=>{let t=o[e];e.startsWith("btn-")&&""!=t?(s=e.replace("btn-","").replace("-"," "),t=w(s,t)):e.startsWith("fecha-")&&""!=t&&(t=j(t));var s=n.insertCell();s.dataset.title=l.headers[e],""==t&&(s.className="hidden-xs");let a=h.hasOwnProperty("allowedTags")?h.allowedTags:y;e.startsWith("btn-")&&""!=t?a=[...a,"a"]:e.startsWith("fecha-")&&""!=t&&(a=[...a,"span","time"]);var r,e=secureHTML(t,a);k()?(r=new showdown.Converter(i),s.innerHTML=r.makeHtml(e)):s.innerHTML=e})}})}{var n=u;const c=document.querySelector("#ponchoTableFiltro");c.innerHTML="",Object.keys(f).forEach((e,t)=>{const s=f[e][0].columna||0;var a=f[e].map(e=>e.value).sort(g),r=document.createElement("div"),i=(h.hasOwnProperty("filterClassList")?(i="string"==typeof h.filterClassList?h.filterClassList.split(" "):h.filterClassList,r.classList.add(...i)):(i=Math.floor(12/Object.keys(f).length),r.classList.add("col-sm-12","col-md-"+i)),r.dataset.index=t,r.dataset.filterName=e,m&&0<t&&(r.style.display="none"),document.createElement("div")),t=(i.className="form-group",document.createElement("label"));t.setAttribute("for",e),t.textContent=n.headers["filtro-"+e];const o=document.createElement("select");o.classList.add("form-control"),o.dataset.filter=1,o.name=e,o.id=e,o.appendChild(v(s,d,"",!0)),a.forEach(e=>{e&&o.appendChild(v(s,e,e,!1))}),i.appendChild(t),i.appendChild(o),r.appendChild(i),c.appendChild(r)})}document.querySelector("#ponchoTableSearchCont").style.display="block",document.querySelector("#ponchoTable").classList.remove("state-loading"),o()},t=e=>{jQuery.getJSON(e,function(e){var t=new GapiSheetData;u=t.json_data(e),l(u)})};if(h.jsonData){var e=Object.fromEntries(Object.keys(h.jsonData[0]).map(e=>[e,e])),e={entries:h.jsonData,headers:e};l(e)}else if(h.jsonUrl)t(h.jsonUrl);else if(h.hojaNombre&&h.idSpread){e=(new GapiSheetData).url(h.hojaNombre,h.idSpread);t(e)}else{if(!h.hojaNumero||!h.idSpread)throw"¡Error! No hay datos suficientes para crear la tabla.";{var c=h.hojaNumero;const O=new GapiSheetData;e=["https://sheets.googleapis.com/v4/spreadsheets/",h.idSpread,"/?alt=json&key=",O.gapi_key].join("");jQuery.getJSON(e,function(e){e=e.sheets[c-1].properties.title,e=O.url(e,h.idSpread);t(e)})}}};var content_popover=document.getElementById("content-popover");function popshow(){content_popover.classList.toggle("hidden")}function pophidde(){content_popover.classList.add("hidden")}var ponchoUbicacion=function(e){var s,a,r,i,t="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geoprovincias.json",o="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geolocalidades.json",n=jQuery('input[name="submitted['+e.provincia+']"]'),l=jQuery('input[name="submitted['+e.localidad+']"]');function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e,t,s,a=!1,r=!1,i=!1){var o=jQuery("<select></select>").attr("id",t).attr("name",e).addClass("form-control form-select").prop("required",a);return r&&o.append("<option value=''>Seleccione una opción</option>"),jQuery.each(s,function(e,t){let s="";i==t.nombre&&(s='selected="selected"'),o.append("<option value='"+t.id+"' "+s+">"+t.nombre+"</option>")}),o}function p(e,t){var s=l.prop("required");return n.val()?d("sLocalidades","sLocalidades",e.filter(function(e){return String(e.provincia.id)==String(t)}).map(function(e){return e.departamento.nombre&&(e.nombre=c(e.departamento.nombre.toLowerCase())+" - "+c(e.nombre.toLowerCase())),e}).sort(function(e,t){e=e.nombre.toUpperCase(),t=t.nombre.toUpperCase();return e.localeCompare(t)}),s,emptyOption=!!l.val(),l.val()):d("sLocalidades","sLocalidades",[],s,!0,!1)}t=e.urlProvincias||t,o=e.urlLocalidades||o,jQuery.getJSON(t,function(e){var t;s=[],e.results.forEach(function(e,t){s.push(e)}),e=[],e=(t=s).sort(function(e,t){e=e.nombre.toUpperCase(),t=t.nombre.toUpperCase();return e.localeCompare(t)}),t=n.prop("required"),(r=d("sProvincias","sProvincias",e,t,!0,n.val())).on("change",function(e){var t;n.val(""),l.val(""),i.children("option:not(:first)").remove(),""!=r.val()&&(n.val(r.find(":selected").text()),t=p(a,r.val()).find("option"),i.append(t),i.val(""))}),n.after(r),jQuery(r).select2()}),jQuery.getJSON(o,function(e){a=[],e.results.forEach(function(e,t){a.push(e)}),(i=p(a,r.val())).on("change",function(e){l.val(""),""!=i.val()&&l.val(i.find(":selected").text())}),l.after(i),jQuery(i).select2()}),n.hide(),l.hide()};function ponchoChart(t){"use strict";var e;function _e(e){var t={Line:"line",Bar:"bar",Pie:"pie",Area:"line","Horizontal Bar":"horizontalBar","Stacked Bar":"bar",Mixed:"mixed",HeatMap:"heatmap",default:""};return t[e]||t.default}function ye(e){var e=e.toString().replace(".",","),t=e.split(","),s=new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(t[0]);return e=1<t.length?s.concat(",",t[1].substr(0,2)):s}function s(e,a){var F,t,s,H,r,i,B,D,z,o,n,N,G,l,c,R,U,$,d,p,Q,h,V,u,J,m,f=[],_=[],y=[],Z=[],g=[],b=[],v=[],C=[],x=0,E="",W=[],k=0,S=[],Y=[],X=0,w=a.posicionLeyendas||"top",j="",j=void 0===a.mostrarLeyendas||a.mostrarLeyendas,T="",T=void 0===a.mostrarTotalStacked||a.mostrarTotalStacked,L=_e(a.tipoGrafico),A=e.values;if(jQuery.each(Object.keys(A[0]),function(e,t){var s;"eje-y"==A[0][e].substr(0,5)?(s=(s=A[0][e].split("-"))[0]+s[1],_.push(s),y.push(e)):"nombre-corto"==A[0][e]&&"heatmap"==L&&(X=e)}),jQuery.each(A,function(r,e){var a;0==r&&jQuery.each(y,function(e,t){var s=A[r][y[e]].split("-"),a=s[0]+s[1];v[a]=[],Z.push(s[2]),"mixed"==L&&(3<s.length&&("barra"==s[3]||"linea"==s[3])?W.push(s[3]):(0==e&&W.push("barra"),1==e&&W.push("linea")))}),1==r&&jQuery.each(y,function(e,t){"pie"==L||"heatmap"==L?f.push(A[r][y[e]]):(b.push(A[r][y[e]]),x+=1)}),1<r&&(a=!1,jQuery.each(y,function(e,t){var s=A[0][y[e]].split("-"),s=s[0]+s[1];"pie"==L?v[s].push(A[r][y[e]]):"heatmap"==L?(0==a&&(b.push(A[r][0]),a=!0,x+=1),e!=X&&v[s].push(A[r][y[e]]),e+2==X&&(void 0===A[r][e+2]?Y.push("*"):Y.push(A[r][e+2]))):(0==a&&(f.push(A[r][0]),a=!0),v[s].push(A[r][y[e]]))}))}),"pie"==L?(F=[],jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&F.push(v[e])}),C=F):1==x&&jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(C=v[e])}),"mixed"==L&&0<(t=a.porcentajesMixed||"").length&&(S=t.split(",")),E=1==a.porcentajes?"line"==L&&1<x?{enabled:!0,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s+"%"}},mode:"index",intersect:!1}:"pie"==L?{enabled:!0,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+s+"%"}}}:"Stacked Bar"==a.tipoGrafico?1==T?{enabled:!0,mode:"index",callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s+"%"},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s+"%"}}}:"line"==L&&1<x?{enabled:!0,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s}},mode:"index",intersect:!1}:"pie"==L?{enabled:!0,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+s}}}:"Stacked Bar"==a.tipoGrafico&&1<x?1==T?{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)}}}:{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var s=ye(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+s}}},"pie"==L&&(Z.forEach(function(e,t,s){g.push(ponchoColor(e))}),t=f,T=C,z=L,o=g,s=a.idComponenteGrafico,N=w,G=E,n=j,s=document.getElementById(s),new Chart(s,{type:z,data:{labels:t,datasets:[{data:T,borderColor:o,backgroundColor:o,borderWidth:2}]},options:{legend:{display:n,position:N},responsive:!0,tooltips:G}})),1==x&&(s=ponchoColor(Z[0]),"Line"==a.tipoGrafico&&(z=f,T=C,o=L,n=s,N=b[0],G=a.ejeYenCero,l=a.idComponenteGrafico,c=w,R=E,U=j,l=document.getElementById(l),new Chart(l,{type:o,data:{labels:z,datasets:[{data:T,borderColor:n,backgroundColor:n,borderWidth:2,lineTension:0,fill:!1,label:N}]},options:{legend:{display:U,position:c},tooltips:R,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:G}}]}}})),"bar"!=L&&"Area"!=a.tipoGrafico||(l=f,T=C,U=L,c=s,R=b[0],H=a.ejeYenCero,r=a.idComponenteGrafico,i=w,B=E,D=j,r=document.getElementById(r),new Chart(r,{type:U,data:{labels:l,datasets:[{data:T,borderColor:c,backgroundColor:c,borderWidth:2,lineTension:0,label:R}]},options:{legend:{display:D,position:i},tooltips:B,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:H}}]}}})),"horizontalBar"==L)&&(r=f,T=C,D=L,i=s,B=b[0],H=a.ejeYenCero,O=a.idComponenteGrafico,re=w,ie=E,ee=j,O=document.getElementById(O),new Chart(O,{type:D,data:{labels:r,datasets:[{data:T,borderColor:i,backgroundColor:i,borderWidth:2,lineTension:0,label:B}]},options:{legend:{display:ee,position:re},tooltips:ie,responsive:!0,scales:{xAxes:[{ticks:{beginAtZero:H}}]}}})),1<x)if("heatmap"==L)if(void 0!==a.heatMapColors&&""!=a.heatMapColors&&void 0!==a.heatMapColorsRange&&""!=a.heatMapColorsRange){for(var K=[],O="labelFila",T="labelColumna",ee="labelValor",te=(void 0!==a.datosTooltip&&0<a.datosTooltip.length&&(void 0!==a.datosTooltip[0]&&void 0!==a.datosTooltip[0].labelFila&&(O=a.datosTooltip[0].labelFila),void 0!==a.datosTooltip[1]&&void 0!==a.datosTooltip[1].labelColumna&&(T=a.datosTooltip[1].labelColumna),void 0!==a.datosTooltip[2])&&void 0!==a.datosTooltip[2].labelValor&&(ee=a.datosTooltip[2].labelValor),jQuery.each(Object.keys(_),function(e,t){e=_[e];v.hasOwnProperty(e)&&(C=v[e],K.push(C))}),[]),P=0;P<b.length;P++){for(var e=[],se=0;se<f.length;se++){C={x:f[se],y:parseInt(K[se][P])};e.push(C)}te.push({name:("*"!=Y[P]?Y:b)[P],data:e})}for(var ae=[],P=0;P<a.heatMapColorsRange.length-1;P++){e={from:a.heatMapColorsRange[P],to:a.heatMapColorsRange[P+1],color:ponchoColor(a.heatMapColors[P])};ae.push(e)}var re="",re=void 0===a.mostrarEjeY||a.mostrarEjeY,ie=te,oe=a.idComponenteGrafico,ne=b,le=ae,ce=O,de=T,pe=ee,T=a.tituloGrafico,I=re,he=w,ue=j,oe=document.getElementById(oe),me=(new ApexCharts(oe,{series:ie,chart:{height:650,type:"heatmap"},dataLabels:{enabled:!1},title:{text:T},tooltip:{custom:function({series:e,seriesIndex:t,dataPointIndex:s,w:a}){e=ye(e[t][s]);return'<div class="arrow_box"><span>'+ce+": "+ne[t]+"<br>"+de+": "+a.globals.labels[s]+"<br>"+pe+": "+e+"</span></div>"}},plotOptions:{heatmap:{shadeIntensity:.5,radius:0,useFillColorAsStroke:!1,colorScale:{ranges:le}}},yaxis:{show:I},legend:{show:ue,position:he},responsive:[{breakpoint:1e3,options:{yaxis:{show:!1},legend:{show:ue,position:"top"}}}]}).render(),document.getElementsByClassName("apexcharts-toolbar"));for(let e=0;e<me.length;e++)me[e].style.display="none"}else void 0!==a.heatMapColors&&a.heatMapColors,void 0!==a.heatMapColorsRange&&a.heatMapColorsRange;else{var M=[],q=0,fe=(Z.forEach(function(e,t,s){g.push(ponchoColor(e))}),0);jQuery.each(Object.keys(_),function(e,t){var s,e=_[e];v.hasOwnProperty(e)&&(C=v[e],"Line"==a.tipoGrafico?s={label:b[q],data:C,borderColor:g[q],fill:!1,borderWidth:2,lineTension:0,backgroundColor:g[q]}:"Bar"==a.tipoGrafico||"Area"==a.tipoGrafico||"Horizontal Bar"==a.tipoGrafico||"Stacked Bar"==a.tipoGrafico?s={label:b[q],data:C,borderColor:g[q],backgroundColor:g[q],borderWidth:2,lineTension:0}:"Mixed"==a.tipoGrafico&&("barra"==(e=W[fe])?s={label:b[q],data:C,backgroundColor:g[q],yAxisID:"left-y-axis",type:"bar"}:"linea"==e&&(s={label:b[q],data:C,borderColor:g[q],backgroundColor:g[q],type:"line",yAxisID:"right-y-axis",fill:!1})),M.push(s),q+=1,fe+=1)}),"mixed"==L&&(2==S.length?k=2:1==S.length?"eje-y1"==S[0]?k=0:"eje-y2"==S[0]&&(k=1):k=3),"Stacked Bar"==a.tipoGrafico?(oe=f,T=L,le=M,I=a.idComponenteGrafico,he=a.ejeYenCero,ue=w,S=E,J=j,I=document.getElementById(I),new Chart(I,{type:T,data:{labels:oe,datasets:le},options:{legend:{display:J,position:ue,labels:{textAlign:"center"}},tooltips:S,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:he},stacked:!0}],xAxes:[{stacked:!0}]}}})):"Mixed"==a.tipoGrafico?(T=f,J="bar",S=M,d=a.idComponenteGrafico,p=a.ejeYenCero,Q=w,h=k,k=b[0],V=b[1],u=j,d=document.getElementById(d),new Chart(d,{type:J,data:{labels:T,datasets:S},options:{legend:{display:u,position:Q,labels:{textAlign:"center"}},tooltips:{enabled:!0,mode:"single",callbacks:{label:function(e,t){var s="",a=((2==h||e.datasetIndex==h)&&(s="%"),ye(e.yLabel));return t.datasets[e.datasetIndex].label+": "+a+" "+s}}},responsive:!0,scales:{yAxes:[{id:"left-y-axis",type:"linear",position:"left",ticks:{beginAtZero:p,callback:function(e){return e+(1!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:V,fontColor:"black"}},{id:"right-y-axis",type:"linear",position:"right",ticks:{beginAtZero:p,callback:function(e){return e+(0!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:k,fontColor:"black"}}]}}})):"Horizontal Bar"==a.tipoGrafico?(d=f,T=L,S=M,u=a.idComponenteGrafico,Q=a.ejeYenCero,V=w,p=E,k=j,u=document.getElementById(u),new Chart(u,{type:T,data:{labels:d,datasets:S},options:{legend:{display:k,position:V,labels:{textAlign:"center"}},tooltips:p,responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{ticks:{beginAtZero:Q}}]}}})):(T=f,S=L,k=M,m=a.idComponenteGrafico,$=a.ejeYenCero,w=w,E=E,j=j,m=document.getElementById(m),new Chart(m,{type:S,data:{labels:T,datasets:k},options:{legend:{display:j,position:w,labels:{textAlign:"center"}},tooltips:E,responsive:!0,maintainAspectRatio:!0,scales:{yAxes:[{ticks:{beginAtZero:$}}]}}}))}""!=a.tituloGrafico&&void 0!==a.tituloGrafico&&(m=a.idTagTituloGrafico,S=a.tituloGrafico,document.getElementById(m))&&(document.getElementById(m).innerHTML=S)}!function(e){var t=!1;(e.idSpread&&e.hojaNombre||e.jsonUrl||e.jsonInput)&&void 0!==e.tipoGrafico&&""!=e.tipoGrafico&&void 0!==e.idComponenteGrafico&&""!=e.idComponenteGrafico&&""!=_e(e.tipoGrafico)&&(t=!0);return t}(t)?(void 0!==t.idSpread&&t.idSpread,void 0!==t.hojaNombre&&t.hojaNombre,void 0!==t.tipoGrafico&&t.tipoGrafico,void 0!==t.idComponenteGrafico&&t.idComponenteGrafico,_e(t.tipoGrafico)):t.jsonInput?s(jQuery.parseJSON(t.jsonInput),t):(e=t.jsonUrl||"https://sheets.googleapis.com/v4/spreadsheets/"+t.idSpread+"/values/"+t.hojaNombre+"?alt=json&key=AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",jQuery.getJSON(e,function(e){s(e,t)}))}const gapi_legacy=e=>{const i=e.values[0],o=/ |\/|_/gi;let n=[];return e.values.forEach((e,t)=>{if(0<t){var s={};for(const r in i){var a=e.hasOwnProperty(r)?e[r].trim():"";s["gsx$"+i[r].toLowerCase().replace(o,"")]={$t:a}}n.push(s)}}),{feed:{entry:n}}};class PonchoMap{constructor(e,t){var s={error_reporting:!0,no_info:!1,title:!1,id:"id",id_mixing:[],template:!1,template_structure:{container_classlist:["info-container"],definition_classlist:[],definition_list_classlist:["definition-list"],definition_list_tag:"dl",definition_tag:"dd",term_classlist:["h6","m-b-0"],term_tag:"dt",title_classlist:["h4","pm-color-primary","m-t-0"]},fit_bounds_onevent:!0,allowed_tags:[],template_innerhtml:!1,template_markdown:!1,theme_ui:!1,theme_map:!1,theme_tool:!0,map_opacity:1,map_background:"#DDD",theme:"default",default_themes:[["default","Original"],["contrast","Alto contraste"],["dark","Oscuro"],["grayscale","Gris"],["relax","Relax"]],markdown_options:{extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"],simpleLineBreaks:!0,tables:!0},render_slider:!0,scope:"",slider:!1,scroll:!1,hash:!1,headers:{},header_icons:[],content_selector:!1,map_selector:"map",anchor_delay:0,slider_selector:".slider",map_view:[-40.44,-63.59],map_anchor_zoom:16,map_zoom:4,min_zoom:2,map_init_options:{},reset_zoom:!0,latitud:"latitud",longitud:"longitud",marker:"azul",tooltip:!1,tooltip_options:{permanent:!1,className:"leaflet-tooltip-own",direction:"auto",offset:[13,-18],sticky:!1,opacity:1},marker_cluster_options:{spiderfyOnMaxZoom:!0,showCoverageOnHover:!1,zoomToBoundsOnClick:!0,maxClusterRadius:30,spiderfyDistanceMultiplier:.5,spiderLegPolylineOptions:{weight:1,color:"#666666",opacity:.5,"fill-opacity":.5}},accesible_menu_extras:[{text:"Ayudá a mejorar el mapa",anchor:"https://www.argentina.gob.ar/sugerencias"}]},a=Object.assign({},s,t);this.error_reporting=a.error_reporting,this.scope=a.scope,this.render_slider=a.render_slider,this.template=a.template,this.template_structure={...s.template_structure,...t.template_structure},this.template_innerhtml=a.template_innerhtml,this.template_markdown=a.template_markdown,this.markdown_options=a.markdown_options,this.allowed_tags=a.allowed_tags,this.map_selector=a.map_selector,this.headers=this.setHeaders(a.headers),this.header_icons=a.header_icons,this.hash=a.hash,this.scroll=a.scroll,this.fit_bounds_onevent=a.fit_bounds_onevent,this.map_view=a.map_view,this.map_init_options=a.map_init_options,this.anchor_delay=a.anchor_delay,this.map_zoom=a.map_zoom,this.min_zoom=a.min_zoom,this.map_anchor_zoom=a.map_anchor_zoom,this.tooltip_options=a.tooltip_options,this.tooltip=a.tooltip,this.marker_cluster_options=a.marker_cluster_options,this.marker_color=a.marker,this.id=a.id,this.id_mixing=a.id_mixing,this.title=a.title,this.map_background=a.map_background,this.theme=a.theme,this.theme_tool=a.theme_tool,this.default_themes=a.default_themes,this.temes_not_visibles=[["transparent","Transparent"]],this.theme_ui=a.theme_ui,this.theme_map=a.theme_map,this.map_opacity=a.map_opacity,this.latitude=a.latitud,this.longitude=a.longitud,this.slider=a.slider,this.no_info=a.no_info,this.reset_zoom=a.reset_zoom,this.slider_selector=this._selectorName(a.slider_selector),this.selected_marker,this.scope_selector=`[data-scope="${this.scope}"]`,this.scope_sufix="--"+this.scope,this.content_selector=a.content_selector||".js-content"+this.scope_sufix,this.content_outside=this.content_selector!==".js-content"+this.scope_sufix,this.data=this.formatInput(e),this.geometryTypes=["Point","LineString","Polygon","MultiPoint","MultiLineString"],this.featureStyle={stroke:"dodgerblue","stroke-opacity":1,"stroke-width":2,"fill-opacity":.5},this.accesible_menu_search=[],this.accesible_menu_filter=[],this.accesible_menu_extras=a.accesible_menu_extras,this.geojson,this.map=new L.map(this.map_selector,{renderer:L.svg(),...this.map_init_options}).setView(this.map_view,this.map_zoom),this.titleLayer=new L.tileLayer("https://mapa-ign.argentina.gob.ar/osm/{z}/{x}/{-y}.png",{attribution:'Contribuidores: <a href="https://www.ign.gob.ar/AreaServicios/Argenmap/Introduccion" target="_blank">Instituto Geográfico Nacional</a>, <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'}),this.markers=new L.markerClusterGroup(this.marker_cluster_options),this.ponchoLoaderTimeout}mapOpacity=(e=!1)=>{const t=e||this.map_opacity;document.querySelectorAll(this.scope_selector+" .leaflet-pane .leaflet-tile-pane").forEach(e=>e.style.opacity=t)};mapBackgroundColor=(e=!1)=>{const t=e||this.map_background;document.querySelectorAll(this.scope_selector+" .leaflet-container").forEach(e=>e.style.backgroundColor=t)};_menuTheme=()=>{if(this.theme_tool){document.querySelectorAll("#themes-tool"+this.scope_sufix).forEach(e=>e.remove());const r=document.createElement("ul");r.classList.add("pm-list-unstyled","pm-list","pm-tools","js-themes-tool"+this.scope_sufix);var e=document.createElement("li"),t=(e.setAttribute("tabindex","-1"),e.dataset.toggle="true",document.createElement("i")),s=(t.setAttribute("aria-hidden","true"),t.classList.add("pmi","pmi-adjust"),document.createElement("button"));s.title="Cambiar tema",s.tabIndex="0",s.classList.add("pm-btn","pm-btn-rounded-circle"),s.appendChild(t),s.setAttribute("role","button"),s.setAttribute("aria-label","Abre el panel de temas");const i=document.createElement("ul");i.classList.add("pm-container","pm-list","pm-list-unstyled","pm-p-1","pm-caret","pm-caret-b","pm-toggle");var t=document.createElement("button"),a=(t.textContent="Restablecer",t.classList.add("pm-item-link","js-reset-theme"),document.createElement("li"));a.classList.add("pm-item-separator"),a.appendChild(t),i.appendChild(a),this.default_themes.map(e=>e[0]).forEach((e,t)=>{var s=document.createElement("button"),e=(s.dataset.theme=e,s.textContent=this.default_themes[t][1],s.classList.add("js-set-theme","pm-item-link"),document.createElement("li"));e.appendChild(s),i.appendChild(e)}),e.appendChild(s),e.appendChild(i),r.appendChild(e),document.querySelectorAll(this.scope_selector).forEach(e=>e.appendChild(r)),document.querySelectorAll(".js-reset-theme").forEach(e=>e.addEventListener("click",()=>{localStorage.removeItem("mapTheme"),this._removeThemes(),this._setThemes()})),document.querySelectorAll(".js-set-theme").forEach(t=>t.addEventListener("click",()=>{var e=t.dataset.theme;this.useTheme(e),localStorage.setItem("mapTheme",e)}))}};_setThemeStyles=(t=!1,e=["ui","map"])=>e.map(e=>!!["ui","map"].includes(e)&&e+"-"+t);_removeThemes=(s=["ui","map"])=>{document.querySelectorAll(this.scope_selector).forEach(t=>{[...this.default_themes,...this.temes_not_visibles].map(e=>e[0]).forEach(e=>{t.classList.remove(...this._setThemeStyles(e,s))})})};_setTheme=(t,s)=>{var e=document.querySelectorAll(this.scope_selector);this._removeThemes(s),e.forEach(e=>{e.classList.add(...this._setThemeStyles(t,s))})};useTheme=(e=!1)=>{e=e||this.theme;this._setTheme(e,["ui","map"])};useMapTheme=e=>this._setTheme(e,["map"]);useUiTheme=e=>this._setTheme(e,["ui"]);_setThemes=()=>{localStorage.hasOwnProperty("mapTheme")?this._setTheme(localStorage.getItem("mapTheme"),["ui","map"]):this.theme_ui||this.theme_map?(this.theme_ui&&this._setTheme(this.theme_ui,["ui"]),this.theme_map&&this._setTheme(this.theme_map,["map"])):this.useTheme()};isGeoJSON=e=>"FeatureCollection"===e?.type;get entries(){return this.data.features}get geoJSON(){return this.featureCollection(this.entries)}formatInput=e=>{e.length<1&&this.errorMessage("No se puede visualizar el mapa, el documento está vacío","warning");let t;return t=this.isGeoJSON(e)?e:(e=this.features(e),this.featureCollection(e)),this._setIdIfNotExists(t)};errorMessage=(e=!1,t="danger")=>{document.querySelectorAll("#js-error-message"+this.scope_sufix).forEach(e=>e.remove());const s=document.createElement("div");s.id="js-error-message"+this.scope_sufix,s.classList.add("poncho-map--message",t);var a=document.createElement("i"),r=(a.classList.add("icono-arg-mapa-argentina","poncho-map--message__icon"),document.createElement("h2"));r.classList.add("h6","title","pm-visually-hidden"),r.textContent="¡Se produjo un error!",s.appendChild(a),s.appendChild(r);throw[["En estos momentos tenemos inconvenientes para mostrar el mapa.","text-center"],["<em>Disculpe las molestias</em>","text-center","p"]].forEach(e=>{var t=document.createElement(void 0!==(t=e[2])||t?t:"p");void 0===e[1]&&!e[1]||(t.className=e[1]),t.innerHTML=e[0],s.appendChild(t)}),this.error_reporting&&((a=document.querySelector(this.scope_selector+".poncho-map")).parentNode.insertBefore(s,a),"danger"==t)&&document.getElementById(this.map_selector).remove(),e};feature=e=>{var t=e[this.latitude],s=e[this.longitude];return[t,s].forEach(e=>{isNaN(Number(e))&&this.errorMessage("El archivo contiene errores en la definición de latitud y longitud.\n "+e)}),delete e[this.latitude],delete e[this.longitude],{type:"Feature",properties:e,geometry:{type:"Point",coordinates:[s,t]}}};featureCollection=e=>({type:"FeatureCollection",features:e});features=e=>e.map(this.feature);_setIdIfNotExists=e=>{var t;return e.features.filter((e,t)=>0===t).every(e=>e.properties.hasOwnProperty("id"))||(t=e.features.map((t,e)=>{var s;return 0<this.id_mixing.length?(s=this.id_mixing.map(e=>t.properties[e]?slugify(t.properties[e]):slugify(e)),t.properties.id=s.join("-")):(s=e+1,e=this.title&&t.properties[this.title]?slugify(t.properties[this.title]):"",t.properties.id=s+"-"+e),t}),e.features=t),e};addHash=e=>{if(!this.hash||this.no_info)return null;window.location.hash="#"+e};entry=t=>this.entries.find(e=>!(!e?.properties||e.properties[this.id]!==t||"n"===e.properties?.["pm-interactive"]));searchEntries=(t,e)=>{return e=void 0===e?this.geoJSON:e,t?e.filter(e=>{if(this.searchEntry(t,e.properties))return e}):e};searchEntry=(e,t)=>{for(const r of[...new Set([this.title,...this.search_fields])].filter(e=>e))if(t.hasOwnProperty(r)){var s=replaceSpecialChars(e).toUpperCase(),a=replaceSpecialChars(t[r]).toString().toUpperCase();try{if(a.includes(s))return t}catch(e){}}return null};_selectorName=e=>e.replace(/^(\.|\#)/,"");scrollCenter=()=>{var e=document.getElementById(this.map_selector),t=e.getBoundingClientRect(),e=(e.offsetLeft+e.offsetWidth)/2,t=t.top+window.scrollY;window.scrollTo({top:t,left:e,behavior:"smooth"})};_clearContent=()=>document.querySelector(".js-content"+this.scope_sufix).innerHTML="";toggleSlider=()=>{this.no_info||(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.toggle(this.slider_selector+"--in")}),document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.style.display=this.isSliderOpen()?"block":"none"}))};_focusOnFeature=t=>{this.map.eachLayer(e=>{e?.options?.id==t&&(e?._path?e._path.focus():e?._icon&&e._icon.focus())})};_clickToggleSlider=()=>document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>e.addEventListener("click",()=>{this._clearContent(),this.toggleSlider(),this._focusOnFeature(e.dataset.entryId)}));isSliderOpen=()=>{let t=[];return document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.contains(this.slider_selector+"--in")&&t.push(!0)}),t.some(e=>e)};setContent=t=>{if(!this.no_info){this._focusOnSlider(),this.isSliderOpen()||this.toggleSlider();const s="function"==typeof this.template?this.template(this,t):this.defaultTemplate(this,t);document.querySelectorAll(this.content_selector).forEach(e=>{e.innerHTML=s}),document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>{e.dataset.entryId=t[this.id]})}};_focusOnSlider=()=>{var e;this.no_info||(this.isSliderOpen()?document.querySelector(".js-close-slider"+this.scope_sufix).focus():(e=document.querySelector(".js-slider"+this.scope_sufix))&&e.addEventListener("animationend",()=>{document.querySelector(".js-close-slider"+this.scope_sufix).focus()}))};setHeaders=e=>{var t;return[this.template_structure,this.template_structure.mixing].every(e=>e)?(t=this.template_structure.mixing.reduce((e,t)=>{if([t.key].every(e=>e))return{...e,[t.key]:t.header||""}},{}),{...e,...t}):e};header=e=>this.headers.hasOwnProperty(e)?this.headers[e]:e;_renderSlider=()=>{var e,t,s,a;!this.render_slider||this.content_outside||this.no_info||(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>e.remove()),(e=document.createElement("button")).classList.add("btn","btn-xs","btn-secondary","btn-close","js-close-slider"+this.scope_sufix),e.title="Cerrar panel",e.setAttribute("role","button"),e.setAttribute("aria-label","Cerrar panel de información"),e.innerHTML='<span class="pm-visually-hidden">Cerrar</span>✕',(t=document.createElement("a")).setAttribute("tabindex",0),t.id="js-anchor-slider"+this.scope_sufix,(s=document.createElement("div")).classList.add("content-container"),(a=document.createElement("div")).classList.add("content","js-content"+this.scope_sufix),a.tabIndex=0,s.appendChild(a),(a=document.createElement("div")).style.display="none",a.setAttribute("role","region"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-label","Panel de información"),a.classList.add("pm-container","slider","js-slider"+this.scope_sufix),a.id="slider"+this.scope_sufix,a.appendChild(e),a.appendChild(t),a.appendChild(s),document.querySelector(this.scope_selector+".poncho-map").appendChild(a))};_removeTooltips=()=>{let t=this;this.map.eachLayer(function(e){"tooltipPane"===e.options.pane&&e.removeFrom(t.map)})};_showSlider=e=>{this._removeTooltips(),e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):this.fit_bounds_onevent&&this.map.fitBounds(e.getBounds().pad(.005)),e.fireEvent("click")};_showPopup=e=>{e.hasOwnProperty("_latlng")?this.markers.zoomToShowLayer(e,()=>{e.openPopup()}):(this.map.fitBounds(e.getBounds().pad(.005)),e.openPopup())};removeHash=()=>history.replaceState(null,null," ");hasHash=()=>{return window.location.hash.replace("#","")||!1};gotoHashedEntry=()=>{var e=this.hasHash();e&&this.gotoEntry(e)};gotoEntry=t=>{const s=this.entry(t),a=(e,t,s)=>{e.options.hasOwnProperty("id")&&e.options.id==t&&(this._setSelectedMarker(t,e),this.hash&&this.addHash(t),this.slider?this._showSlider(e,s):this._showPopup(e))};this.markers.eachLayer(e=>a(e,t,s)),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&a(e,t,s)})};_setClickeable=s=>{s.on("keypress click",t=>{document.querySelectorAll(".marker--active").forEach(e=>e.classList.remove("marker--active")),["_icon","_path"].forEach(e=>{t.sourceTarget.hasOwnProperty(e)&&t.sourceTarget[e].classList.add("marker--active")});var e=this.entries.find(e=>e?.properties&&e.properties[this.id]===s.options.id);this.setContent(e.properties)})};isFeature=e=>!!e.hasOwnProperty("feature");_clickeableFeatures=()=>{this.reset_zoom&&this.map.eachLayer(e=>{this.isFeature(e)&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&"n"!=e?.feature?.properties["pm-interactive"]&&this._setClickeable(e)})};_clickeableMarkers=()=>{this.no_info||this.markers.eachLayer(this._setClickeable)};_urlHash=()=>{const t=e=>{e.on("click",()=>{this.addHash(e.options.id)})};this.markers.eachLayer(t),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&t(e)})};removeListElement=(e,t)=>{t=e.indexOf(t);return-1<t&&e.splice(t,1),e};_templateTitle=e=>{if(!e.hasOwnProperty(this.title))return!1;var t=this.template_structure,s=!!t.hasOwnProperty("title")&&t.title,a=this.title||!1;if(t.hasOwnProperty("title")&&"boolean"==typeof t.title)return!1;if(!s&&!a)return!1;s=s||a;let r;t?.header?((a=document.createElement("div")).innerHTML=this._mdToHtml(t.header(this,e)),this.template_innerhtml&&(a.innerHTML=t.header(this,e)),r=a):((r=document.createElement("h2")).classList.add(...t.title_classlist),r.textContent=e[s]);a=document.createElement("header");return a.className="header",a.appendChild(r),a};_templateList=e=>{var t=this.template_structure,s=Object.keys(e);let a=s;if(t.hasOwnProperty("values")&&0<t?.values?.length)a=t.values;else if(t.hasOwnProperty("exclude")&&0<t.exclude.length)for(const r of t.exclude)a=this.removeListElement(s,r);return a};_mdToHtml=e=>{var t,s;return this.template_markdown&&this._markdownEnable()?(t=new showdown.Converter(this.markdown_options),s=secureHTML(e,this.allowed_tags),t.makeHtml((""+s).trim())):e};_markdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_templateMixing=r=>{if(this.template_structure.hasOwnProperty("mixing")&&0<this.template_structure.mixing.length){var e=this.template_structure.mixing;let a={};return e.forEach(e=>{var{values:e,separator:t=", ",key:s}=e;void 0===s&&this.errorMessage("Mixing requiere un valor en el atributo «key».","warning"),a[s]=e.map(e=>e in r?r[e]:e.toString()).filter(e=>e).join(t)}),Object.assign({},r,a)}return r};_setType=(e,t=!1,s=!1)=>"function"==typeof e?e(this,t,s):e;_lead=e=>{var t,s,a,r;if(this.template_structure.hasOwnProperty("lead"))return this.template_structure.lead.hasOwnProperty("key")||this.errorMessage("Lead requiere un valor en el atributo «key».","warning"),{key:a=!1,css:t="small",style:r=!1}=this.template_structure.lead,(s=document.createElement("p")).textContent=e[a],(a=this._setType(r,e))&&s.setAttribute("style",a),(r=this._setType(t,e))&&s.classList.add(...r.split(" ")),s};_termIcon=(e,t)=>{var s=this.header_icons.find(e=>e.key==t);if(s){var{css:s=!1,style:a=!1,html:r=!1}=s,r=this._setType(r,e,t),a=this._setType(a,e,t),s=this._setType(s,e,t);if(s)return(e=document.createElement("i")).setAttribute("aria-hidden","true"),e.classList.add(...s.split(" ")),a&&e.setAttribute("style",a),e;if(r)return(s=document.createElement("template")).innerHTML=r,s.content}return!1};defaultTemplate=(e,t)=>{t=this._templateMixing(t);var s,a,r=this["template_structure"],i=this._templateList(t),o=this._templateTitle(t),n=document.createElement("article"),l=(n.classList.add(...r.container_classlist),document.createElement(r.definition_list_tag));l.classList.add(...r.definition_list_classlist),l.style.fontSize="1rem";for(const c of i)t.hasOwnProperty(c)&&t[c]&&((s=document.createElement(r.term_tag)).classList.add(...r.term_classlist),(a=this._termIcon(t,c))&&(s.appendChild(a),s.insertAdjacentText("beforeend"," ")),s.insertAdjacentText("beforeend",this.header(c)),(a=document.createElement(r.definition_tag)).classList.add(...r.definition_classlist),a.textContent=t[c],this.template_markdown?a.innerHTML=this._mdToHtml(t[c]):this.template_innerhtml&&(a.innerHTML=secureHTML(t[c],this.allowed_tags)),""!=this.header(c)&&l.appendChild(s),l.appendChild(a));i=this._lead(t);return i&&n.appendChild(i),o&&n.appendChild(o),n.appendChild(l),n.outerHTML};icon=(e="azul")=>new L.icon({iconUrl:"https://www.argentina.gob.ar/sites/default/files/"+`marcador-${e}.svg`,iconSize:[29,40],iconAnchor:[14,40],popupAnchor:[0,-37]});resetView=()=>this.map.setView(this.map_view,this.map_zoom);fitBounds=()=>{try{this.map.fitBounds(this.geojson.getBounds().pad(.005))}catch(e){}};_resetViewButton=()=>{this.reset_zoom&&(document.querySelectorAll(".js-reset-view"+this.scope_sufix).forEach(e=>e.remove()),document.querySelectorAll(this.scope_selector+" .leaflet-control-zoom-in").forEach(e=>{var t=document.createElement("i"),s=(t.classList.add("pmi","pmi-expand"),t.setAttribute("aria-hidden","true"),document.createElement("a"));s.classList.add("js-reset-view"+this.scope_sufix,"leaflet-control-zoom-reset"),s.href="#",s.title="Zoom para ver todo el mapa",s.setAttribute("role","button"),s.setAttribute("aria-label","Zoom para ver todo el mapa"),s.appendChild(t),s.onclick=e=>{e.preventDefault(),this.cleanState(),this.resetView()},e.after(s)}))};marker=e=>{var t;return this.marker_color&&"boolean"!=typeof this.marker_color?"string"==typeof this.marker_color?this.icon(this.marker_color):"string"==typeof this.marker_color(this,e)?(t=this.marker_color(this,e),this.icon(t)):"function"==typeof this.marker_color?this.marker_color(this,e):void 0:null};_clearLayers=()=>{this.markers.clearLayers(),this.map.eachLayer(e=>{this.isFeature(e)&&this.map.removeLayer(e)})};markersMap=e=>{var r=this;this._clearLayers(),this.geojson=new L.geoJson(e,{pointToLayer:function(e,t){var e=e["properties"],s=r.marker(e),a={},s=(a.id=e[r.id],s&&(a.icon=s),r.title&&(a.alt=e[r.title]),new L.marker(t,a));return r.map.options.minZoom=r.min_zoom,r.markers.addLayer(s),r.tooltip&&e[r.title]&&s.bindTooltip(e[r.title],r.tooltip_options),r.no_info||r.slider||(t="function"==typeof r.template?r.template(r,e):r.defaultTemplate(r,e),s.bindPopup(t)),r.markers},onEachFeature:function(e,t){var{properties:s,geometry:a}=e;t.options.id=s[r.id],e.properties.name=s[r.title],r.tooltip&&s[r.title]&&"Point"!=a.type&&"MultiPoint"!=a.type&&t.bindTooltip(s[r.title],r.tooltip_options),r.no_info||r.slider||"Point"==a.type||"MultiPoint"==a.type||(e="function"==typeof r.template?r.template(r,s):r.defaultTemplate(r,s),t.bindPopup(e))},style:function(e){const s=e["properties"];e=(e,t=!1)=>s.hasOwnProperty(e)?s[e]:t||r.featureStyle[e];return{color:e("stroke-color",e("stroke")),strokeOpacity:e("stroke-opacity"),weight:e("stroke-width"),fillColor:e("stroke"),opacity:e("stroke-opacity"),fillOpacity:e("fill-opacity")}}}),this.geojson.addTo(this.map)};_setSelectedMarker=(e,t)=>{e={entry:this.entry(e),marker:t};return this.selected_marker=e};_selectedMarker=()=>{this.map.eachLayer(t=>{this.isFeature(t)&&t.on("click",e=>{this._setSelectedMarker(t.options.id,t)})})};_hiddenSearchInput=()=>{const t=document.createElement("input");t.type="hidden",t.name="js-search-input"+this.scope_sufix,t.setAttribute("disabled","disabled"),t.id="js-search-input"+this.scope_sufix,document.querySelectorAll(this.scope_selector+".poncho-map").forEach(e=>e.appendChild(t))};_setFetureAttributes=()=>{const t=(e,t)=>{e.hasOwnProperty(t)&&(e[t].setAttribute("aria-label",e?.feature?.properties?.[this.title]),e[t].setAttribute("tabindex",0),e[t].dataset.entryId=e?.feature?.properties?.[this.id],"n"==e?.feature?.properties?.["pm-interactive"]?(e[t].dataset.interactive="n",e[t].setAttribute("role","graphics-symbol")):e[t].setAttribute("role","button"),e[t].dataset.leafletId=e._leaflet_id)};this.map.eachLayer(e=>t(e,"_path"))};_accesibleAnchors=()=>{var e=[[this.scope_selector+" .leaflet-map-pane","leaflet-map-pane"+this.scope_sufix,[["role","region"]]],[this.scope_selector+" .leaflet-control-zoom","leaflet-control-zoom"+this.scope_sufix,[["aria-label","Herramientas de zoom"],["role","region"]]],[".js-themes-tool"+this.scope_sufix,"themes-tool"+this.scope_sufix,[["aria-label","Herramienta para cambiar de tema visual"],["role","region"]]]];return e.forEach(e=>{document.querySelectorAll(e[0]).forEach(t=>{t.id=e[1],e[2].forEach(e=>t.setAttribute(e[0],e[1]))})}),e};_accesibleMenu=()=>{document.querySelectorAll(this.scope_selector+" .pm-accesible-nav").forEach(e=>e.remove());var e=this._accesibleAnchors(),e=[...e=[{text:"Ir a los marcadores del mapa",anchor:"#"+e[0][1]},{text:"Ajustar marcadores al mapa",anchor:"#",class:"js-fit-bounds"},{text:"Ir al panel de zoom",anchor:"#"+e[1][1]},{text:"Cambiar de tema",anchor:"#"+e[2][1]}],...this.accesible_menu_filter,...this.accesible_menu_search,...this.accesible_menu_extras],t=document.createElement("i");t.classList.add("pmi","pmi-universal-access","accesible-nav__icon"),t.setAttribute("aria-hidden","true");const s=document.createElement("div"),a=(s.classList.add("pm-accesible-nav","top","pm-list"),s.id="pm-accesible-nav"+this.scope_sufix,s.setAttribute("aria-label","Menú para el mapa"),s.setAttribute("role","navigation"),s.tabIndex=0,document.createElement("ul"));a.classList.add("pm-list-unstyled"),e.forEach((e,t)=>{var s=document.createElement("a"),e=(s.classList.add("pm-item-link","pm-accesible"),s.textContent=e.text,s.tabIndex=0,s.href=e.anchor,e.hasOwnProperty("class")&&""!=e.class&&s.classList.add(...e.class.split(" ")),document.createElement("li"));e.appendChild(s),a.appendChild(e)}),s.appendChild(t),s.appendChild(a);e=document.createElement("a");e.textContent="Ir a la navegación del mapa",e.classList.add("pm-item-link","pm-accesible"),e.href="#pm-accesible-nav"+this.scope_sufix,e.id="accesible-return-nav"+this.scope_sufix;const r=document.createElement("div");r.classList.add("pm-accesible-nav","bottom"),r.appendChild(t.cloneNode(!0)),r.appendChild(e),document.querySelectorAll(""+this.scope_selector).forEach(e=>{e.insertBefore(s,e.children[0]),e.appendChild(r)}),this.fit()};fit=()=>document.querySelectorAll(this.scope_selector+" .js-fit-bounds").forEach(e=>{e.onclick=e=>{e.preventDefault(),this.fitBounds()}});clearAll=()=>{[".js-filter-container"+this.scope_sufix,".js-slider"+this.scope_sufix].forEach(e=>document.querySelectorAll(e).forEach(e=>e.remove()))};cleanState=()=>history.replaceState(null,null," ");render=()=>{this._hiddenSearchInput(),this._resetViewButton(),this._setThemes(),this.titleLayer.addTo(this.map),this.markersMap(this.entries),this._selectedMarker(),this.slider&&(this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider()),this.hash&&this._urlHash(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this._setFetureAttributes(),this._accesibleMenu(),this.mapOpacity(),this.mapBackgroundColor()}}class PonchoMapLoader{constructor(e){e=Object.assign({},{scope:"",timeout:5e4},e);this.scope=e.scope,this.timeout=e.timeout,this.scope_sufix="--"+this.scope,this.scope_selector=`[data-scope="${this.scope}"]`,this.ponchoLoaderTimeout}close=()=>document.querySelectorAll(".js-poncho-map__loader"+this.scope_sufix).forEach(e=>e.remove());load=()=>{this.close(),clearTimeout(this.ponchoLoaderTimeout);var e=document.querySelector(".poncho-map"+this.scope_selector),t=document.createElement("span"),s=(t.className="loader",document.createElement("div"));s.dataset.scope=this.selector,s.classList.add("poncho-map__loader","js-poncho-map__loader"+this.scope_sufix),s.appendChild(t),e.appendChild(s),this.ponchoLoaderTimeout=setTimeout(this.remove,this.timeout)};loader=(e,t=500)=>{this.load(),setTimeout(()=>{e(),this.remove()},t)}}class PonchoMapFilter extends PonchoMap{constructor(e,t){super(e,t);e=Object.assign({},{filters:[],filters_visible:!1,filters_info:!1,search_fields:[],messages:{reset:' <a href="#" class="{{reset_search}}" title="Restablece el mapa a su estado inicial">Restablecer mapa</a>',initial:"Hay {{total_results}} puntos en el mapa.",no_results_by_term:"No encontramos resultados para tu búsqueda.",no_results:"No s + this.messages.resete encontraron entradas.",results:"{{total_results}} resultados coinciden con tu búsqueda.",one_result:"{{total_results}} resultado coincide con tu búsqueda.",has_filters:'<i title="¡Advertencia!" aria-hidden="true" class="fa fa-warning text-danger"></i> Se están usando filtros.'}},t);this.filters=e.filters,this.filters_info=e.filters_info,this.filters_visible=e.filters_visible,this.valid_fields=["checkbox","radio"],this.search_fields=e.search_fields,this.messages=e.messages,this.accesible_menu_filter=[{text:"Ir al panel de filtros",anchor:"#filtrar-busqueda"+this.scope_sufix}]}tplParser=(e,a)=>Object.keys(a).reduce(function(e,t){var s=new RegExp("\\{\\{\\s{0,2}"+t+"\\s{0,2}\\}\\}","gm");return e=e.replace(s,a[t])},e);_helpText=e=>{var t=document.querySelectorAll(this.scope_selector+" .js-poncho-map__help");const a={total_results:e.length,total_entries:this.entries.length,total_filtered_entries:this.filtered_entries.length,filter_class:"js-close-filter"+this.scope_sufix,anchor:"#",term:this.inputSearchValue,reset_search:"js-poncho-map-reset"+this.scope_sufix};t.forEach(e=>{e.innerHTML="";var t=document.createElement("ul"),s=(t.classList.add("m-b-0","list-unstyled"),t.setAttribute("aria-live","polite"),e=>{var t=document.createElement("li");return t.innerHTML=e,t});a.total_entries===a.total_results?t.appendChild(s(this.tplParser(this.messages.initial,a))):a.total_results<1?t.appendChild(s(this.tplParser(this.messages.no_results_by_term+this.messages.reset,a))):""===this.inputSearchValue&&a.total_results<1?t.appendChild(s(this.tplParser(this.messages.no_results+this.messages.reset,a))):1==a.total_results?t.appendChild(s(this.tplParser(this.messages.one_result+this.messages.reset,a))):1<a.total_results&&t.appendChild(s(this.tplParser(this.messages.results+this.messages.reset,a))),this.usingFilters(),e.appendChild(t)})};_filterPosition=e=>{e=/^([\w\-]+?)(?:__([0-9]+))(?:__([0-9]+))?$/gm.exec(e);return e?[e[1],e[2]]:null};isFilterOpen=()=>document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.contains("filter--in");toggleFilter=()=>{document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.toggle("filter--in")};_filterContainerHeight=()=>{var e=document.querySelector(".js-filter-container"+this.scope_sufix),t=document.querySelector(".js-close-filter"+this.scope_sufix),s=e.offsetParent.offsetHeight,a=3*this._cssVarComputedDistance(),s=s-e.offsetTop-t.offsetHeight-a,e=document.querySelector(".js-poncho-map-filters"+this.scope_sufix),t=(e.style.maxHeight=s+"px",e.offsetHeight-45),a=document.querySelector(".js-filters"+this.scope_sufix);a.style.height=t+"px",a.style.overflow="auto"};_clickToggleFilter=()=>document.querySelectorAll(".js-close-filter"+this.scope_sufix).forEach(e=>e.onclick=e=>{e.preventDefault(),this.toggleFilter(),this._filterContainerHeight()});_setFilter=e=>{const[t,s="checked"]=e;e=this.entries.map(e=>{if(e.properties.hasOwnProperty(t))return e.properties[t]}).filter(e=>e),e=[...new Set(e)].map(e=>[t,e,[e],s]);return e.sort((e,t)=>{e=e[1].toUpperCase(),t=t[1].toUpperCase();return t<e?1:e<t?-1:0}),e};_fieldsToUse=e=>{var{type:e="checkbox",fields:t=!1,field:s=!1}=e;t||s||this.errorMessage("Filters requiere el uso del atributo `field` o `fields`.","warning"),s&&"radio"===e&&(s[1]=!1);let a=t||this._setFilter(s);return"radio"===e&&!1===t&&(s=a.map(e=>e[1]),a=[[a[0][0],"Todos",s,"checked"],...a]),a};_fields=(e,t)=>{var s=document.createElement("div"),a=(s.classList.add("field-list","p-b-1"),this._fieldsToUse(e));for(const c in a){var r=a[c],i=document.createElement("input"),o=(i.type=this.valid_fields.includes(e.type)?e.type:"checkbox",i.id=`id__${r[0]}__${t}__`+c,"radio"==e.type?i.name=r[0]+"__"+t:i.name=r[0]+`__${t}__`+c,i.className="form-check-input",i.value=c,void 0!==r[3]&&"checked"==r[3]&&i.setAttribute("checked","checked"),document.createElement("label")),n=(o.style.marginLeft=".33rem",o.textContent=r[1],o.className="form-check-label",o.setAttribute("for",`id__${r[0]}__${t}__`+c),document.createElement("span")),r=(n.dataset.info=r[0]+`__${t}__`+c,o.appendChild(n),document.createElement("div"));r.className="form-check",r.appendChild(i),r.appendChild(o),s.appendChild(r)}var l=document.createElement("div");return l.appendChild(s),l};_filterButton=()=>{var e=document.createElement("i"),t=(e.setAttribute("aria-hidden","true"),e.classList.add("pmi","pmi-filter"),document.createElement("span")),s=(t.textContent="Abre o cierra el filtro de búsqueda",t.classList.add("pm-visually-hidden"),document.createElement("button")),e=(s.classList.add("pm-btn","pm-btn-rounded-circle","pm-my-1","js-close-filter"+this.scope_sufix),s.id="filtrar-busqueda"+this.scope_sufix,s.appendChild(e),s.appendChild(t),s.setAttribute("role","button"),s.setAttribute("aria-label","Abre o cierra el filtro de búsqueda"),s.setAttribute("aria-controls","poncho-map-filters"+this.scope_sufix),document.createElement("div"));e.classList.add("js-filter-container"+this.scope_sufix,"filter-container"),e.appendChild(s),document.querySelector(".poncho-map"+this.scope_selector).appendChild(e)};_cssVarComputedDistance=()=>{var e=document.querySelector(".poncho-map"),e=getComputedStyle(e).getPropertyValue("--pm-slider-distance");return parseInt(e.toString().replace(/[^0-9]*/gm,""))||0};_controlZoomSize=()=>{var e=document.querySelector(this.scope_selector+" .leaflet-control-zoom");return{controlHeight:e.offsetHeight,controlTop:e.offsetTop}};_filterContainer=()=>{var e=document.createElement("div"),t=(e.className="js-filters"+this.scope_sufix,document.createElement("button")),s=(t.classList.add("btn","btn-xs","btn-secondary","btn-close","js-close-filter"+this.scope_sufix),t.title="Cerrar panel",t.setAttribute("role","button"),t.setAttribute("aria-label","Cerrar panel de filtros"),t.innerHTML='<span class="pm-visually-hidden">Cerrar </span>✕',document.createElement("form"));s.classList.add("js-formulario"+this.scope_sufix),s.appendChild(t),s.appendChild(e);const a=document.createElement("div");a.classList.add("js-poncho-map-filters"+this.scope_sufix,"pm-container","poncho-map-filters","pm-caret","pm-caret-t"),a.setAttribute("role","region"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-label","Panel de filtros"),a.id="poncho-map-filters"+this.scope_sufix,this.filters_visible&&a.classList.add("filter--in");this._cssVarComputedDistance();t=this._controlZoomSize();const r=t.controlHeight+t.controlTop+"px";a.appendChild(s),document.querySelectorAll(".js-filter-container"+this.scope_sufix).forEach(e=>{e.style.top=r,e.appendChild(a)})};_checkUncheckButtons=e=>{var t=document.createElement("button"),s=(t.classList.add("js-select-items","select-items__button"),t.textContent="Marcar todos",t.dataset.field=e.field[0],t.dataset.value=1,document.createElement("button")),e=(s.classList.add("js-select-items","select-items__button"),s.textContent="Desmarcar todos",s.dataset.field=e.field[0],s.dataset.value=0,document.createElement("div"));return e.classList.add("select-items"),e.appendChild(t),e.appendChild(s),e};_createFilters=e=>{const r=document.querySelector(".js-filters"+this.scope_sufix);e.forEach((e,t)=>{var s=document.createElement("legend"),a=(s.textContent=e.legend,s.classList.add("m-b-1","color-primary","h6"),document.createElement("fieldset"));a.appendChild(s),e.hasOwnProperty("check_uncheck_all")&&e.check_uncheck_all&&"radio"!=e?.type&&a.appendChild(this._checkUncheckButtons(e)),a.appendChild(this._fields(e,t)),r.appendChild(a)})};formFilters=()=>{var e;return this.filters.length<1?[]:(e=document.querySelector(".js-formulario"+this.scope_sufix),e=new FormData(e),Array.from(e).map(e=>{var t=this._filterPosition(e[0]);return[parseInt(t[1]),parseInt(e[1]),t[0]]}))};defaultFiltersConfiguration=()=>{return this.filters.map((e,s)=>{return this._fieldsToUse(e).map((e,t)=>[s,t,e[0],"undefinded"!=typeof e[3]&&"checked"==e[3]])}).flat()};usingFilters=()=>{return this.defaultFiltersConfiguration().every(e=>document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]).checked)};_resetFormFilters=()=>{this.defaultFiltersConfiguration().forEach(e=>{document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]).checked=e[3]})};get inputSearchValue(){var e=document.querySelector("#js-search-input"+this.scope_sufix).value.trim();return""!==e&&e}_countOccurrences=(e,s,a)=>{return e.reduce((e,t)=>s.some(e=>t.properties[a].includes(e))?e+1:e,0)};totals=()=>{return this.formFilters().map(e=>{var t=this._fieldsToUse(this.filters[e[0]])[e[1]];return[t[1],this._countOccurrences(this.filtered_entries,t[2],t[0]),...e]})};_totalsInfo=()=>{if(!this.filters_info)return"";this.totals().forEach(e=>{var t=document.querySelector(""+this.scope_selector+` [data-info="${e[4]}__${e[2]}__${e[3]}"]`),s=e[1]<2?"":"s",a=document.createElement("i"),r=(a.style.cursor="help",a.style.opacity=".75",a.style.marginLeft=".5em",a.style.marginRight=".25em",a.classList.add("fa","fa-info-circle","small","text-info"),a.title=e[1]+" resultado"+s,a.setAttribute("aria-hidden","true"),document.createElement("span")),e=(r.className="pm-visually-hidden",r.style.fontWeight="400",r.textContent=e[1]+` elemento${s}.`,document.createElement("small"));e.appendChild(a),e.appendChild(r),t.appendChild(e)})};_validateEntry=(t,s)=>{var a=this.filters.length,r=[];for(let e=0;e<a;e++)r.push(this._validateGroup(t,(t=>s.filter(e=>e[0]==t))(e)));return r.every(e=>e)};_search=(t,e,s)=>{const a=this._fieldsToUse(this.filters[e])[s];return a[2].filter(e=>e).some(e=>{if(t.hasOwnProperty(a[0]))return t[a[0]].includes(e)})};_validateGroup=(t,e)=>{return e.map(e=>this._search(t,e[0],e[1])).some(e=>e)};_filterData=()=>{var e=this.formFilters(),t=this.entries.filter(e=>this._validateEntry(e.properties,this.formFilters())),t=this.searchEntries(this.inputSearchValue,t);return t=this.filters.length<1||0<e.length?t:[],this.filtered_entries=t};_filteredData=e=>{e=void 0!==e?this.entries:this._filterData(),this.markersMap(e),this._selectedMarker(),this._helpText(e),this._resetSearch(),this._clickToggleFilter(),this.slider&&(this._renderSlider(),this._clickeableMarkers(),this._clickeableFeatures(),this._clickToggleSlider()),this.hash&&this._urlHash(),this._setFetureAttributes(),this._accesibleMenu()};_clearSearchInput=()=>document.querySelectorAll("#js-search-input"+this.scope_sufix).forEach(e=>e.value="");_resetSearch=()=>{document.querySelectorAll(".js-poncho-map-reset"+this.scope_sufix).forEach(e=>{e.onclick=e=>{e.preventDefault(),this._resetFormFilters(),this._filteredData(this.entries),this._clearSearchInput(),this.resetView()}})};filterChange=t=>document.querySelectorAll(".js-filters"+this.scope_sufix).forEach(e=>{e.onchange=t});checkUncheckFilters=()=>{document.querySelectorAll(this.scope_selector+" .js-select-items").forEach(t=>{t.onclick=e=>{e.preventDefault(),document.querySelectorAll(`${this.scope_selector} [id^=id__${t.dataset.field}]`).forEach(e=>{e.checked=parseInt(t.dataset.value)}),this._filteredData()}})};render=()=>{this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),0<this.filters.length&&(this._filterButton(),this._filterContainer(),this._createFilters(this.filters)),this.titleLayer.addTo(this.map),this._filteredData(),this._totalsInfo(),this.scroll&&this.hasHash()&&this.scrollCenter(),this.checkUncheckFilters(),this.filterChange(e=>{e.preventDefault(),this._filteredData()}),setTimeout(this.gotoHashedEntry,this.anchor_delay),this.filters_visible&&this._filterContainerHeight(),this.mapOpacity(),this.mapBackgroundColor()}}class PonchoMapSearch{constructor(e,t){var s={scope:!1,placeholder:"Su búsqueda",search_fields:e.search_fields,sort:!0,sort_reverse:!1,sort_key:"text",datalist:!0},s=(this.instance=e,Object.assign({},s,t));this.text=e.title||!1,this.datalist=s.datalist,this.placeholder=s.placeholder,this.scope=s.scope,this.scope_sufix="--"+this.scope,this.sort=s.sort,this.sort_reverse=s.sort_reverse,this.search_scope_selector=this.scope?`[data-scope="${this.scope}"]`:"",this.instance.search_fields=s.search_fields,this.instance.accesible_menu_search=[{text:"Hacer una búsqueda",anchor:"#id-poncho-map-search"+this.scope_sufix}]}sortData=(e,a)=>{e=e.sort((e,t)=>{var s=e=>{this.instance.removeAccents(e).toUpperCase()};return s(e[a]),s(t[a]),s(e[a]),s(t[a]),0});return this.sort_reverse?e.reverse():e};_triggerSearch=()=>{const t=document.querySelector(this.search_scope_selector+" .js-poncho-map-search__input");t.id="id-poncho-map-search"+this.scope_sufix,document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__submit").forEach(e=>{e.onclick=e=>{e.preventDefault();document.querySelector("#js-search-input"+this.instance.scope_sufix).value=t.value;e=t.value;this._renderSearch(e)}})};_keyup=()=>{document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__input").forEach(e=>{const t=document.querySelector("#js-search-input"+this.instance.scope_sufix);e.onkeyup=()=>{t.value=e.value},e.onkeydown=()=>{t.value=e.value}})};_placeHolder=()=>{if(!this.placeholder)return"";document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__input").forEach(e=>e.placeholder=this.placeholder.toString())};_renderSearch=e=>{var t=this.instance._filterData();this.instance.markersMap(t),this.instance.slider&&(this.instance._renderSlider(),this.instance._clickeableFeatures(),this.instance._clickeableMarkers(),this.instance._clickToggleSlider()),this.instance.hash&&this.instance._urlHash(),this.instance.resetView(),1==t.length?this.instance.gotoEntry(t[0].properties[this.instance.id]):""!=e.trim()&&(this.instance.removeHash(),setTimeout(this.instance.fitBounds,this.instance.anchor_delay)),this.instance._helpText(t),this.instance._resetSearch(),this.instance._clickToggleFilter(),this.instance._setFetureAttributes(),this.instance._accesibleMenu()};_addDataListOptions=()=>{if(!this.datalist)return null;document.querySelectorAll(this.search_scope_selector+" .js-porcho-map-search__list,"+` ${this.search_scope_selector} .js-poncho-map-search__list`).forEach(s=>{s.innerHTML="";var e=document.querySelector(this.search_scope_selector+" .js-poncho-map-search__input"),t="id-datalist"+this.scope_sufix;e.setAttribute("list",t),s.id=t,this.instance.filtered_entries.forEach(e=>{var t;e.properties[this.text]&&s.appendChild((e=e.properties[this.text],(t=document.createElement("option")).value=e,t))})})};_searchRegion=()=>{var e=document.querySelector(this.search_scope_selector);e.setAttribute("role","region"),e.setAttribute("aria-label","Buscador")};render=()=>{this._placeHolder(),this._triggerSearch(),this._addDataListOptions(),this.instance.filterChange(e=>{e.preventDefault(),this.instance._filteredData(),this._addDataListOptions()}),this._searchRegion(),this._keyup(),this.instance._accesibleMenu()}}const PONCHOMAP_GEOJSON_PROVINCES="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geo-provincias-argentinas.json",ponchoMapProvinceMergeData=(a={},r={},i="provincia")=>{if(a.hasOwnProperty("features"))return a.features.forEach((t,e)=>{var s=r.find(e=>e[i]==t.properties.fna||e[i]==t.properties.nam);!s&&t.properties.fna?delete a.features[e]:(s?.color&&!t.properties["pm-type"]&&(a.features[e].properties.stroke=ponchoColor(s.color)),"n"===t.properties["pm-interactive"]&&"n"!==s?.["pm-interactive"]&&delete s["pm-interactive"],Object.assign(a.features[e].properties,s))}),a;throw new Error("Invalid data format")},ponchoMapProvinceCssStyles=e=>{e||document.querySelectorAll(".poncho-map-province__toggle-map,.poncho-map-province__toggle-element").forEach(e=>{e.classList.remove("poncho-map-province__toggle-map","poncho-map-province__toggle-element")})};class PonchoMapProvinces extends PonchoMapFilter{constructor(e,t,s){s=Object.assign({},{initial_entry:!1,random_entry:!1,overlay_image:!0,overlay_image_bounds:[[-20.56830872133435,-44.91768177759874],[-55.861359445914566,-75.2246121480093]],overlay_image_opacity:.8,overlay_image_url:"https://www.argentina.gob.ar/sites/default/files/map-shadow.png",hide_select:!0,province_index:"provincia",fit_bounds:!0,map_view:[-40.47815508388363,-60.0045383246273],map_init_options:{zoomSnap:.2,zoomControl:!0,doubleClickZoom:!1,scrollWheelZoom:!1,boxZoom:!1},map_zoom:4.4,tooltip_options:{permanent:!1,className:"leaflet-tooltip-own",direction:"auto",offset:[0,-3],sticky:!0,opacity:1},tooltip:!0,slider:!0},s),ponchoMapProvinceCssStyles(s.hide_select),e=ponchoMapProvinceMergeData(e,t,s.province_index);super(e,s),this.initialEntry=s.initial_entry,this.randomEntry=s.random_entry,this.overlayImage=s.overlay_image,this.overlayImageUrl=s.overlay_image_url,this.overlayImageBounds=s.overlay_image_bounds,this.overlayImageOpacity=s.overlay_image_opacity,this.mapView=s.map_view,this.hideSelect=s.hide_select,this.fitToBounds=s.fit_bounds}sortObject=(e,s=0)=>e.sort((e,t)=>{e=e[s].toUpperCase(),t=t[s].toUpperCase();return t<e?1:e<t?-1:0});_randomEntry=e=>e[Math.floor(Math.random()*e.length)][0];_provincesFromGeoJSON=(e,a)=>{let r={};return e.features.map(e=>{var{name:t=!1,"pm-interactive":s=!1}=e.properties;if("n"===s||!t)return!1;r[e.properties[a]]=t}).filter(e=>e),this.sortObject(Object.entries(r),1)};_selectedEntry=e=>{var t=window.location.hash.replace("#","");let s="";return t?s=t:this.initialEntry?s=this.initialEntry:this.randomEntry&&(s=this._randomEntry(e)),s};_setSelectProvinces=e=>{window.location.hash.replace("#","");e=this._provincesFromGeoJSON(e.geoJSON,e.id);const s=this._selectedEntry(e),a=document.getElementById("id_provincia");return[["","Seleccione una provincia"],...e].forEach(e=>{var t=document.createElement("option");e[0]===s&&t.setAttribute("selected","selected"),t.value=e[0],t.textContent=e[1],a.appendChild(t)}),{object:a,selected:s}};_selectedPolygon=e=>{e.map.eachLayer(e=>{e.on("keypress click",e=>{e?.target?.feature?.properties&&(e=e.target.feature.properties["id"],document.getElementById("id_provincia").value=e)})})};_selectProvinces=t=>{this._selectedPolygon(t);const s=this._setSelectProvinces(t);s.selected&&t.gotoEntry(s.selected),s.object.addEventListener("change",e=>{t.gotoEntry(e.target.value),e.value=s.selected})};_overlayImage=()=>{this.overlayImage&&L.imageOverlay(this.overlayImageUrl,this.overlayImageBounds,{opacity:this.overlayImageOpacity}).addTo(this.map)};renderProvinceMap=()=>{this._overlayImage(),this.render(),this.fitToBounds&&this.fitBounds(),this._selectProvinces(this)}}class GapiSheetData{constructor(e){e=Object.assign({},{gapi_key:"AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",gapi_uri:"https://sheets.googleapis.com/v4/spreadsheets/"},e);this.gapi_key=e.gapi_key,this.gapi_uri=e.gapi_uri}url=(e,t,s)=>{return["https://sheets.googleapis.com/v4/spreadsheets/",t,"/values/",e,"?key=",void 0!==s?s:this.gapi_key,"&alt=json"].join("")};json_data=e=>{e=this.feed(e);return{feed:e,entries:this.entries(e),headers:this.headers(e)}};feed=(e,i=!0)=>{const o=e.values[0],n=/ |\/|_/gi;let l=[];return e.values.forEach((e,t)=>{if(0<t){var s,a={};for(s in o){var r=e.hasOwnProperty(s)?e[s].trim():"";i?a[""+o[s].toLowerCase().replace(n,"")]=r:a[""+o[s].replace(n,"")]=r}l.push(a)}}),l};gapi_feed_row=(e,t="-",s=!0)=>{const a=s?"filtro-":"";s=Object.entries(e);let r={};return s.map(e=>{return r[e[0].replace("gsx$","").replace(a,"").replace(/-/g,t)]=e[1].$t}),r};entries=e=>e.filter((e,t)=>0<t);headers=e=>e.find((e,t)=>0==t)}class TranslateHTML{ATTRIBUTES=["title","placeholder","alt","value","href","src","html.lang"];constructor(e=[],t=[]){this.dictionary=this.sortByLength(e),this.attributes=t.length?t:this.ATTRIBUTES}sortByLength=e=>(e.sort((e,t)=>e[0].length>t[0].length?-1:e[0].length<t[0].length?1:e[0]-t[0]),e);translateAttributes=(e=!1)=>{const t=e||this.dictionary;this.attributes.forEach(e=>{e=e.split(".").slice(-2);const s=2===e.length?e[0]:"",a=2===e.length?e[1]:e[0];t.forEach(t=>{document.querySelectorAll(`${s}[${a}='${t[0]}']`).forEach(e=>e[a]=t[1])})})};translateHTML=(s,a)=>{for(var e,t=document.evaluate("//*/text()",document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),r=[];e=t.iterateNext();)r.push(e);r.forEach(e=>{var t=e.textContent.replace(s,a);t!==e.textContent&&(t=document.createTextNode(t),e.parentNode.replaceChild(t,e))})};translate=()=>{this.dictionary.forEach(e=>{var t=new RegExp(e[0],"g");this.translateHTML(t,e[1])})}}
|
|
1
|
+
const ponchoColorDefinitionsList=[{name:"www.argentina.gob.ar",space:"arg",hidden_space:!1,description:"",data:[{scope:"arg",name:"Azul principal",group:"primary",color:{900:"#232D4F",800:"#2C3C5F",700:"#354B6E",600:"#3E5A7E",500:"#5A7290",400:"#7589A3",300:"#91A1B5",200:"#ACB8C8",100:"#C8D0DA",50:"#E3E7ED"},instance:[{name:"Azul",code:"arg-azul",description:"Color principal",scope:"arg",related_color:"900",parent_group:"primary",color:"#232D4F",variant:[{variant:"half",color:"#9296A7",name:"Azul medio tono",code:"arg-azul-half"},{variant:"lighter",color:"#C8D0DA",name:"Azul muy claro",code:"arg-azul-lighter"}],alias:[{code:"arg-azul",exclude:!1},{code:"primary",exclude:!0},{code:"azul",exclude:!0},{code:"azul-marino",exclude:!0},{code:"primary-alt",exclude:!0}]},{name:"Secundario",code:"arg-secundario",description:"",scope:"arg",related_color:"600",parent_group:"primary",color:"#3E5A7E",variant:[],alias:[{code:"arg-secundario",exclude:!1},{code:"secondary",exclude:!0},{code:"secundario",exclude:!0}]},{name:"Primary light",code:"arg-primary-light",description:"",scope:"arg",related_color:"50",parent_group:"primary",color:"#E3E7ED",variant:[],alias:[{code:"arg-primary-light",exclude:!1},{code:"primary-light",exclude:!0}]},{name:"Info",code:"arg-info",description:"",scope:"arg",related_color:"500",parent_group:"primary",color:"#5A7290",variant:[{variant:"lighter",color:"#E3E7ED",name:"Info muy claro",code:"arg-info-lighter"}],alias:[{code:"arg-info",exclude:!1},{code:"info",exclude:!0}]}]},{scope:"arg",name:"Verde",group:"verde",color:{50:"#F1F5D7",100:"#DEE8A3",200:"#CCDB6E",300:"#B9CE39",400:"#93B727",500:"#6EA015",600:"#4E8F24",700:"#2E7D33",800:"#27692A",900:"#1F5421"},instance:[{name:"Verde",code:"arg-verde",description:"",scope:"arg",related_color:"700",parent_group:"verde",color:"#2E7D33",variant:[{variant:"light",color:"#6EA015",name:"Verde claro",code:"arg-verde-light"},{variant:"half",color:"#96BE99",name:"Verde medio tono",code:"arg-verde-half"},{variant:"dark",color:"#1F5421",name:"Verde oscuro",code:"arg-verde-dark"}],alias:[{code:"arg-verde",exclude:!1},{code:"success",exclude:!0},{code:"verde",exclude:!0}]},{name:"Verdín",code:"arg-verdin",description:"",scope:"arg",related_color:"500",parent_group:"verde",color:"#6EA015",variant:[{variant:"light",color:"#B9CE39",name:"Verdín claro",code:"arg-verdin-light"},{variant:"dark",color:"#2E7D33",name:"Verdín oscuro",code:"arg-verdin-dark"}],alias:[{code:"arg-verdin",exclude:!1},{code:"verdin",exclude:!0}]},{name:"Lima",code:"arg-lima",description:"",scope:"arg",related_color:"300",parent_group:"verde",color:"#B9CE39",variant:[{variant:"light",color:"#DEE8A3",name:"Lima claro",code:"arg-lima-light"},{variant:"dark",color:"#6EA015",name:"Lima oscuro",code:"arg-lima-dark"}],alias:[{code:"arg-lima",exclude:!1},{code:"limon",exclude:!0},{code:"lima",exclude:!0}]}]},{scope:"arg",name:"Amarillo",group:"amarillo",color:{50:"#FFFAE8",100:"#FFF1C0",200:"#FFE997",300:"#FFE06E",400:"#FFD745",500:"#FFCE1C",600:"#D8AE18",700:"#B18F15",800:"#8A6F12",900:"#634F0E"},instance:[{name:"Maíz",code:"arg-maiz",description:"",scope:"arg",related_color:"500",parent_group:"amarillo",color:"#FFCE1C",variant:[{variant:"light",color:"#FFE997",name:"Maíz claro",code:"arg-maiz-light"},{variant:"dark",color:"#B18F15",name:"Maíz oscuro",code:"arg-maiz-dark"}],alias:[{code:"arg-maiz",exclude:!1},{code:"maiz",exclude:!0}]}]},{scope:"arg",name:"Fucsia",group:"fucsia",color:{50:"#FCDDE6",100:"#F8B6C9",200:"#F48EAB",300:"#F16798",400:"#ED3F85",500:"#EC407A",600:"#D72C6B",700:"#C2185B",800:"#9A144A",900:"#721038"},instance:[{name:"Arándano",code:"arg-arandano",description:"",scope:"arg",related_color:"700",parent_group:"fucsia",color:"#C2185B",variant:[{variant:"light",color:"#EC407A",name:"Arándano claro",code:"arg-arandano-light"},{variant:"dark",color:"#721038",name:"Arándano oscuro",code:"arg-arandano-dark"},{variant:"half",color:"#E18CAD",name:"Arándano medio tono",code:"arg-arandano-half"},{variant:"lighter",color:"#FCDDE6",name:"Arándano muy claro",code:"arg-arandano-lighter"}],alias:[{code:"arg-arandano",exclude:!1},{code:"arandano",exclude:!0}]},{name:"Fucsia",code:"arg-fucsia",description:"",scope:"arg",related_color:"500",parent_group:"fucsia",color:"#EC407A",variant:[{variant:"light",color:"#F16798",name:"Fucsia claro",code:"arg-fucsia-light"},{variant:"dark",color:"#9A144A",name:"Fucsia oscuro",code:"arg-fucsia-dark"}],alias:[{code:"arg-fucsia",exclude:!1},{code:"cereza",exclude:!0},{code:"fucsia",exclude:!0}]},{name:"Rosado",code:"arg-rosado",description:"",scope:"arg",related_color:"200",parent_group:"fucsia",color:"#F48EAB",variant:[{variant:"light",color:"#FCDDE6",name:"Rosado claro",code:"arg-rosado-light"},{variant:"dark",color:"#ED3F85",name:"Rosado oscuro",code:"arg-rosado-dark"},{variant:"half",color:"#FAC7D5",name:"Rosado medio tono",code:"arg-rosado-half"}],alias:[{code:"arg-rosado",exclude:!1}]}]},{scope:"arg",name:"Violeta",group:"violeta",color:{50:"#E9E6F2",100:"#D3CEE5",200:"#BEB5D8",300:"#A89DCB",400:"#9284BE",500:"#8561B2",700:"#6A1B99",800:"#4B0F7A",900:"#2C035C",600:"#773EA5"},instance:[{name:"Lavanda",code:"arg-lavanda",description:"",scope:"arg",related_color:"400",parent_group:"violeta",color:"#9284BE",variant:[],alias:[{code:"arg-lavanda",exclude:!1},{code:"lavanda",exclude:!0}]},{name:"Uva",code:"arg-uva",description:"",scope:"arg",related_color:"700",parent_group:"violeta",color:"#6A1B99",variant:[],alias:[{code:"arg-uva",exclude:!1},{code:"uva",exclude:!0}]}]},{scope:"arg",name:"Negro",group:"negro",color:{50:"#F0F0F0",100:"#E9E9E9",200:"#DDDDDD",300:"#838383",150:"#DEE2E6",75:"#F2F2F2",500:"#555555",600:"#444444",900:"#141414",25:"#FFFFFF"},instance:[{name:"Negro",code:"arg-negro",description:"Elementos básicos",scope:"arg",related_color:"900",parent_group:"negro",color:"#141414",variant:[{variant:"lighter",color:"#F0F0F0",name:"Negro muy claro",code:"arg-negro-lighter"},{variant:"light",color:"#DDDDDD",name:"Gris",code:"arg-negro-light"}],alias:[{code:"arg-negro",exclude:!1},{code:"negro",exclude:!0},{code:"black",exclude:!0},{code:"gray-base",exclude:!0}]},{name:"Default",code:"arg-default",description:"",scope:"arg",related_color:"300",parent_group:"negro",color:"#838383",variant:[],alias:[{code:"arg-default",exclude:!1},{code:"default",exclude:!0}]},{name:"Gray light",code:"arg-gray-light",description:"",scope:"arg",related_color:"200",parent_group:"negro",color:"#DDDDDD",variant:[],alias:[{code:"arg-gray-light",exclude:!1},{code:"gray-light",exclude:!0}]},{name:"Gray hover",code:"arg-gray-hover",description:"",scope:"arg",related_color:"100",parent_group:"negro",color:"#E9E9E9",variant:[],alias:[{code:"arg-gray-hover",exclude:!1},{code:"gray-hover",exclude:!0}]},{name:"Gray hover light",code:"arg-gray-hover-light",description:"",scope:"arg",related_color:"50",parent_group:"negro",color:"#F0F0F0",variant:[],alias:[{code:"arg-gray-hover-light",exclude:!1},{code:"gray-hover-light",exclude:!0}]},{name:"Gris intermedio",code:"arg-gris-intermedio",description:"",scope:"arg",related_color:"500",parent_group:"negro",color:"#555555",variant:[],alias:[{code:"arg-gris-intermedio",exclude:!1},{code:"gray",exclude:!0},{code:"grisintermedio",exclude:!0},{code:"gris-area",exclude:!0},{code:"gris",exclude:!1}]},{name:"Gray dark",code:"arg-gray-dark",description:"",scope:"arg",related_color:"600",parent_group:"negro",color:"#444444",variant:[],alias:[{code:"arg-gray-dark",exclude:!1},{code:"gray-dark",exclude:!0}]},{name:"Gray border",code:"arg-gray-border",description:"",scope:"arg",related_color:"150",parent_group:"negro",color:"#DEE2E6",variant:[],alias:[{code:"arg-gray-border",exclude:!1},{code:"gray-border",exclude:!0}]},{name:"Gris niebla",code:"arg-gris-niebla",description:"",scope:"arg",related_color:"75",parent_group:"negro",color:"#F2F2F2",variant:[],alias:[{code:"arg-gris-niebla",exclude:!1},{code:"gray-lighter",exclude:!0}]},{name:"Gray background",code:"arg-gray-background",description:"",scope:"arg",related_color:"25",parent_group:"negro",color:"#FFFFFF",variant:[],alias:[{code:"arg-gray-background",exclude:!1},{code:"gray-background",exclude:!0}]}]},{scope:"arg",name:"Turquesa",group:"turquesa",color:{50:"#DCF1F0",100:"#C0E5E3",200:"#A4D9D7",300:"#88CECB",400:"#6CC3BE",500:"#50B7B2",600:"#459E99",700:"#3B8681",800:"#306D69",900:"#255450"},instance:[{name:"Palta",code:"arg-palta",description:"",scope:"arg",related_color:"500",parent_group:"turquesa",color:"#50B7B2",variant:[{variant:"half",color:"#A8DBD9",name:"Palta medio tono",code:"arg-palta-half"},{variant:"lighter",color:"#C0E5E3",name:"Palta muy claro",code:"arg-palta-lighter"}],alias:[{code:"arg-palta",exclude:!1},{code:"palta",exclude:!0}]},{name:"Verde azulado",code:"arg-verde-azulado",description:"",scope:"arg",related_color:"700",parent_group:"turquesa",color:"#3B8681",variant:[],alias:[{code:"arg-verde-azulado",exclude:!1},{code:"verde-azulado",exclude:!0},{code:"verdeazulado",exclude:!0}]},{name:"Eucalipto",code:"arg-eucalipto",description:"",scope:"arg",related_color:"800",parent_group:"turquesa",color:"#306D69",variant:[{variant:"lighter",color:"#A4D9D7",name:"Eucalipto muy claro",code:"arg-eucalipto-lighter"},{variant:"dark",color:"#255450",name:"Eucalipto oscuro",code:"arg-eucalipto-dark"}],alias:[{code:"arg-eucalipto",exclude:!1}]}]},{scope:"arg",name:"Azul",group:"azul",color:{50:"#CDEBFA",100:"#9AD7F5",200:"#68C3EF",300:"#35AFEA",400:"#039BE5",500:"#0581C6",600:"#0767A7",700:"#084E87",800:"#0A3468",900:"#0C1A49"},instance:[{name:"Cielo",code:"arg-cielo",description:"",scope:"arg",related_color:"400",parent_group:"azul",color:"#039BE5",variant:[],alias:[{code:"arg-cielo",exclude:!1},{code:"cielo",exclude:!0},{code:"celeste",exclude:!0}]},{name:"Escarapela",code:"arg-escarapela",description:"",scope:"arg",related_color:"200",parent_group:"azul",color:"#68C3EF",variant:[],alias:[{code:"arg-escarapela",exclude:!1},{code:"escarapela",exclude:!0},{code:"celesteargentina",exclude:!0},{code:"celeste-argentina",exclude:!1}]}]},{scope:"arg",name:"Rojo",group:"rojo",color:{50:"#FCDDDC",100:"#F9BBB9",200:"#F69896",300:"#F27673",400:"#EF5350",500:"#E14543",600:"#D43635",700:"#C62828",800:"#A12222",900:"#7C1C1C"},instance:[{name:"Rojo",code:"arg-rojo",description:"Atención o peligro",scope:"arg",related_color:"700",parent_group:"rojo",color:"#C62828",variant:[{variant:"light",color:"#E14543",name:"Rojo claro",code:"arg-rojo-light"},{variant:"dark",color:"#7C1C1C",name:"Rojo oscuro",code:"arg-rojo-dark"},{variant:"lighter",color:"#FCDDDC",name:"Rojo muy claro",code:"arg-rojo-lighter"}],alias:[{code:"arg-rojo",exclude:!1},{code:"danger",exclude:!0},{code:"rojo",exclude:!0}]},{name:"Tomate",code:"arg-tomate",description:"",scope:"arg",related_color:"400",parent_group:"rojo",color:"#EF5350",variant:[{variant:"light",color:"#F69896",name:"Tomate claro",code:"arg-tomate-light"},{variant:"dark",color:"#C62828",name:"Tomate oscuro",code:"arg-tomate-dark"}],alias:[{code:"arg-tomate",exclude:!1},{code:"complementary",exclude:!0},{code:"tomate",exclude:!0}]}]},{scope:"arg",name:"Naranja",group:"naranja",color:{50:"#FDE7BF",100:"#FBCE80",200:"#F9B640",300:"#F79D00",400:"#F38500",500:"#EF6C00",600:"#CE5701",700:"#AE4203",800:"#8D2D04",900:"#6C1805"},instance:[{name:"Marrón claro",code:"arg-marron-claro",description:"",scope:"arg",related_color:"800",parent_group:"naranja",color:"#8D2D04",variant:[{variant:"light",color:"#CE5701",name:"Marrón claro claro",code:"arg-marron-claro-light"},{variant:"dark",color:"#6C1805",name:"Marrón claro oscuro",code:"arg-marron-claro-dark"}],alias:[{code:"arg-marron-claro",exclude:!1},{code:"marron-claro",exclude:!0}]},{name:"Naranja",code:"arg-naranja",description:"",scope:"arg",related_color:"500",parent_group:"naranja",color:"#EF6C00",variant:[{variant:"light",color:"#EF6C00",name:"Naranja claro",code:"arg-naranja-light"},{variant:"dark",color:"#6C1805",name:"Naranja oscuro",code:"arg-naranja-dark"}],alias:[{code:"arg-naranja",exclude:!1},{code:"naranjaoscuro",exclude:!0},{code:"naranja",exclude:!0}]},{name:"Mandarina",code:"arg-mandarina",description:"",scope:"arg",related_color:"300",parent_group:"naranja",color:"#F79D00",variant:[{variant:"light",color:"#FBCE80",name:"Mandarina claro",code:"arg-mandarina-light"},{variant:"dark",color:"#CE5701",name:"Mandarina oscuro",code:"arg-mandarina-dark"}],alias:[{code:"arg-mandarina",exclude:!1},{code:"mandarina",exclude:!0}]}]},{scope:"arg",name:"Blanco",group:"blanco",color:{150:"#FFFFFF"},instance:[{name:"Blanco",code:"arg-white",description:"",scope:"arg",related_color:"150",parent_group:"blanco",color:"#FFFFFF",variant:[],alias:[{code:"arg-white",exclude:!1},{code:"white",exclude:!0}]}]},{scope:"arg",name:"Ocre",group:"ocre",color:{50:"#FAF8ED",100:"#F4F0DB",200:"#EAE1B7",300:"#E9CE8C",400:"#E7BA61",500:"#C98941",600:"#AA5821",700:"#8C2701",800:"#6F2001",900:"#511901"},instance:[{name:"Arena",code:"arg-arena",description:"",scope:"arg",related_color:"200",parent_group:"ocre",color:"#EAE1B7",variant:[{variant:"light",color:"#FAF8ED",name:"Arena claro",code:"arg-arena-light"},{variant:"dark",color:"#E7BA61",name:"Arena oscuro",code:"arg-arena-dark"},{variant:"half",color:"#F5F0DB",name:"Arena medio tono",code:"arg-arena-half"}],alias:[{code:"arg-arena",exclude:!1}]},{name:"Amarillo",code:"arg-amarillo",description:"Foco o alerta",scope:"arg",related_color:"400",parent_group:"ocre",color:"#E7BA61",variant:[{variant:"light",color:"#EAE1B7",name:"Amarillo claro",code:"arg-amarillo-light"},{variant:"dark",color:"#AA5821",name:"Amarillo oscuro",code:"arg-amarillo-dark"},{variant:"half",color:"#F3DDB0",name:"Amarillo medio tono",code:"arg-amarillo-half"}],alias:[{code:"arg-amarillo",exclude:!1},{code:"warning",exclude:!0},{code:"amarillo",exclude:!0},{code:"amarillo-intenso",exclude:!0}]},{name:"Marrón oscuro",code:"arg-marron-oscuro",description:"",scope:"arg",related_color:"900",parent_group:"ocre",color:"#511901",variant:[],alias:[{code:"arg-marron-oscuro",exclude:!1}]}]},{scope:"arg",name:"Morado",group:"morado",color:{150:"#3A3796"},instance:[{name:"Azul morado",code:"arg-azul-morado",description:"",scope:"arg",related_color:"150",parent_group:"morado",color:"#3A3796",variant:[],alias:[{code:"arg-azul-morado",exclude:!1}]}]}]},{name:"MiArgentina",space:"miarg",hidden_space:!1,description:"",data:[{scope:"miarg",name:"Azul MiArgentina",group:"azul",color:{150:"#3526C3"},instance:[{name:"Azul MiArgentina",code:"miarg-azul",description:"Azul principal para aplicaciones MiArgentina",scope:"miarg",related_color:"150",parent_group:"azul",color:"#3526C3",variant:[{variant:"half",color:"#6B66CC",name:"Azul MiArgentina medio tono",code:"miarg-azul-half"}],alias:[{code:"miarg-azul",exclude:!1}]}]},{scope:"miarg",name:"Celeste MiArgentina",group:"celeste",color:{150:"#2CB9EE"},instance:[{name:"Celeste MiArgentina",code:"miarg-celeste",description:"",scope:"miarg",related_color:"150",parent_group:"celeste",color:"#2CB9EE",variant:[],alias:[{code:"miarg-celeste",exclude:!1}]}]},{scope:"miarg",name:"Amarillo claro MiArgentina",group:"amarillo-claro",color:{150:"#ffe9b8"},instance:[{name:"Amarillo claro MiArgentina",code:"miarg-amarillo-claro",description:"",scope:"miarg",related_color:"150",parent_group:"amarillo-claro",color:"#ffe9b8",variant:[],alias:[{code:"miarg-amarillo-claro",exclude:!1}]}]},{scope:"miarg",name:"Rosa claro MiArgentina",group:"rosa-claro",color:{150:"#EECCCF"},instance:[{name:"Rosa claro MiArgentina",code:"miarg-rosa-claro",description:"",scope:"miarg",related_color:"150",parent_group:"rosa-claro",color:"#EECCCF",variant:[],alias:[{code:"miarg-rosa-claro",exclude:!1}]}]},{scope:"miarg",name:"Verde claro MiArgentina",group:"verde-claro",color:{150:"#CFEEDC"},instance:[{name:"Verde claro MiArgentina",code:"miarg-verde-claro",description:"",scope:"miarg",related_color:"150",parent_group:"verde-claro",color:"#CFEEDC",variant:[],alias:[{code:"miarg-verde-claro",exclude:!1}]}]},{scope:"miarg",name:"Azul oscuro MiArgentina",group:"azul-oscuro",color:{150:"#222C50"},instance:[{name:"Azul oscuro MiArgentina",code:"miarg-oscuro",description:"",scope:"miarg",related_color:"150",parent_group:"azul-oscuro",color:"#222C50",variant:[],alias:[{code:"miarg-oscuro",exclude:!1}]}]},{scope:"miarg",name:"Gris MiArgentina",group:"gris",color:{150:"#7E848E"},instance:[{name:"Gris MiArgentina",code:"miarg-gris",description:"",scope:"miarg",related_color:"150",parent_group:"gris",color:"#7E848E",variant:[],alias:[{code:"miarg-gris",exclude:!1}]}]},{scope:"miarg",name:"Celeste claro MiArgentina",group:"celeste-claro",color:{150:"#BEE6F6"},instance:[{name:"Celeste claro MiArgentina",code:"miarg-celeste-claro",description:"",scope:"miarg",related_color:"150",parent_group:"celeste-claro",color:"#BEE6F6",variant:[],alias:[{code:"miarg-celeste-claro",exclude:!1}]}]}]},{name:"Colores de la bandera de la República Argentina",space:"bandera",hidden_space:!1,description:'De acuerdo al <a href="https://www.argentina.gob.ar/normativa/nacional/decreto-1650-2010-175328">Decreto 1650/2010</a>, que establece las medidas, características de la tela, colores y accesorios de la Bandera Argentina.',data:[{scope:"bandera",name:"Amarillo",group:"amarillo",color:{150:"#FCBF49"},instance:[{name:"Amarillo Bandera",code:"bandera-amarillo",description:"Color amarillo oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"amarillo",color:"#FCBF49",variant:[],alias:[{code:"bandera-amarillo",exclude:!1}]}]},{scope:"bandera",name:"Celeste",group:"celeste",color:{150:"#75AADB"},instance:[{name:"Celeste Bandera",code:"bandera-celeste",description:"Color celeste oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"celeste",color:"#75AADB",variant:[],alias:[{code:"bandera-celeste",exclude:!1}]}]},{scope:"bandera",name:"Marrón",group:"marron",color:{150:"#843511"},instance:[{name:"Marrón Bandera",code:"bandera-marron",description:"Color marrón oficial para la bandera Argentina",scope:"bandera",related_color:"150",parent_group:"marron",color:"#843511",variant:[],alias:[{code:"bandera-marron",exclude:!1}]}]}]},{name:"Gendarmería Nacional",space:"gna",hidden_space:!1,description:"",data:[{scope:"gna",name:"Verde jade",group:"verde-jade",color:{150:"#006666"},instance:[{name:"Verde oscuro Gendarmería",code:"gna-verde-jade",description:"",scope:"gna",related_color:"150",parent_group:"verde-jade",color:"#006666",variant:[],alias:[{code:"gna-verde-jade",exclude:!1},{code:"verde-jade",exclude:!0},{code:"verdejade",exclude:!0}]}]},{scope:"gna",name:"Verde aloe",group:"verde-aloe",color:{150:"#4FBB73"},instance:[{name:"Verde claro Gendarmería",code:"gna-verde-aloe",description:"",scope:"gna",related_color:"150",parent_group:"verde-aloe",color:"#4FBB73",variant:[],alias:[{code:"gna-verde-aloe",exclude:!1},{code:"verde-aloe",exclude:!0}]}]},{scope:"gna",name:"Verde cemento",group:"verde-cemento",color:{150:"#B4BEBA"},instance:[{name:"Gris Gendarmería",code:"gna-verde-cemento",description:"",scope:"gna",related_color:"150",parent_group:"verde-cemento",color:"#B4BEBA",variant:[],alias:[{code:"gna-verde-cemento",exclude:!1},{code:"verde-cemento",exclude:!0},{code:"verdecemento",exclude:!0}]}]}]}];"undefined"!=typeof exports&&(module.exports={ponchoColorDefinitionsList:ponchoColorDefinitionsList});class Color{constructor(e){this.isValidColorDefinitionList(e)&&(this.definitions=e)}replaceSpecialChars=e=>{if("string"!=typeof e||0===e.trim().length)return"";var t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż",a="aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz";const r=t+t.toUpperCase(),o=a+a.toUpperCase();t=new RegExp(r.split("").join("|"),"g");return e.toString().replace(t,e=>o.charAt(r.indexOf(e)))};isValidColorDefinitionList(e){return Array.isArray(e)&&0<e.length&&e[0].hasOwnProperty("space")}get list(){return this.definitions.flatMap(e=>e.data.flatMap(e=>e.instance.map(e=>e)))||[]}findColor=e=>{if("string"!=typeof e||0===e.trim().length)return[];let t=e.toLowerCase();return[...this.variables.map(([e,t])=>[e,t]),...this.colors].filter(function(e){if(e[0].includes(t))return e}).map(([e,t])=>[e,t])};get variables(){let n=[];return this.list.flatMap(e=>{const{alias:t,color:a,description:r,code:o,variant:i=[],name:s}=e;t.forEach(function(t){n.push([t.code,a,r,o,s]),i.forEach(function(e){t.exclude||n.push([t.code+"-"+e.variant,e.color,"",o,e.name])})})}),n.sort()}get spaces(){return this.definitions.map(e=>e.space).sort()}groupsBySpace=e=>{if("string"!=typeof e)throw new TypeError("groupsBySpace: El argumetno debe ser un string");const t=e.toLocaleLowerCase();e=this.definitions.find(e=>e.space==t)?.data?.map(e=>e.group);return e?e.sort():[]};ponchoColor=e=>{var t="#999999";if("string"!=typeof e)return t;const a=this.replaceSpecialChars(e).toLowerCase();e=this.variables.find(e=>e[0]===a)||this.colors.find(e=>e[0]===a);return e?e[1]:t};get colors(){return this.definitions.map(e=>e.data).flatMap(function(e){return e.flatMap(function(e){const{color:t,group:a,scope:r}=e;return Object.entries(t).map(function(e){var[e,t]=e;return[`${r}-${a}-`+e,t]})})})||[]}colorDefinitions=e=>{if(null!=typeof e&&e.trim()){const s=this.replaceSpecialChars(e).toLowerCase();let t;for(let e=0;e<=this.definitions.length-1;e+=1){var a=this.definitions[e]["data"];for(let e=0;e<=a.length-1;e+=1){var r=a[e]["instance"];for(let e=0;e<=r.length-1;e+=1){var{alias:o,variant:i}=r[e];if(o.some(e=>e.code==s)){t=r[e];break}if(i.some(e=>e.code==s)){t=r[e];break}}if(t)break}}return t}};colorGroup=(a,r)=>{if(null!=typeof r&&r?.trim()){let t;for(let e=0;e<=this.definitions.length-1;e+=1){const{data:o,space:i}=this.definitions[e];if(t=o.find(e=>e.group==r&&i==a))break}return t}};colorSpace=t=>{if(null!=typeof t&&t?.trim())return this.definitions.find(e=>e.space==t)};colorByHex=e=>{if(this.isValidHex(e)){var t=[],a=this.cleanHex(e);for(let e=0;e<=this.definitions.length-1;e+=1){var r,o=this.definitions[e]["data"];for(r of o){var i,s=r["instance"];for(i of s){var n=i["color"];this.cleanHex(n)==a&&t.push(i)}}}return t}};cleanHex=e=>{let t=e.toString().replace("#","").trim().toUpperCase();return!(t.length<3||6<t.length)&&"#"+(t=3==t.length?Array.from(t).map(e=>e.repeat(2)).join(""):t)};isValidHex=e=>{return null!=e&&"string"==typeof e&&!!new RegExp(/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/).test(e)};hexToRgb=e=>{if(this.isValidHex(e))return e=(e=this.cleanHex(e)).startsWith("#")?e.slice(1):e,[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]};colorName=(e,t={})=>{if(void 0!==e&&!(e.length<1)&&(e="string"==typeof e?[e]:e).every(e=>"string"==typeof e)){var a,r="object"==typeof t&&t.hasOwnProperty("switchLastConnector")?t.switchLastConnector:{i:"e",o:"u"},o="object"==typeof t&&t.hasOwnProperty("defaultLastConnector")?t.defaultLastConnector:"y",t="object"==typeof t&&t.hasOwnProperty("listConnector")?t.listConnector:", ";const i=t=>{var e=this.variables.find(e=>e[0]==t);return void 0!==e?e[4]:t};return 1===e.length?i(e.join("")):(a=e.length,a=e.pop(a-1),r=r[Array.from(i(a))[0].toLowerCase()]||o,(e.map(e=>i(e)).join(t)+" "+r+" "+i(a)).toLowerCase())}}}"undefined"!=typeof exports&&(module.exports={Color:Color});const illustrationColors=["arg-azul","arg-arena","arg-amarillo","arg-palta","arg-verde","arg-arandano","arg-rosado","miarg-azul"],headersBackground={solid:["bg-arg-azul","bg-arg-rojo","bg-arg-info","bg-arg-eucalipto","bg-arg-palta","bg-arg-arandano","bg-arg-negro-light"],mixed:["bg-mix-azul-info","bg-mix-info-azul","bg-mix-palta-azul","bg-mix-azul-palta"]},colorVariations={high:["arg-azul","arg-eucalipto","arg-verde","arg-naranja","arg-rojo","arg-arandano","arg-uva","arg-cielo","arg-palta","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-negro"],medium:["arg-info","arg-verde-azulado","arg-verdin","arg-amarillo","arg-tomate","arg-fucsia","arg-lavanda","arg-palta","arg-lima","arg-maiz","arg-gris-intermedio"]};var ponchoColor,color;async function fetch_json(e,t={}){t=Object.assign({},{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"},redirect:"follow"},t),e=await fetch(e,t);if(e.ok)return e.json();throw new Error("HTTP error! status: "+e.status)}void 0!==Color&&(color=new Color(ponchoColorDefinitionsList),ponchoColor=color.ponchoColor),"undefined"!=typeof exports&&(module.exports={colorVariations:colorVariations,illustrationColors:illustrationColors,headersBackground:headersBackground,color:color});const replaceSpecialChars=e=>{if("string"!=typeof e||0===e.trim().length)return"";var t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż",a="aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz";const r=t+t.toUpperCase(),o=a+a.toUpperCase();t=new RegExp(r.split("").join("|"),"g");return e.toString().replace(t,e=>o.charAt(r.indexOf(e)))},slugify=e=>{if("string"!=typeof e||0===e.trim().length)return e;const t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;";var a=new RegExp(t.split("").join("|"),"g");return e.toString().toLowerCase().replace(/\s+/g,"-").replace(a,e=>"aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------".charAt(t.indexOf(e))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},toTitleCase=(e,t=!0)=>{if("string"!=typeof e||0===e.trim().length)return e;const a=e=>e[0].toUpperCase()+e.substring(1).toLowerCase();return e=e.replace(/(^\s+|\s+$)/g,""),t?e.split(/\s+/).map(e=>a(e)).join(" "):a(e)},secureHTML=("undefined"!=typeof exports&&(module.exports={slugify:slugify,replaceSpecialChars:replaceSpecialChars,toTitleCase:toTitleCase}),(e,t=[])=>{var a;return"string"!=typeof e||0===e.trim().length?e:Array.isArray(t)?t.some(e=>"*"===e)?e:(e=e.toString().replace(/</g,"<").replace(/>/g,">"),0<t.length?(a=new RegExp("<("+t.join("|")+")(.*?)>","g"),t=new RegExp("</("+t.join("|")+")(.*?)>","g"),e.replace(a,"<$1$2>").replace(t,"</$1>")):e):void 0}),headStyle=("undefined"!=typeof exports&&(module.exports={secureHTML:secureHTML}),(a,r,o)=>{if("string"==typeof a&&""!==a.trim()||(a="argob-custom-css"),"string"==typeof r&&""!=r.trim()){var e=document.getElementById(a);if(null!==e){if(e.textContent.trim()===r.trim())return;e.remove()}document.querySelectorAll("head").forEach(e=>{var t=document.createElement("style");t.setAttribute("rel","stylesheet"),t.id=a,"string"==typeof o&&""!==o.trim()&&t.setAttribute("media",o),t.textContent=r,e.appendChild(t)})}});function copyToClipboard(e,t){if("string"==typeof e&&""!=e){const a=document.querySelector(e);a&&(e=a.textContent,navigator.clipboard.writeText(e).then(function(){"function"==typeof t&&t(a)},function(){}))}}function flattenNestedObjects(e){return e.map(e=>flattenObject(e,""))}function flattenObject(e,t){var a={};for(const i in e){var r=e[i],o=t?t+"__"+i:i;"object"==typeof r&&null!==r?Object.assign(a,flattenObject(r,o)):a[o]=r}return a}function ponchoTable(e){return ponchoTableLegacyPatch(),ponchoTableDependant(e)}"undefined"!=typeof exports&&(module.exports={flattenObject:flattenObject,flattenNestedObjects:flattenNestedObjects}),ponchoTableLegacyPatch=()=>{document.querySelectorAll("select[id=ponchoTableFiltro]").forEach(e=>{var e=e.parentElement,t=document.createElement("div");t.id="ponchoTableFiltro",t.classList.add("row"),e.parentElement.appendChild(t),e.remove()})};class PonchoAgenda{DATE_REGEX=/^([1-9]|0[1-9]|[1-2][0-9]|3[0-1])\/([1-9]|0[1-9]|1[0-2])\/([1-9][0-9]{3})$/;constructor(e={}){e.headers=this._refactorHeaders(e),e.headersOrder=this._refactorHeadersOrder(e),this.opts=Object.assign({},this.defaults,e),this.categoryTitleClassList=this.opts.categoryTitleClassList,this.itemContClassList=this.opts.itemContClassList,this.itemClassList=this.opts.itemClassList,this.groupCategory=this.opts.groupCategory,this.dateSeparator=this.opts.dateSeparator,this.startDateId=this.opts.startDateId,this.endDateId=this.opts.endDateId,this.timeId=this.opts.timeId,this.descriptionId=this.opts.descriptionId,this.criteriaOneId=this.opts.criteriaOneId,this.criteriaTwoId=this.opts.criteriaTwoId,this.criteriaThreeId=this.opts.criteriaThreeId}defaults={allowedTags:["strong","span","dl","dt","dd","img","em","button","button","p","div","h3","ul","li","time","a","h1"],criteriaOneId:"destinatarios",criteriaThreeId:"destacado",criteriaTwoId:"url",descriptionId:"descripcion",categoryTitleClassList:["h6","text-secondary"],itemContClassList:["list-unstyled"],itemClassList:["m-b-2"],dateSeparator:"/",filterStatus:{header:"Estado",nextDates:"Próximas",pastDates:"Anteriores"},endDateId:"hasta",groupCategory:"filtro-ministerio",rangeLabel:"Fechas",startDateId:"desde",timeId:"horario"};_refactorHeadersOrder=e=>{if(e.hasOwnProperty("headersOrder")&&0<e.headersOrder.length){var t=e.headersOrder;for(const a of["range","filtro-status"])e.headersOrder.includes(a)||e.headersOrder.push(a);return t}return[]};_header=e=>this.opts.headers.hasOwnProperty(e)?this.opts.headers[e]:e;_refactorHeaders=e=>{let t=this.defaults.filterStatus.header,a=(e?.filterStatus?.header&&(t=e.filterStatus.header),this.defaults.rangeLabel);return{range:a=e?.rangeLabel?e.rangeLabel:a,...e.headers,"filtro-status":t}};_isMarkdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_markdownOptions=()=>this._isMarkdownEnable()&&this.opts.hasOwnProperty("markdownOptions")&&"object"==typeof this.opts.markdownOptions?this.opts.markdownOptions:{};_markdownConverter=e=>{return this._isMarkdownEnable()?new showdown.Converter(this._markdownOptions()).makeHtml(e):e};_isPastDate=e=>{return!!this._isValidDateFormat(e)&&this._dateParser(e).date.getTime()<this._currentDate().date.getTime()};_dateTimeFormat=(e,t=!1)=>{var{day:e,month:a,year:r}=e;let o="";return[e,a,r].join(this.dateSeparator)+(o=t?[hours,minutes].join(":"):o)};_currentDate=()=>{var e=new Date,t=e.getFullYear(),a=e.getMonth()+1,e=e.getDate(),e=[this._pad(e),this._pad(a),t].join(this.dateSeparator);return{...this._dateParser(e),format:e}};_pad=(e,t=2)=>e.toString().padStart(t,"0");_dateParser=(e,t="00:00:00")=>{var a,r;if(this._isValidDateFormat(e))return[,e,a,r]=this.DATE_REGEX.exec(e),t=new Date(r+`-${a}-${e} `+t),{day:this._pad(e),month:this._pad(a),year:r,hours:this._pad(t.getHours()),minutes:this._pad(t.getMinutes()),date:t}};_isValidDateFormat=e=>{return null!==this.DATE_REGEX.exec(e)};_groupByFingerprintAndCategory=e=>{var t={};for(const o of e){var a=o[this.groupCategory],r=o["fingerprint"];t[r]||(t[r]={}),t[r][a]||(t[r][a]=[]),t[r][a].push(o)}return t};_refactorEntries=e=>{let d=[];return e.forEach(e=>{var t=e[this.startDateId];let a=e[this.endDateId];a=""===a.trim()?t:a;var{pastDates:r,nextDates:o}=this.opts.filterStatus,r=this._isPastDate(a)?r:o,o=this._dateParser(t),i=this._dateParser(a),s=o.date.getTime(),n=i.date.getTime(),l=[s,n].join("_");let c=this._dateTimeFormat(o);s!=n&&(c=`Del ${this._dateTimeFormat(o)} al `+this._dateTimeFormat(i));s={...e,range:c,"filtro-status":r,fingerprint:l,desde:t,hasta:a};d.push(s)}),d};itemTemplate=(e,t,a,r,o,i)=>{const s=document.createElement("dl");let n;return i?(o=this._dateParser(o,i),(n=document.createElement("time")).setAttribute("datetime",o.date.toISOString()),n.textContent=o.hours+":"+o.minutes+"hs."):(n=document.createElement("span")).textContent="--:--",[["Descripción",this._markdownConverter(e),!0,!0,"description"],[this._header(this.criteriaOneId),this._markdownConverter(t),!1,!0,"criteria-one"],[this._header(this.criteriaThreeId),this._markdownConverter(r),!1,!0,"criteria-three"],[this._header(this.criteriaTwoId),this._markdownConverter(a),!1,!0,"criteria-two"],[this._header(this.timeId),n.outerHTML,!1,!0,"time"]].forEach(e=>{var t,[e,a,r,o,i]=e;a&&((t=document.createElement("dt")).textContent=e,t.classList.add("agenda-item__dt","agenda-item__dt-"+i),r&&t.classList.add("sr-only"),(e=document.createElement("dd")).textContent=a,e.classList.add("agenda-item__dd","agenda-item__dd-"+i),o&&s.appendChild(t),s.appendChild(e))}),this.itemClassList.some(e=>e)&&s.classList.add("agenda-item",...this.itemClassList),s};_groupedEntries=e=>{let i=[];return Object.values(e).forEach(e=>{var o;Object.values(e).forEach(e=>{var t="",a="";const r=document.createElement("div");this.itemContClassList.some(e=>e)&&r.classList.add(...this.itemContClassList),e.forEach(e=>{a!=(o=e)[this.groupCategory]&&(a=o[this.groupCategory],t=document.createElement("p"),this.categoryTitleClassList.some(e=>e))&&(t.classList.add(...this.categoryTitleClassList),t.textContent=a,r.appendChild(t));var t=this.itemTemplate(e.descripcion,e.destinatarios,e.url,e.destacados,e.desde,e.horario);r.appendChild(t)}),t+=r.outerHTML,delete o.fingerprint;e={};e[this.descriptionId]=t,i.push({...o,...e})})}),i};_ponchoTableExists=()=>void 0!==ponchoTable;render=()=>{var e;this.opts.hasOwnProperty("jsonData")&&(e=this._refactorEntries(this.opts.jsonData),e=this._groupByFingerprintAndCategory(e),this.opts.jsonData=this._groupedEntries(e),this._ponchoTableExists())&&ponchoTable(this.opts)}}"undefined"!=typeof exports&&(module.exports=PonchoAgenda);const ponchoTableDependant=h=>{var u,m=[],g=!(!h.hasOwnProperty("wizard")||!h.wizard),l=h.hasOwnProperty("emptyLabel")&&h.emptyLabel?h.emptyLabel:"Todos",f={},o=!(!h.hasOwnProperty("orderFilter")||!h.orderFilter)&&h.orderFilter,c={},d=["*"],s=!(!h.hasOwnProperty("pushState")||1!=h.pushState),n=!(!h.hasOwnProperty("copyResults")||1!=h.copyResults),_=!1;(h.hasOwnProperty("urlParams")&&1==h.urlParams||1==n||1==s)&&(_=!0);let e={tables:!0,simpleLineBreaks:!0,extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"]};document.querySelector("#ponchoTable").classList.add("state-loading"),jQuery.fn.DataTable.isDataTable("#ponchoTable")&&jQuery("#ponchoTable").DataTable().destroy();const p=(e,t)=>e.toString().localeCompare(t.toString(),"es",{numeric:!0}),y=(e,t)=>{var a,r;if("string"==typeof t&&Array.isArray(e))return"boolean"==typeof o&&o||(a=o,{asc:a,desc:r}=Array.isArray(a)?a.reduce((e,t)=>{var[t,a="asc"]=Array.isArray(t)?t:[t,"asc"],a=a.toLowerCase();return e[["asc","desc"].includes(a)?a:"asc"].push(t),e},{asc:[],desc:[]}):{asc:[],desc:[]},Array.isArray(o)&&a.includes(t))?e.sort(p):r.includes(t)?e.sort(p).reverse():e},v=e=>[...new Set(e)],b=(e=0,t,a,r=!1)=>{var o=document.createElement("option");return o.value=a.toString().trim(),o.dataset.column=e,o.textContent=t.toString().trim(),r&&o.setAttribute("selected","selected"),o},C=(e="")=>e.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x=e=>e<=0?0:e,E=()=>[...document.querySelectorAll("[data-filter]")].map(e=>e.value),A=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter")),a=()=>h.hasOwnProperty("markdownOptions")&&"object"===h.markdownOptions?h.markdownOptions:e,w=t=>{if("string"==typeof t){if(!A())return t;let e;return a().extensions.every(e=>{try{return showdown.extension(e),!0}catch(e){return!1}})?(e=new showdown.Converter(a())).makeHtml(t):(e=new showdown.Converter).makeHtml(t)}},k=(e,t)=>{var a=document.createElement("a");return a.classList.add("btn","btn-primary","btn-sm","margin-btn"),a.href=t,a.target="_blank",a.textContent=e,a.title="Abre en una nueva ventana",a.setAttribute("aria-label",e),a.setAttribute("rel","noopener noreferrer"),a.outerHTML},S=e=>{var t=e.split("/"),t=new Date(t[2],t[1]-1,t[0]).toISOString().split("T")[0],a=document.createElement("span"),r=(a.style.display="none",a.textContent=t,document.createElement("time"));return r.setAttribute("datetime",t),r.textContent=e,a.outerHTML+r.outerHTML},j=e=>replaceSpecialChars(e.toLowerCase()),T=(n,l,c)=>{l=l==m.length?l-1:l;const d=E();var e=u.entries.flatMap(e=>{t=n,a=e,r=c,o=d;var t,a,r,o,i=[...Array(x(t+1)).keys()].map(e=>a[m[x(t-1)]]==o[x(t-1)]&&a[m[x(t)]]==r||""==o[x(t-1)]).every(e=>e);if(e[m[x(l-1)]]==c&&i){const s=e[m[x(l)]];return L(l,f)?F(l).filter(e=>j(s).includes(j(e))):s}}).filter(e=>e);return y(v(e),m[l])},L=e=>{var t=Object.keys(f);return!!c.hasOwnProperty("filtro-"+t[e])},F=e=>{var t=Object.keys(f);return c.hasOwnProperty("filtro-"+t[e])?c["filtro-"+t[e]]:[]},O=(t,r)=>{var o=Object.keys(f);const i=E();for(let a=t+1;a<=o.length&&o.length!=a;a++){let e=T(t,a,r);0==e.length&&(e=((a,r,o)=>{var e=u.entries.flatMap(e=>{const t=e[m[x(r)]];return(e[m[x(a)]]==o||""==o)&&(L(r,f)?F(r).filter(e=>j(t).includes(j(e))):t)}).filter(e=>e);return y(v(e),m[r])})(t,a,r));const s=document.querySelector("#"+o[a]);s.innerHTML="",s.appendChild(b(a,l,"",!0)),e.forEach(e=>{var t;e.trim()&&(t=i[a]==e,s.appendChild(b(a,e,e,t)))})}},P=()=>{return window.location.hash.replace("#","")||!1};function D(e,a,r){document.querySelectorAll("#"+e).forEach(t=>{setTimeout(function(){t.value=a;var e=new Event(r);t.dispatchEvent(e)},50)})}function M(){if(_){const r=new URL(window.location.pathname,window.location.origin);var e=[...m.map(e=>e.replace("filtro-","")),"ponchoTableSearch"].map(function(e){var t=document.getElementById(e);return t?[e,t.value]:[]});if(e.some(e=>0<e.length)){if(e.some(e=>0<e[1].length)){if(n){try{document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove())}catch(e){}var t=document.createElement("div"),a=(t.id="ponchoTableShareButton",t.innerHTML=`<div class="dropdown">
|
|
2
|
+
<button
|
|
3
|
+
class="btn btn-sm btn-default dropdown-toggle"
|
|
4
|
+
type="button"
|
|
5
|
+
id="share-table-data"
|
|
6
|
+
data-toggle="dropdown"
|
|
7
|
+
aria-haspopup="true"
|
|
8
|
+
aria-expanded="false">
|
|
9
|
+
Compartir resultados
|
|
10
|
+
<span class="caret"></span>
|
|
11
|
+
</button>
|
|
12
|
+
<div
|
|
13
|
+
class="dropdown-menu p-y-1 p-x-1"
|
|
14
|
+
aria-labelledby="share-table-data">
|
|
15
|
+
<p class="js-sharelink-tag m-b-0 small" id="foo"></p>
|
|
16
|
+
<a
|
|
17
|
+
href="#" data-toclipboard="foo"
|
|
18
|
+
class="small btn btn-sm btn-default m-b-0 m-t-1">
|
|
19
|
+
Copiar al portapapeles</a>
|
|
20
|
+
</div>
|
|
21
|
+
</div>`,document.querySelector("#ponchoTable_info")),a=a.parentElement;a.classList.add("share"),a.appendChild(t),headStyle("ponchoTable-share-button",".share{display:flex;gap:1.5em;align-items:baseline}.share .dropdown-menu{min-width:250px}"),"function"==typeof copyToClipboard&&document.querySelectorAll("[data-toclipboard]").forEach(e=>{const t=e.dataset.toclipboard;e.addEventListener("click",e=>{e.preventDefault(),copyToClipboard("#"+t)})})}}else document.querySelectorAll("#ponchoTableShareButton").forEach(e=>e.remove());e.forEach(e=>{var[e,t]=e,e="ponchoTableSearch"==e?"buscar":e;""!=t.trim()&&r.searchParams.append(e,t)}),document.querySelectorAll(".js-sharelink-tag").forEach(function(e){e.innerHTML="";var t=e.dataset.label,a=document.createElement("a"),t=(a.href=r.href,t||r.href);a.textContent=t,e.appendChild(a)}),document.querySelectorAll(".js-sharelink-text").forEach(function(e){var t=e.dataset.attr;t?e.setAttribute(t,r.href):e.innerHTML=r.href}),a=r.href,s&&window.history.pushState({},"",a)}}}_hideTable=(e=!0)=>{const t=e?"none":"block",a=e?"block":"none";document.querySelectorAll('[data-visible-as-table="true"],#ponchoTable_wrapper').forEach(e=>e.style.display=t),document.querySelectorAll('[data-visible-as-table="false"]').forEach(e=>e.style.display=a)},_responsiveType=function(e){if("string"==typeof e){e=e.toLowerCase();if(["none","column","inline"].includes(e))return e}},_responsiveColumns=function(e){if(Array.isArray(e)&&e.every(e=>"number"==typeof e)){var e=[...new Set(e)],t=e.indexOf(0);-1!==t&&e.splice(t,1);if(!(e.length<1))return e}},_responsiveCols=function(e,t,a="none"){return(e=_responsiveColumns(e))?{className:_responsiveType(a),orderable:"boolean"==typeof t&&t,targets:e}:{}};const q=()=>{var e,t,a,r=jQuery.fn.DataTable.ext.type.search,r=(r.string=e=>e?"string"==typeof e?replaceSpecialChars(e):e:"",{initComplete:(e,t)=>{g&&_hideTable()},lengthChange:!(r.html=e=>e?"string"==typeof e?replaceSpecialChars(e.replace(/<.*?>/g,"")):e:""),autoWidth:!1,pageLength:h.cantidadItems,columnDefs:[{type:"html-num",targets:h.tipoNumero},{targets:h.ocultarColumnas,visible:!1}],ordering:h.orden,order:[[h.ordenColumna-1,h.ordenTipo]],dom:'<"row"<"col-sm-6"l><"col-sm-6"f>><"row"<"col-sm-12"i>><"row"<"col-sm-12"tr>><"row"<"col-md-offset-3 col-md-6 col-sm-offset-2 col-sm-8"p>>',language:{sProcessing:"Procesando...",sLengthMenu:"Mostrar _MENU_ registros",sZeroRecords:"No se encontraron resultados",sEmptyTable:"Ningún dato disponible en esta tabla",sInfo:"_TOTAL_ resultados",sInfoEmpty:"No hay resultados",sInfoFiltered:"",sInfoPostFix:"",sSearch:"Buscar:",sUrl:"",sInfoThousands:".",sLoadingRecords:"Cargando...",oPaginate:{sFirst:"<<",sLast:">>",sNext:">",sPrevious:"<"},oAria:{sSortAscending:": Activar para ordenar la columna de manera ascendente",sSortDescending:": Activar para ordenar la columna de manera descendente",paginate:{first:"Ir a la primera página",previous:"Ir a la página anterior",next:"Ir a la página siguiente",last:"Ir a la última página"}}}});void 0!==h.columnsWidth&&h.columnsWidth&&(r.columnDefs=r.columnDefs.concat(function(e){if(!Array.isArray(e))return[];const a=/(?<value>[0-9]+)(?<measure>\%|px|em|rem|pt)/;return e.map(e=>{var[e=!1,t=!1]=e;if(a.test(e))return"number"!=typeof t?{width:e}:{width:e,targets:t}}).filter(e=>e)}(h.columnsWidth))),void 0!==h.responsiveDetailsColumns&&0<h.responsiveDetailsColumns.length&&(o=_responsiveCols(h.responsiveDetailsColumns,h.responsiveDetailsOrderable,h.responsiveDetailsType),e=h.responsivePriorities,e=Array.isArray(e)?e.map(e=>{var[e=!1,t=!1]=e;if("number"==typeof e)return"number"!=typeof t?{responsivePriority:e}:{responsivePriority:e,targets:t}}).filter(e=>e):[],r.columnDefs=r.columnDefs.concat(o,e),r.responsive=!0);let d=jQuery("#ponchoTable").DataTable(r);jQuery("#ponchoTableSearch").keyup(function(){d.search(jQuery.fn.DataTable.ext.type.search.string(this.value)).draw(),M()}),jQuery("#ponchoTable_filter").parent().parent().remove(),1<document.querySelectorAll("#ponchoTableFiltro option").length&&(document.querySelector("#ponchoTableFiltroCont").style.display="block");const p=e=>{e=document.querySelectorAll(e+" option");return Object.values(e).map(e=>e.value).some(e=>e)};if(jQuery("select[data-filter]").change(function(){var e=jQuery(this).find("option:selected").data("column"),t=jQuery(this).find("option:selected").val();O(e,t),d.columns().search("").columns().search("").draw();const i=Object.keys(f),s=E();if(s.forEach((e,t)=>{a=i[t];var a=Object.keys(u.headers).indexOf("filtro-"+a),r=C(s[t]),o=C(replaceSpecialChars(s[t]));L(t,f)?d.columns(a).search(j(s[t])):d.columns(a).search(s[t]?`^(${r}|${o})$`:"",!0,!1,!0)}),d.draw(),window.addEventListener("popstate",e=>{}),g){var[n,l=0,c=""]=[i,e,t];let o=!1;n.forEach((e,t)=>{var a=p("#"+e);let r="none";a&&c&&t<=l+1?r="block":a&&!c&&t<=l+1&&(document.querySelectorAll("#"+n[l+1]).forEach(e=>e.innerHTML=""),r="block",o=!1),document.querySelectorAll(`[data-filter-name="${e}"]`).forEach(e=>e.style.display=r)}),(o=p("#"+n[l])&&c&&!p("#"+n[l+1])?!0:o)?_hideTable(!1):_hideTable()}M()}),h.hasOwnProperty("hash")&&h.hash){var o=P();const l=o?decodeURIComponent(o):"";document.querySelectorAll("#ponchoTableSearch").forEach(e=>{e.value=l,d.search(jQuery.fn.DataTable.ext.type.search.string(l)).draw()})}if(_){var i=new URLSearchParams(window.location.search);for(const c of i.keys()){var s=i.get(c),n=(t=m,a=c,n=void 0,null!==(n=new RegExp("filter(?<index>(?:[1-9][0-9]|[1-9]))","").exec(a))&&void 0!==(t=t.map(e=>e.replace("filtro-",""))[n.groups.index-1])?t:a);if(""==s.trim())return;"buscar"==c?D("ponchoTableSearch",s,"keyup"):D(n,s,"change")}}},r=e=>{var n;(u=e).entries="function"==typeof h.refactorEntries&&null!==h.refactorEntries?h.refactorEntries(u.entries):u.entries,u.headers=(h.hasOwnProperty("headers")&&h.headers?h:u).headers,u.headers=(e=>{if(h.hasOwnProperty("headersOrder")&&0<h.headersOrder.length){var t={};for(i of h.headersOrder)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}return e})(u.headers,h.headersOrder),m=Object.keys(u.headers).filter(e=>e.startsWith("filtro-")),c=h.asFilter?h.asFilter(u.entries):{},f=((o,i)=>{let s={};return i.forEach((t,a)=>{let e=[];e=c.hasOwnProperty(i[a])?c[i[a]]:o.entries.map(e=>e[t]);var r=y(v(e),t);t=t.replace("filtro-",""),s[t]=[],r.forEach(e=>{s[t].push({columna:a,value:e})})}),s})(u,m),h.hasOwnProperty("filterContClassList")&&h.filterContClassList&&((e=document.getElementById("ponchoTableFiltroCont")).removeAttribute("class"),e.classList.add(...h.filterContClassList)),h.hasOwnProperty("searchContClassList")&&h.searchContClassList&&((e=document.getElementById("ponchoTableSearchCont")).removeAttribute("class"),e.classList.add(...h.searchContClassList));{var s=u;(e=document.querySelector("#ponchoTable thead")).innerHTML="";const r=document.createElement("tr"),t=(Object.keys(s.headers).forEach((e,t)=>{var a=document.createElement("th");a.textContent=s.headers[e],a.setAttribute("scope","col"),r.appendChild(a)}),e.appendChild(r),(e=document.querySelector("#ponchoTable caption")).innerHTML="",e.textContent=h.tituloTabla,document.querySelector("#ponchoTable tbody"));t.innerHTML="",s.entries.forEach((o,e)=>{if(Object.values(o).some(e=>String(e).trim())){o="function"==typeof h.customEntry&&null!==h.customEntry?h.customEntry(o):o;const i=t.insertRow();i.id="id_"+e,Object.keys(s.headers).forEach(e=>{let t=o[e];e.startsWith("btn-")&&""!=t?(a=e.replace("btn-","").replace("-"," "),t=k(a,t)):e.startsWith("fecha-")&&""!=t&&(t=S(t));var a=i.insertCell();a.dataset.title=s.headers[e],""==t&&(a.className="hidden-xs");let r=h.hasOwnProperty("allowedTags")?h.allowedTags:d;e.startsWith("btn-")&&""!=t?r=[...r,"a"]:e.startsWith("fecha-")&&""!=t&&(r=[...r,"span","time"]);e=secureHTML(t,r);A()?a.innerHTML=w(e):a.innerHTML=e})}})}n=u,document.querySelectorAll("#ponchoTableFiltro").forEach(e=>e.innerHTML=""),Object.keys(f).forEach((e,t)=>{const a=f[e][0].columna||0;var r=f[e].map(e=>e.value),r=y(r,e),o=document.createElement("div"),i=(h.hasOwnProperty("filterClassList")?(i="string"==typeof h.filterClassList?h.filterClassList.split(" "):h.filterClassList,o.classList.add(...i)):(i=Math.floor(12/Object.keys(f).length),o.classList.add("col-sm-12","col-md-"+i)),o.dataset.index=t,o.dataset.filterName=e,g&&0<t&&(o.style.display="none"),document.createElement("div")),t=(i.className="form-group",document.createElement("label"));t.setAttribute("for",e),t.textContent=n.headers["filtro-"+e];const s=document.createElement("select");s.classList.add("form-control"),s.dataset.filter=1,s.name=e,s.id=e,s.appendChild(b(a,l,"",!0)),r.forEach(e=>{e&&s.appendChild(b(a,e,e,!1))}),i.appendChild(t),i.appendChild(s),o.appendChild(i),document.querySelector("#ponchoTableFiltro").appendChild(o)}),document.querySelector("#ponchoTableSearchCont").style.display="block",document.querySelector("#ponchoTable").classList.remove("state-loading"),q(),M(),setTimeout(()=>{document.querySelectorAll('[id^="dt-search-"], #ponchoTable_filter').forEach(e=>{e.closest(".row").remove()})},300)},t=e=>{jQuery.getJSON(e,function(e){var t=new GapiSheetData;u=t.json_data(e),r(u)})};if(h.jsonData){var B=Object.fromEntries(Object.keys(h.jsonData[0]).map(e=>[e,e])),B={entries:h.jsonData,headers:B};r(B)}else if(h.jsonUrl)t(h.jsonUrl);else if(h.hojaNombre&&h.idSpread){B=(new GapiSheetData).url(h.hojaNombre,h.idSpread);t(B)}else{if(!h.hojaNumero||!h.idSpread)throw"¡Error! No hay datos suficientes para crear la tabla.";{var z=h.hojaNumero;const I=new GapiSheetData;B=["https://sheets.googleapis.com/v4/spreadsheets/",h.idSpread,"/?alt=json&key=",I.gapi_key].join("");jQuery.getJSON(B,function(e){e=e.sheets[z-1].properties.title,e=I.url(e,h.idSpread);t(e)})}}};var content_popover=document.getElementById("content-popover");function popshow(){content_popover.classList.toggle("hidden")}function pophidde(){content_popover.classList.add("hidden")}var ponchoUbicacion=function(e){var a,r,o,i,s,n,t="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geoprovincias.json",l="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geomunicipios.json",c="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geolocalidades.json",d=jQuery('input[name="submitted['+e.provincia+']"]'),p=jQuery('input[name="submitted['+e.municipio+']"]'),h=jQuery('input[name="submitted['+e.localidad+']"]');function u(e,t,a,r=!1,o=!1,i=!1){var s=jQuery("<select></select>").attr("id",t).attr("name",e).addClass("form-control form-select").prop("required",r);return o&&s.append("<option value=''>Seleccione una opción</option>"),jQuery.each(a,function(e,t){let a="";i==t.nombre&&(a=' selected="selected"');var r=t.label||t.nombre;s.append(`<option value="${t.id}"${a}>${r}</option>`)}),s}function m(e,t){var a=p.prop("required");return d.val()?u("sMunicipios","sMunicipios",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption=!1,p.val()):u("sMunicipios","sMunicipios",[],a,!0,!1)}function g(e,t){var a=h.prop("required");return d.val()?u("sLocalidades","sLocalidades",e.filter(function(e){return String(e.provincia.id)==String(t)}).sort(function(e,t){e=e.label.toUpperCase(),t=t.label.toUpperCase();return e.localeCompare(t)}),a,emptyOption=!!h.val(),h.val()):u("sLocalidades","sLocalidades",[],a,!0,!1)}t=e.urlProvincias||t,l=e.urlMunicipios||l,c=e.urlLocalidades||c,jQuery.getJSON(t,function(e){var t;a=[],e.provincias.forEach(function(e,t){a.push(e)}),e=[],e=(t=a).sort(function(e,t){e=e.nombre.toUpperCase(),t=t.nombre.toUpperCase();return e.localeCompare(t)}),t=d.prop("required"),(i=u("sProvincias","sProvincias",e,t,!0,d.val())).on("change",function(e){var t;d.val(""),p.val(""),h.val(""),s.children("option:not(:first)").remove(),n.children("option:not(:first)").remove(),""!=i.val()&&(p.val(s.find(":selected").text()),d.val(i.find(":selected").text()),t=m(r,i.val()).find("option"),s.append(t),s.val(""),t=g(o,i.val()).find("option"),n.append(t),n.val(""))}),d.after(i),jQuery(i).select2()}),jQuery.getJSON(l,function(e){r=function(e){e=e.municipios.reduce((e,t)=>{var a=""+t.nombre_completo;return e[t.label=a]||(e[a]=t),e},{});return Object.values(e)}(e),(s=m(r,i.val())).on("change",function(e){p.val(""),""!=s.val()&&p.val(s.find(":selected").text())}),p.after(s),jQuery(s).select2()}),jQuery.getJSON(c,function(e){o=function(e){e=e.localidades.reduce((e,t)=>{var a=t.departamento.nombre+" - "+t.nombre;return e[t.label=a]||(e[a]=t),e},{});return Object.values(e)}(e),(n=g(o,i.val())).on("change",function(e){h.val(""),""!=n.val()&&h.val(n.find(":selected").text())}),h.after(n),jQuery(n).select2()}),d.hide(),p.hide(),h.hide()};function ponchoChart(t){"use strict";var e;function fe(e){var t={Line:"line",Bar:"bar",Pie:"pie",Area:"line","Horizontal Bar":"horizontalBar","Stacked Bar":"bar",Mixed:"mixed",HeatMap:"heatmap",default:""};return t[e]||t.default}function _e(e){var e=e.toString().replace(".",","),t=e.split(","),a=new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(t[0]);return e=1<t.length?a.concat(",",t[1].substr(0,2)):a}function a(e,r){var I,t,a,P,o,i,q,z,H,s,n,N,G,l,c,R,$,V,d,p,U,h,Q,u,W,m,g=[],f=[],_=[],J=[],y=[],v=[],b=[],C=[],x=0,E="",Z=[],A=0,w=[],Y=[],X=0,k=r.posicionLeyendas||"top",S="",S=void 0===r.mostrarLeyendas||r.mostrarLeyendas,j="",j=void 0===r.mostrarTotalStacked||r.mostrarTotalStacked,T=fe(r.tipoGrafico),L=e.values;if(jQuery.each(Object.keys(L[0]),function(e,t){var a;"eje-y"==L[0][e].substr(0,5)?(a=(a=L[0][e].split("-"))[0]+a[1],f.push(a),_.push(e)):"nombre-corto"==L[0][e]&&"heatmap"==T&&(X=e)}),jQuery.each(L,function(i,e){var r;0==i&&jQuery.each(_,function(e,t){var a,r,o=/(?<axis>eje-(x|y(?:[1-9]|[1-9][0-9])))-(?<color>[\w-]*?)(?:-(?<type>linea|barra))?$/.exec(L[i][_[e]]);o&&(a=o.groups.type,r=o.groups.axis.replace("-",""),b[r]=[],J.push(o.groups.color),"mixed"==T)&&(a&&("barra"==a||"linea"==a)?Z.push(a):(0==e&&Z.push("barra"),1==e&&Z.push("linea")))}),1==i&&jQuery.each(_,function(e,t){"pie"==T||"heatmap"==T?g.push(L[i][_[e]]):(v.push(L[i][_[e]]),x+=1)}),1<i&&(r=!1,jQuery.each(_,function(e,t){var a=L[0][_[e]].split("-"),a=a[0]+a[1];"pie"==T?b[a].push(L[i][_[e]]):"heatmap"==T?(0==r&&(v.push(L[i][0]),r=!0,x+=1),e!=X&&b[a].push(L[i][_[e]]),e+2==X&&(void 0===L[i][e+2]?Y.push("*"):Y.push(L[i][e+2]))):(0==r&&(g.push(L[i][0]),r=!0),b[a].push(L[i][_[e]]))}))}),"pie"==T?(I=[],jQuery.each(Object.keys(f),function(e,t){e=f[e];b.hasOwnProperty(e)&&I.push(b[e])}),C=I):1==x&&jQuery.each(Object.keys(f),function(e,t){e=f[e];b.hasOwnProperty(e)&&(C=b[e])}),"mixed"==T&&0<(t=r.porcentajesMixed||"").length&&(w=t.split(",")),E=1==r.porcentajes?"line"==T&&1<x?{enabled:!0,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}},mode:"index",intersect:!1}:"pie"==T?{enabled:!0,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a+"%"}}}:"Stacked Bar"==r.tipoGrafico?1==j?{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a+"%"}}}:"line"==T&&1<x?{enabled:!0,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}},mode:"index",intersect:!1}:"pie"==T?{enabled:!0,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.labels[e.index]+": "+a}}}:"Stacked Bar"==r.tipoGrafico&&1<x?1==j?{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a},footer:(e,t)=>{e=e.reduce((e,t)=>e+parseFloat(t.yLabel),0);return"Total: "+new Intl.NumberFormat("es-AR",{maximumFractionDigits:2}).format(e)}}}:{enabled:!0,mode:"index",intersect:!1,callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}}:{enabled:!0,mode:"index",callbacks:{label:function(e,t){var a=_e(t.datasets[e.datasetIndex].data[e.index]);return t.datasets[e.datasetIndex].label+": "+a}}},"pie"==T&&(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),t=g,j=C,H=T,s=y,a=r.idComponenteGrafico,N=k,G=E,n=S,a=document.getElementById(a),new Chart(a,{type:H,data:{labels:t,datasets:[{data:j,borderColor:s,backgroundColor:s,borderWidth:2}]},options:{legend:{display:n,position:N},responsive:!0,tooltips:G}})),1==x&&(a=ponchoColor(J[0]),"Line"==r.tipoGrafico&&(H=g,j=C,s=T,n=a,N=v[0],G=r.ejeYenCero,l=r.idComponenteGrafico,c=k,R=E,$=S,l=document.getElementById(l),new Chart(l,{type:s,data:{labels:H,datasets:[{data:j,borderColor:n,backgroundColor:n,borderWidth:2,lineTension:0,fill:!1,label:N}]},options:{legend:{display:$,position:c},tooltips:R,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:G}}]}}})),"bar"!=T&&"Area"!=r.tipoGrafico||(l=g,j=C,$=T,c=a,R=v[0],P=r.ejeYenCero,o=r.idComponenteGrafico,i=k,q=E,z=S,o=document.getElementById(o),new Chart(o,{type:$,data:{labels:l,datasets:[{data:j,borderColor:c,backgroundColor:c,borderWidth:2,lineTension:0,label:R}]},options:{legend:{display:z,position:i},tooltips:q,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:P}}]}}})),"horizontalBar"==T)&&(o=g,j=C,z=T,i=a,q=v[0],P=r.ejeYenCero,F=r.idComponenteGrafico,oe=k,ie=E,ee=S,F=document.getElementById(F),new Chart(F,{type:z,data:{labels:o,datasets:[{data:j,borderColor:i,backgroundColor:i,borderWidth:2,lineTension:0,label:q}]},options:{legend:{display:ee,position:oe},tooltips:ie,responsive:!0,scales:{xAxes:[{ticks:{beginAtZero:P}}]}}})),1<x)if("heatmap"==T)if(void 0!==r.heatMapColors&&""!=r.heatMapColors&&void 0!==r.heatMapColorsRange&&""!=r.heatMapColorsRange){for(var K=[],F="labelFila",j="labelColumna",ee="labelValor",te=(void 0!==r.datosTooltip&&0<r.datosTooltip.length&&(void 0!==r.datosTooltip[0]&&void 0!==r.datosTooltip[0].labelFila&&(F=r.datosTooltip[0].labelFila),void 0!==r.datosTooltip[1]&&void 0!==r.datosTooltip[1].labelColumna&&(j=r.datosTooltip[1].labelColumna),void 0!==r.datosTooltip[2])&&void 0!==r.datosTooltip[2].labelValor&&(ee=r.datosTooltip[2].labelValor),jQuery.each(Object.keys(f),function(e,t){e=f[e];b.hasOwnProperty(e)&&(C=b[e],K.push(C))}),[]),O=0;O<v.length;O++){for(var e=[],ae=0;ae<g.length;ae++){C={x:g[ae],y:parseInt(K[ae][O])};e.push(C)}te.push({name:("*"!=Y[O]?Y:v)[O],data:e})}for(var re=[],O=0;O<r.heatMapColorsRange.length-1;O++){e={from:r.heatMapColorsRange[O],to:r.heatMapColorsRange[O+1],color:ponchoColor(r.heatMapColors[O])};re.push(e)}var oe="",oe=void 0===r.mostrarEjeY||r.mostrarEjeY,ie=te,se=r.idComponenteGrafico,ne=v,le=re,ce=F,de=j,pe=ee,j=r.tituloGrafico,D=oe,he=k,ue=S,se=document.getElementById(se),me=(new ApexCharts(se,{series:ie,chart:{height:650,type:"heatmap"},dataLabels:{enabled:!1},title:{text:j},tooltip:{custom:function({series:e,seriesIndex:t,dataPointIndex:a,w:r}){e=_e(e[t][a]);return'<div class="arrow_box"><span>'+ce+": "+ne[t]+"<br>"+de+": "+r.globals.labels[a]+"<br>"+pe+": "+e+"</span></div>"}},plotOptions:{heatmap:{shadeIntensity:.5,radius:0,useFillColorAsStroke:!1,colorScale:{ranges:le}}},yaxis:{show:D},legend:{show:ue,position:he},responsive:[{breakpoint:1e3,options:{yaxis:{show:!1},legend:{show:ue,position:"top"}}}]}).render(),document.getElementsByClassName("apexcharts-toolbar"));for(let e=0;e<me.length;e++)me[e].style.display="none"}else void 0!==r.heatMapColors&&r.heatMapColors,void 0!==r.heatMapColorsRange&&r.heatMapColorsRange;else{var M=[],B=0,ge=(J.forEach(function(e,t,a){y.push(ponchoColor(e))}),0);jQuery.each(Object.keys(f),function(e,t){var a,e=f[e];b.hasOwnProperty(e)&&(C=b[e],"Line"==r.tipoGrafico?a={label:v[B],data:C,borderColor:y[B],fill:!1,borderWidth:2,lineTension:0,backgroundColor:y[B]}:"Bar"==r.tipoGrafico||"Area"==r.tipoGrafico||"Horizontal Bar"==r.tipoGrafico||"Stacked Bar"==r.tipoGrafico?a={label:v[B],data:C,borderColor:y[B],backgroundColor:y[B],borderWidth:2,lineTension:0}:"Mixed"==r.tipoGrafico&&("barra"==(e=Z[ge])?a={label:v[B],data:C,backgroundColor:y[B],yAxisID:"left-y-axis",type:"bar"}:"linea"==e&&(a={label:v[B],data:C,borderColor:y[B],backgroundColor:y[B],type:"line",yAxisID:"right-y-axis",fill:!1})),M.push(a),B+=1,ge+=1)}),"mixed"==T&&(2==w.length?A=2:1==w.length?"eje-y1"==w[0]?A=0:"eje-y2"==w[0]&&(A=1):A=3),"Stacked Bar"==r.tipoGrafico?(se=g,j=T,le=M,D=r.idComponenteGrafico,he=r.ejeYenCero,ue=k,w=E,W=S,D=document.getElementById(D),new Chart(D,{type:j,data:{labels:se,datasets:le},options:{legend:{display:W,position:ue,labels:{textAlign:"center"}},tooltips:w,responsive:!0,scales:{yAxes:[{ticks:{beginAtZero:he},stacked:!0}],xAxes:[{stacked:!0}]}}})):"Mixed"==r.tipoGrafico?(j=g,W="bar",w=M,d=r.idComponenteGrafico,p=r.ejeYenCero,U=k,h=A,A=v[0],Q=v[1],u=S,d=document.getElementById(d),new Chart(d,{type:W,data:{labels:j,datasets:w},options:{legend:{display:u,position:U,labels:{textAlign:"center"}},tooltips:{enabled:!0,mode:"single",callbacks:{label:function(e,t){var a="",r=((2==h||e.datasetIndex==h)&&(a="%"),_e(e.yLabel));return t.datasets[e.datasetIndex].label+": "+r+" "+a}}},responsive:!0,scales:{yAxes:[{id:"left-y-axis",type:"linear",position:"left",ticks:{beginAtZero:p,callback:function(e){return e+(1!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:Q,fontColor:"black"}},{id:"right-y-axis",type:"linear",position:"right",ticks:{beginAtZero:p,callback:function(e){return e+(0!=h&&2!=h?"":"%")}},scaleLabel:{display:!0,labelString:A,fontColor:"black"}}]}}})):"Horizontal Bar"==r.tipoGrafico?(d=g,j=T,w=M,u=r.idComponenteGrafico,U=r.ejeYenCero,Q=k,p=E,A=S,u=document.getElementById(u),new Chart(u,{type:j,data:{labels:d,datasets:w},options:{legend:{display:A,position:Q,labels:{textAlign:"center"}},tooltips:p,responsive:!0,maintainAspectRatio:!0,scales:{xAxes:[{ticks:{beginAtZero:U}}]}}})):(j=g,w=T,A=M,m=r.idComponenteGrafico,V=r.ejeYenCero,k=k,E=E,S=S,m=document.getElementById(m),new Chart(m,{type:w,data:{labels:j,datasets:A},options:{legend:{display:S,position:k,labels:{textAlign:"center"}},tooltips:E,responsive:!0,maintainAspectRatio:!0,scales:{yAxes:[{ticks:{beginAtZero:V}}]}}}))}""!=r.tituloGrafico&&void 0!==r.tituloGrafico&&(m=r.idTagTituloGrafico,w=r.tituloGrafico,document.getElementById(m))&&(document.getElementById(m).innerHTML=w)}!function(e){var t=!1;(e.idSpread&&e.hojaNombre||e.jsonUrl||e.jsonInput)&&void 0!==e.tipoGrafico&&""!=e.tipoGrafico&&void 0!==e.idComponenteGrafico&&""!=e.idComponenteGrafico&&""!=fe(e.tipoGrafico)&&(t=!0);return t}(t)?(void 0!==t.idSpread&&t.idSpread,void 0!==t.hojaNombre&&t.hojaNombre,void 0!==t.tipoGrafico&&t.tipoGrafico,void 0!==t.idComponenteGrafico&&t.idComponenteGrafico,fe(t.tipoGrafico)):t.jsonInput?a(jQuery.parseJSON(t.jsonInput),t):(e=t.jsonUrl||"https://sheets.googleapis.com/v4/spreadsheets/"+t.idSpread+"/values/"+t.hojaNombre+"?alt=json&key=AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",jQuery.getJSON(e,function(e){a(e,t)}))}const gapi_legacy=e=>{if(!e||!e.values||0===e.values.length)throw new TypeError("Invalid response format");if(!Array.isArray(e.values)||!Array.isArray(e.values[0]))throw new TypeError("Invalid response format: values should be arrays");const i=e.values[0],s=/ |\/|_/gi;let n=[];return e.values.forEach((e,t)=>{if(0<t){var a={};for(const o in i){var r=e.hasOwnProperty(o)?e[o].trim():"";a["gsx$"+i[o].toLowerCase().replace(s,"")]={$t:r}}n.push(a)}}),{feed:{entry:n}}};"undefined"!=typeof exports&&(module.exports=gapi_legacy);class PonchoMap{constructor(e,t){var a={error_reporting:!0,no_info:!1,title:!1,id:"id",id_mixing:[],template:!1,template_structure:{container_classlist:["info-container"],definition_classlist:[],definition_list_classlist:["definition-list"],definition_list_tag:"dl",definition_tag:"dd",term_classlist:["h6","m-b-0"],term_tag:"dt",title_classlist:["h4","pm-color-primary","m-t-0"]},fit_bounds_onevent:!0,allowed_tags:[],template_innerhtml:!1,template_markdown:!1,theme_ui:!1,theme_map:!1,theme_tool:!0,map_opacity:1,map_background:"#DDD",theme:"default",default_themes:[["default","Original"],["contrast","Alto contraste"],["dark","Oscuro"],["grayscale","Gris"],["relax","Relax"]],markdown_options:{extensions:["details","images","alerts","numbers","ejes","button","target","bootstrap-tables","video"],simpleLineBreaks:!0,tables:!0},render_slider:!0,scope:"",slider:!1,scroll:!1,hash:!1,headers:{},header_icons:[],content_selector:!1,map_selector:"map",anchor_delay:0,slider_selector:".slider",map_view:[-40.44,-63.59],map_anchor_zoom:16,map_zoom:4,min_zoom:2,map_init_options:{},reset_zoom:!0,latitud:"latitud",longitud:"longitud",marker:"azul",tooltip:!1,tooltip_options:{permanent:!1,className:"leaflet-tooltip-own",direction:"auto",offset:[13,-18],sticky:!1,opacity:1},marker_cluster_options:{spiderfyOnMaxZoom:!0,showCoverageOnHover:!1,zoomToBoundsOnClick:!0,maxClusterRadius:30,spiderfyDistanceMultiplier:.5,spiderLegPolylineOptions:{weight:1,color:"#666666",opacity:.5,"fill-opacity":.5}},accesible_menu_extras:[{text:"Ayudá a mejorar el mapa",anchor:"https://www.argentina.gob.ar/sugerencias"}]},r=Object.assign({},a,t);this.error_reporting=r.error_reporting,this.scope=r.scope,this.render_slider=r.render_slider,this.template=r.template,this.template_structure={...a.template_structure,...t.template_structure},this.template_innerhtml=r.template_innerhtml,this.template_markdown=r.template_markdown,this.markdown_options=r.markdown_options,this.allowed_tags=r.allowed_tags,this.map_selector=r.map_selector,this.headers=this.setHeaders(r.headers),this.header_icons=r.header_icons,this.hash=r.hash,this.scroll=r.scroll,this.fit_bounds_onevent=r.fit_bounds_onevent,this.map_view=r.map_view,this.map_init_options=r.map_init_options,this.anchor_delay=r.anchor_delay,this.map_zoom=r.map_zoom,this.min_zoom=r.min_zoom,this.map_anchor_zoom=r.map_anchor_zoom,this.tooltip_options=r.tooltip_options,this.tooltip=r.tooltip,this.marker_cluster_options=r.marker_cluster_options,this.marker_color=r.marker,this.id=r.id,this.id_mixing=r.id_mixing,this.title=r.title,this.map_background=r.map_background,this.theme=r.theme,this.theme_tool=r.theme_tool,this.default_themes=r.default_themes,this.temes_not_visibles=[["transparent","Transparent"]],this.theme_ui=r.theme_ui,this.theme_map=r.theme_map,this.map_opacity=r.map_opacity,this.latitude=r.latitud,this.longitude=r.longitud,this.slider=r.slider,this.no_info=r.no_info,this.reset_zoom=r.reset_zoom,this.slider_selector=this._selectorName(r.slider_selector),this.selected_marker,this.scope_selector=`[data-scope="${this.scope}"]`,this.scope_sufix="--"+this.scope,this.content_selector=r.content_selector||".js-content"+this.scope_sufix,this.content_outside=this.content_selector!==".js-content"+this.scope_sufix,this.data=this.formatInput(e),this.geometryTypes=["Point","LineString","Polygon","MultiPoint","MultiLineString"],this.featureStyle={stroke:"dodgerblue","stroke-opacity":1,"stroke-width":2,"fill-opacity":.5},this.accesible_menu_search=[],this.accesible_menu_filter=[],this.accesible_menu_extras=r.accesible_menu_extras,this.geojson,this.map=new L.map(this.map_selector,{renderer:L.svg(),...this.map_init_options}).setView(this.map_view,this.map_zoom),this.titleLayer=new L.tileLayer("https://mapa-ign.argentina.gob.ar/osm/{z}/{x}/{-y}.png",{attribution:'Contribuidores: <a href="https://www.ign.gob.ar/AreaServicios/Argenmap/Introduccion" target="_blank">Instituto Geográfico Nacional</a>, <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'}),L.hasOwnProperty("markerClusterGroup")&&(this.markers=new L.markerClusterGroup(this.marker_cluster_options)),this.ponchoLoaderTimeout}mapOpacity=(e=!1)=>{const t=e||this.map_opacity;document.querySelectorAll(this.scope_selector+" .leaflet-pane .leaflet-tile-pane").forEach(e=>e.style.opacity=t)};mapBackgroundColor=(e=!1)=>{const t=e||this.map_background;document.querySelectorAll(this.scope_selector+" .leaflet-container").forEach(e=>e.style.backgroundColor=t)};_menuTheme=()=>{if(this.theme_tool){document.querySelectorAll("#themes-tool"+this.scope_sufix).forEach(e=>e.remove());const o=document.createElement("ul");o.classList.add("pm-list-unstyled","pm-list","pm-tools","js-themes-tool"+this.scope_sufix);var e=document.createElement("li"),t=(e.setAttribute("tabindex","-1"),e.dataset.toggle="true",document.createElement("i")),a=(t.setAttribute("aria-hidden","true"),t.classList.add("pmi","pmi-adjust"),document.createElement("button"));a.title="Cambiar tema",a.tabIndex="0",a.classList.add("pm-btn","pm-btn-rounded-circle"),a.appendChild(t),a.setAttribute("role","button"),a.setAttribute("aria-label","Abre el panel de temas");const i=document.createElement("ul");i.classList.add("pm-container","pm-list","pm-list-unstyled","pm-p-1","pm-caret","pm-caret-b","pm-toggle");var t=document.createElement("button"),r=(t.textContent="Restablecer",t.classList.add("pm-item-link","js-reset-theme"),document.createElement("li"));r.classList.add("pm-item-separator"),r.appendChild(t),i.appendChild(r),this.default_themes.map(e=>e[0]).forEach((e,t)=>{var a=document.createElement("button"),e=(a.dataset.theme=e,a.textContent=this.default_themes[t][1],a.classList.add("js-set-theme","pm-item-link"),document.createElement("li"));e.appendChild(a),i.appendChild(e)}),e.appendChild(a),e.appendChild(i),o.appendChild(e),document.querySelectorAll(this.scope_selector).forEach(e=>e.appendChild(o)),document.querySelectorAll(".js-reset-theme").forEach(e=>e.addEventListener("click",()=>{localStorage.removeItem("mapTheme"),this._removeThemes(),this._setThemes()})),document.querySelectorAll(".js-set-theme").forEach(t=>t.addEventListener("click",()=>{var e=t.dataset.theme;this.useTheme(e),localStorage.setItem("mapTheme",e)}))}};_setThemeStyles=(t=!1,e=["ui","map"])=>e.map(e=>!!["ui","map"].includes(e)&&e+"-"+t);_removeThemes=(a=["ui","map"])=>{document.querySelectorAll(this.scope_selector).forEach(t=>{[...this.default_themes,...this.temes_not_visibles].map(e=>e[0]).forEach(e=>{t.classList.remove(...this._setThemeStyles(e,a))})})};_setTheme=(t,a)=>{var e=document.querySelectorAll(this.scope_selector);this._removeThemes(a),e.forEach(e=>{e.classList.add(...this._setThemeStyles(t,a))})};useTheme=(e=!1)=>{e=e||this.theme;this._setTheme(e,["ui","map"])};useMapTheme=e=>this._setTheme(e,["map"]);useUiTheme=e=>this._setTheme(e,["ui"]);_setThemes=()=>{localStorage.hasOwnProperty("mapTheme")?this._setTheme(localStorage.getItem("mapTheme"),["ui","map"]):this.theme_ui||this.theme_map?(this.theme_ui&&this._setTheme(this.theme_ui,["ui"]),this.theme_map&&this._setTheme(this.theme_map,["map"])):this.useTheme()};_slugify=e=>slugify(e);isGeoJSON=e=>"FeatureCollection"===e?.type;get entries(){return this.data.features}get geoJSON(){return this.featureCollection(this.entries)}formatInput=e=>{e.length<1&&this.errorMessage("No se puede visualizar el mapa, el documento está vacío","warning");let t;return t=this.isGeoJSON(e)?e:(e=this.features(e),this.featureCollection(e)),this._setIdIfNotExists(t)};errorMessage=(e=!1,t="danger")=>{document.querySelectorAll("#js-error-message"+this.scope_sufix).forEach(e=>e.remove());const a=document.createElement("div");a.id="js-error-message"+this.scope_sufix,a.classList.add("poncho-map--message",t);var r=document.createElement("i"),o=(r.classList.add("icono-arg-mapa-argentina","poncho-map--message__icon"),document.createElement("h2"));o.classList.add("h6","title","pm-visually-hidden"),o.textContent="¡Se produjo un error!",a.appendChild(r),a.appendChild(o);throw[["En estos momentos tenemos inconvenientes para mostrar el mapa.","text-center"],["<em>Disculpe las molestias</em>","text-center","p"]].forEach(e=>{var t=document.createElement(void 0!==(t=e[2])||t?t:"p");void 0===e[1]&&!e[1]||(t.className=e[1]),t.innerHTML=e[0],a.appendChild(t)}),this.error_reporting&&((r=document.querySelector(this.scope_selector+".poncho-map")).parentNode.insertBefore(a,r),"danger"==t)&&document.getElementById(this.map_selector).remove(),e};feature=e=>{var t=e[this.latitude],a=e[this.longitude];return[t,a].forEach(e=>{isNaN(Number(e))&&this.errorMessage("El archivo contiene errores en la definición de latitud y longitud.\n "+e)}),delete e[this.latitude],delete e[this.longitude],{type:"Feature",properties:e,geometry:{type:"Point",coordinates:[a,t]}}};featureCollection=e=>({type:"FeatureCollection",features:e});features=e=>e.map(this.feature);_isIdMixing=()=>Array.isArray(this.id_mixing)&&0<this.id_mixing||"function"==typeof this.id_mixing;_idMixing=t=>{var e;if(this._isIdMixing())return"function"==typeof this.id_mixing?this.id_mixing(this,t).join(""):(e=this.id_mixing.map(e=>t.properties[e]?t.properties[e].toString():e),this._slugify(e.join("-")))};_setIdIfNotExists=e=>{var t=e.features.filter((e,t)=>0===t).every(e=>e.properties.hasOwnProperty("id"));return!this._isIdMixing()&&t||(t=e.features.map((e,t)=>{var a;return this._isIdMixing()?e.properties.id=this._idMixing(e):(t=t+1,a=this.title&&e.properties[this.title]?this._slugify(e.properties[this.title]):"",e.properties.id=[t,a].filter(e=>e).join("-")),e}),e.features=t),e};addHash=e=>{"string"!=typeof e&&!e||!this.hash||this.no_info||(window.location.hash="#"+e)};entry=t=>this.entries.find(e=>!(!e?.properties||e.properties[this.id]!==t||"n"===e.properties?.["pm-interactive"]));searchEntries=(t,e)=>{return e=void 0===e?this.geoJSON:e,"string"!=typeof t||0===t.trim().length?e:e.filter(e=>this.searchEntry(t,e.properties))};searchEntry=(e,t)=>{var a=[...new Set([this.title,...this.search_fields])].filter(e=>e);const r=replaceSpecialChars(e).toUpperCase();return a.some(function(e){e=replaceSpecialChars(t[e]).toString().toUpperCase();try{return e.includes(r)}catch(e){}})?t:null};_selectorName=e=>e.replace(/^(\.|\#)/,"");scrollCenter=()=>{var e=document.getElementById(this.map_selector),t=e.getBoundingClientRect(),e=(e.offsetLeft+e.offsetWidth)/2,t=t.top+window.scrollY;window.scrollTo({top:t,left:e,behavior:"smooth"})};_clearContent=()=>document.querySelector(".js-content"+this.scope_sufix).innerHTML="";toggleSlider=()=>{this.no_info||(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.toggle(this.slider_selector+"--in")}),document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.style.display=this.isSliderOpen()?"block":"none"}))};_focusOnFeature=t=>{this.map.eachLayer(e=>{e?.options?.id==t&&(e?._path?e._path.focus():e?._icon&&e._icon.focus())})};_clickToggleSlider=()=>document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>e.addEventListener("click",()=>{this._clearContent(),this.toggleSlider(),this._focusOnFeature(e.dataset.entryId)}));isSliderOpen=()=>{let t=[];return document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>{e.classList.contains(this.slider_selector+"--in")&&t.push(!0)}),t.some(e=>e)};setContent=t=>{if(!this.no_info){this._focusOnSlider(),this.isSliderOpen()||this.toggleSlider();const a="function"==typeof this.template?this.template(this,t):this.defaultTemplate(this,t);document.querySelectorAll(this.content_selector).forEach(e=>{e.innerHTML=a}),document.querySelectorAll(".js-close-slider"+this.scope_sufix).forEach(e=>{e.dataset.entryId=t[this.id]})}};_focusOnSlider=()=>{var e;this.no_info||(this.isSliderOpen()?document.querySelector(".js-close-slider"+this.scope_sufix).focus():(e=document.querySelector(".js-slider"+this.scope_sufix))&&e.addEventListener("animationend",()=>{document.querySelector(".js-close-slider"+this.scope_sufix).focus()}))};setHeaders=e=>{var t;return[this.template_structure,this.template_structure.mixing].every(e=>e)?(t=this.template_structure.mixing.reduce((e,t)=>{if([t.key].every(e=>e))return{...e,[t.key]:t.header||""}},{}),{...e,...t}):e};header=e=>this.headers.hasOwnProperty(e)?this.headers[e]:e;_renderSlider=()=>{var e,t,a,r;!this.render_slider||this.content_outside||this.no_info||(document.querySelectorAll(".js-slider"+this.scope_sufix).forEach(e=>e.remove()),(e=document.createElement("button")).classList.add("btn","btn-xs","btn-secondary","btn-close","js-close-slider"+this.scope_sufix),e.title="Cerrar panel",e.setAttribute("role","button"),e.setAttribute("aria-label","Cerrar panel de información"),e.innerHTML='<span class="pm-visually-hidden">Cerrar</span>✕',(t=document.createElement("a")).setAttribute("tabindex",0),t.id="js-anchor-slider"+this.scope_sufix,(a=document.createElement("div")).classList.add("content-container"),(r=document.createElement("div")).classList.add("content","js-content"+this.scope_sufix),r.tabIndex=0,a.appendChild(r),(r=document.createElement("div")).style.display="none",r.setAttribute("role","region"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-label","Panel de información"),r.classList.add("pm-container","slider","js-slider"+this.scope_sufix),r.id="slider"+this.scope_sufix,r.appendChild(e),r.appendChild(t),r.appendChild(a),document.querySelector(this.scope_selector+".poncho-map").appendChild(r))};_removeTooltips=()=>{let t=this;this.map.eachLayer(function(e){"tooltipPane"===e.options.pane&&e.removeFrom(t.map)})};_showSlider=e=>{this._removeTooltips(),e.hasOwnProperty("_latlng")?this.map.setView(e._latlng,this.map_anchor_zoom):this.fit_bounds_onevent&&this.map.fitBounds(e.getBounds().pad(.005)),e.fireEvent("click")};_showPopup=e=>{e.hasOwnProperty("_latlng")?this.markers.zoomToShowLayer(e,()=>{e.openPopup()}):(this.map.fitBounds(e.getBounds().pad(.005)),e.openPopup())};removeHash=()=>history.replaceState(null,null," ");hasHash=()=>{return window.location.hash.replace("#","")||!1};gotoHashedEntry=()=>{var e=this.hasHash();e&&this.gotoEntry(e)};gotoEntry=t=>{const a=this.entry(t),r=(e,t,a)=>{e.options.hasOwnProperty("id")&&e.options.id==t&&(this._setSelectedMarker(t,e),this.hash&&this.addHash(t),this.slider?this._showSlider(e,a):this._showPopup(e))};this.markers.eachLayer(e=>r(e,t,a)),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&r(e,t,a)})};_setClickeable=a=>{a.on("keypress click",t=>{document.querySelectorAll(".marker--active").forEach(e=>e.classList.remove("marker--active")),["_icon","_path"].forEach(e=>{t.sourceTarget.hasOwnProperty(e)&&t.sourceTarget[e].classList.add("marker--active")});var e=this.entries.find(e=>e?.properties&&e.properties[this.id]===a.options.id);this.setContent(e.properties)})};isFeature=e=>!!e.hasOwnProperty("feature");_clickeableFeatures=()=>{this.reset_zoom&&this.map.eachLayer(e=>{this.isFeature(e)&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&"n"!=e?.feature?.properties["pm-interactive"]&&this._setClickeable(e)})};_clickeableMarkers=()=>{this.no_info||this.markers.eachLayer(this._setClickeable)};_urlHash=()=>{if(this.hash){const t=e=>{e.on("click",()=>{this.addHash(e.options.id)})};this.markers.eachLayer(t),this.map.eachLayer(e=>{e.hasOwnProperty("feature")&&"Point"!=e.feature.geometry.type&&"MultiPoint"!=e.feature.geometry.type&&t(e)})}};removeListElement=(e,t)=>{t=e.indexOf(t);return-1<t&&e.splice(t,1),e};_templateTitle=e=>{if(!e.hasOwnProperty(this.title))return!1;var t=this.template_structure,a=!!t.hasOwnProperty("title")&&t.title,r=this.title||!1;if(t.hasOwnProperty("title")&&"boolean"==typeof t.title)return!1;if(!a&&!r)return!1;a=a||r;let o;t?.header?((r=document.createElement("div")).innerHTML=this._mdToHtml(t.header(this,e)),this.template_innerhtml&&(r.innerHTML=t.header(this,e)),o=r):((o=document.createElement("h2")).classList.add(...t.title_classlist),o.textContent=e[a]);r=document.createElement("header");return r.className="header",r.appendChild(o),r};_templateList=e=>{var t=this.template_structure,a=Object.keys(e);let r=a;if(t.hasOwnProperty("values")&&0<t?.values?.length)r=t.values;else if(t.hasOwnProperty("exclude")&&0<t.exclude.length)for(const o of t.exclude)r=this.removeListElement(a,o);return r};_mdToHtml=e=>{var t,a;return this.template_markdown&&this._markdownEnable()?(t=new showdown.Converter(this.markdown_options),a=secureHTML(e,this.allowed_tags),t.makeHtml((""+a).trim())):e};_markdownEnable=()=>!("undefined"==typeof showdown||!showdown.hasOwnProperty("Converter"));_templateMixing=o=>{if(this.template_structure.hasOwnProperty("mixing")&&0<this.template_structure.mixing.length){var e=this.template_structure.mixing;let r={};return e.forEach(e=>{var{values:e,separator:t=", ",key:a}=e;void 0===a&&this.errorMessage("Mixing requiere un valor en el atributo «key».","warning"),r[a]=e.map(e=>e in o?o[e]:e.toString()).filter(e=>e).join(t)}),Object.assign({},o,r)}return o};_setType=(e,t=!1,a=!1)=>"function"==typeof e?e(this,t,a):e;_lead=e=>{if(this.template_structure.hasOwnProperty("lead")){this.template_structure.lead.hasOwnProperty("key")||this.errorMessage("Lead requiere un valor en el atributo «key».","warning");var t,{key:a=!1,css:r="small",style:o=!1}=this.template_structure.lead;if(e[a].trim())return(t=document.createElement("p")).textContent=e[a],(a=this._setType(o,e))&&t.setAttribute("style",a),(o=this._setType(r,e))&&t.classList.add(...o.split(" ")),t}};_termIcon=(e,t)=>{var a=this.header_icons.find(e=>e.key==t);if(a){var{css:a=!1,style:r=!1,html:o=!1}=a,o=this._setType(o,e,t),r=this._setType(r,e,t),a=this._setType(a,e,t);if(a)return(e=document.createElement("i")).setAttribute("aria-hidden","true"),e.classList.add(...a.split(" ")),r&&e.setAttribute("style",r),e;if(o)return(a=document.createElement("template")).innerHTML=o,a.content}return!1};defaultTemplate=(e,t)=>{t=this._templateMixing(t);var a,r,o=this["template_structure"],i=this._templateList(t),s=this._templateTitle(t),n=document.createElement("article"),l=(n.classList.add(...o.container_classlist),document.createElement(o.definition_list_tag));l.classList.add(...o.definition_list_classlist),l.style.fontSize="1rem";for(const c of i)t.hasOwnProperty(c)&&t[c]&&((a=document.createElement(o.term_tag)).classList.add(...o.term_classlist),(r=this._termIcon(t,c))&&(a.appendChild(r),a.insertAdjacentText("beforeend"," ")),a.insertAdjacentText("beforeend",this.header(c)),(r=document.createElement(o.definition_tag)).classList.add(...o.definition_classlist),r.textContent=t[c],this.template_markdown?r.innerHTML=this._mdToHtml(t[c]):this.template_innerhtml&&(r.innerHTML=secureHTML(t[c],this.allowed_tags)),""!=this.header(c)&&l.appendChild(a),l.appendChild(r));i=this._lead(t);return i&&n.appendChild(i),s&&n.appendChild(s),n.appendChild(l),n.outerHTML};icon=(e="azul")=>new L.icon({iconUrl:"https://www.argentina.gob.ar/sites/default/files/"+`marcador-${e}.svg`,iconSize:[29,40],iconAnchor:[14,40],popupAnchor:[0,-37]});resetView=()=>this.map.setView(this.map_view,this.map_zoom);fitBounds=()=>{try{this.map.fitBounds(this.geojson.getBounds().pad(.005))}catch(e){}};_resetViewButton=()=>{this.reset_zoom&&(document.querySelectorAll(".js-reset-view"+this.scope_sufix).forEach(e=>e.remove()),document.querySelectorAll(this.scope_selector+" .leaflet-control-zoom-in").forEach(e=>{var t=document.createElement("i"),a=(t.classList.add("pmi","pmi-expand"),t.setAttribute("aria-hidden","true"),document.createElement("a"));a.classList.add("js-reset-view"+this.scope_sufix,"leaflet-control-zoom-reset"),a.href="#",a.title="Zoom para ver todo el mapa",a.setAttribute("role","button"),a.setAttribute("aria-label","Zoom para ver todo el mapa"),a.appendChild(t),a.onclick=e=>{e.preventDefault(),this.cleanState(),this.resetView()},e.after(a)}))};marker=e=>{var t;return this.marker_color&&"boolean"!=typeof this.marker_color?"string"==typeof this.marker_color?this.icon(this.marker_color):"string"==typeof this.marker_color(this,e)?(t=this.marker_color(this,e),this.icon(t)):"function"==typeof this.marker_color?this.marker_color(this,e):void 0:null};_clearLayers=()=>{this.markers.clearLayers(),this.map.eachLayer(e=>{this.isFeature(e)&&this.map.removeLayer(e)})};markersMap=e=>{var o=this;this._clearLayers(),this.geojson=new L.geoJson(e,{pointToLayer:function(e,t){var e=e["properties"],a=o.marker(e),r={},a=(r.id=e[o.id],a&&(r.icon=a),o.title&&(r.alt=e[o.title]),new L.marker(t,r));return o.map.options.minZoom=o.min_zoom,o.markers.addLayer(a),o.tooltip&&e[o.title]&&a.bindTooltip(e[o.title],o.tooltip_options),o.no_info||o.slider||(t="function"==typeof o.template?o.template(o,e):o.defaultTemplate(o,e),a.bindPopup(t)),o.markers},onEachFeature:function(e,t){var{properties:a,geometry:r}=e;t.options.id=a[o.id],e.properties.name=a[o.title],o.tooltip&&a[o.title]&&"Point"!=r.type&&"MultiPoint"!=r.type&&t.bindTooltip(a[o.title],o.tooltip_options),o.no_info||o.slider||"Point"==r.type||"MultiPoint"==r.type||(e="function"==typeof o.template?o.template(o,a):o.defaultTemplate(o,a),t.bindPopup(e))},style:function(e){const a=e["properties"];e=(e,t=!1)=>a.hasOwnProperty(e)?a[e]:t||o.featureStyle[e];return{color:e("stroke-color",e("stroke")),strokeOpacity:e("stroke-opacity"),weight:e("stroke-width"),fillColor:e("stroke"),opacity:e("stroke-opacity"),fillOpacity:e("fill-opacity")}}}),this.geojson.addTo(this.map)};_setSelectedMarker=(e,t)=>{e={entry:this.entry(e),marker:t};return this.selected_marker=e};_selectedMarker=()=>{this.map.eachLayer(t=>{this.isFeature(t)&&t.on("click",e=>{this._setSelectedMarker(t.options.id,t)})})};_hiddenSearchInput=()=>{const t=document.createElement("input");t.type="hidden",t.name="js-search-input"+this.scope_sufix,t.setAttribute("disabled","disabled"),t.id="js-search-input"+this.scope_sufix,document.querySelectorAll(this.scope_selector+".poncho-map").forEach(e=>e.appendChild(t))};_setFetureAttributes=()=>{const t=(e,t)=>{e.hasOwnProperty(t)&&(e[t].setAttribute("aria-label",e?.feature?.properties?.[this.title]),e[t].setAttribute("tabindex",0),e[t].dataset.entryId=e?.feature?.properties?.[this.id],"n"==e?.feature?.properties?.["pm-interactive"]?(e[t].dataset.interactive="n",e[t].setAttribute("role","graphics-symbol")):e[t].setAttribute("role","button"),e[t].dataset.leafletId=e._leaflet_id)};this.map.eachLayer(e=>t(e,"_path"))};_accesibleAnchors=()=>{var e=[[this.scope_selector+" .leaflet-map-pane","leaflet-map-pane"+this.scope_sufix,[["role","region"]]],[this.scope_selector+" .leaflet-control-zoom","leaflet-control-zoom"+this.scope_sufix,[["aria-label","Herramientas de zoom"],["role","region"]]],[".js-themes-tool"+this.scope_sufix,"themes-tool"+this.scope_sufix,[["aria-label","Herramienta para cambiar de tema visual"],["role","region"]]]];return e.forEach(e=>{document.querySelectorAll(e[0]).forEach(t=>{t.id=e[1],e[2].forEach(e=>t.setAttribute(e[0],e[1]))})}),e};_accesibleMenu=()=>{document.querySelectorAll(this.scope_selector+" .pm-accesible-nav").forEach(e=>e.remove());var e=this._accesibleAnchors(),e=[...e=[{text:"Ir a los marcadores del mapa",anchor:"#"+e[0][1]},{text:"Ajustar marcadores al mapa",anchor:"#",class:"js-fit-bounds"},{text:"Ir al panel de zoom",anchor:"#"+e[1][1]},{text:"Cambiar de tema",anchor:"#"+e[2][1]}],...this.accesible_menu_filter,...this.accesible_menu_search,...this.accesible_menu_extras],t=document.createElement("i");t.classList.add("pmi","pmi-universal-access","accesible-nav__icon"),t.setAttribute("aria-hidden","true");const a=document.createElement("div"),r=(a.classList.add("pm-accesible-nav","top","pm-list"),a.id="pm-accesible-nav"+this.scope_sufix,a.setAttribute("aria-label","Menú para el mapa"),a.setAttribute("role","navigation"),a.tabIndex=0,document.createElement("ul"));r.classList.add("pm-list-unstyled"),e.forEach((e,t)=>{var a=document.createElement("a"),e=(a.classList.add("pm-item-link","pm-accesible"),a.textContent=e.text,a.tabIndex=0,a.href=e.anchor,e.hasOwnProperty("class")&&""!=e.class&&a.classList.add(...e.class.split(" ")),document.createElement("li"));e.appendChild(a),r.appendChild(e)}),a.appendChild(t),a.appendChild(r);e=document.createElement("a");e.textContent="Ir a la navegación del mapa",e.classList.add("pm-item-link","pm-accesible"),e.href="#pm-accesible-nav"+this.scope_sufix,e.id="accesible-return-nav"+this.scope_sufix;const o=document.createElement("div");o.classList.add("pm-accesible-nav","bottom"),o.appendChild(t.cloneNode(!0)),o.appendChild(e),document.querySelectorAll(""+this.scope_selector).forEach(e=>{e.insertBefore(a,e.children[0]),e.appendChild(o)}),this.fit()};fit=()=>document.querySelectorAll(this.scope_selector+" .js-fit-bounds").forEach(e=>{e.onclick=e=>{e.preventDefault(),this.fitBounds()}});clearAll=()=>{[".js-filter-container"+this.scope_sufix,".js-slider"+this.scope_sufix].forEach(e=>document.querySelectorAll(e).forEach(e=>e.remove()))};cleanState=()=>history.replaceState(null,null," ");render=()=>{this._hiddenSearchInput(),this._resetViewButton(),this._setThemes(),this.titleLayer.addTo(this.map),this.markersMap(this.entries),this._selectedMarker(),this.slider&&(this._renderSlider(),this._clickeableFeatures(),this._clickeableMarkers(),this._clickToggleSlider()),this._urlHash(),this.scroll&&this.hasHash()&&this.scrollCenter(),setTimeout(this.gotoHashedEntry,this.anchor_delay),this._setFetureAttributes(),this._accesibleMenu(),this.mapOpacity(),this.mapBackgroundColor()}}class PonchoMapLoader{constructor(e){e=Object.assign({},{selector:"",scope:"",timeout:5e4,cover_opacity:1,cover_style:{}},e);this.scope=e.scope,this.cover_opacity=e.cover_opacity,this.cover_style=e.cover_style,this.timeout=e.timeout,this.scope_sufix="--"+this.scope,this.scope_selector=`[data-scope="${this.scope}"]`,this.ponchoLoaderTimeout}close=()=>document.querySelectorAll(".js-poncho-map__loader"+this.scope_sufix).forEach(e=>e.remove());load=()=>{this.close(),clearTimeout(this.ponchoLoaderTimeout);var e=document.querySelector(".poncho-map"+this.scope_selector),t=document.createElement("span"),a=(t.className="loader",document.createElement("div"));a.dataset.scope=this.selector,a.classList.add("poncho-map__loader","js-poncho-map__loader"+this.scope_sufix),Object.assign(a.style,this.cover_style),this.cover_opacity&&(a.style.backgroundColor=`color-mix(in srgb, transparent, var(--pm-loader-background) ${100*this.cover_opacity.toString()}%)`),a.appendChild(t),e.appendChild(a),this.ponchoLoaderTimeout=setTimeout(this.remove,this.timeout)};loader=(e,t=500)=>{this.load(),setTimeout(()=>{e(),this.remove()},t)}}class PonchoMapFilter extends PonchoMap{constructor(e,t){super(e,t);e=Object.assign({},{filters:[],filters_visible:!1,filters_info:!1,search_fields:[],messages:{reset:' <a href="#" class="{{reset_search}}" title="Restablece el mapa a su estado inicial">Restablecer mapa</a>',initial:"Hay {{total_results}} puntos en el mapa.",no_results_by_term:"No encontramos resultados para tu búsqueda.",no_results:"No s + this.messages.resete encontraron entradas.",results:"{{total_results}} resultados coinciden con tu búsqueda.",one_result:"{{total_results}} resultado coincide con tu búsqueda.",has_filters:'<i title="¡Advertencia!" aria-hidden="true" class="fa fa-warning text-danger"></i> Se están usando filtros.'}},t);this.filters=e.filters,this.filters_info=e.filters_info,this.filters_visible=e.filters_visible,this.valid_fields=["checkbox","radio"],this.search_fields=e.search_fields,this.messages=e.messages,this.accesible_menu_filter=[{text:"Ir al panel de filtros",anchor:"#filtrar-busqueda"+this.scope_sufix}]}tplParser=(e,r)=>Object.keys(r).reduce(function(e,t){var a=new RegExp("\\{\\{\\s{0,2}"+t+"\\s{0,2}\\}\\}","gm");return e=e.replace(a,r[t])},e);_helpText=e=>{var t=document.querySelectorAll(this.scope_selector+" .js-poncho-map__help");const r={total_results:e.length,total_entries:this.entries.length,total_filtered_entries:this.filtered_entries.length,filter_class:"js-close-filter"+this.scope_sufix,anchor:"#",term:this.inputSearchValue,reset_search:"js-poncho-map-reset"+this.scope_sufix};t.forEach(e=>{e.innerHTML="";var t=document.createElement("ul"),a=(t.classList.add("m-b-0","list-unstyled"),t.setAttribute("aria-live","polite"),e=>{var t=document.createElement("li");return t.innerHTML=e,t});r.total_entries===r.total_results?t.appendChild(a(this.tplParser(this.messages.initial,r))):r.total_results<1?t.appendChild(a(this.tplParser(this.messages.no_results_by_term+this.messages.reset,r))):""===this.inputSearchValue&&r.total_results<1?t.appendChild(a(this.tplParser(this.messages.no_results+this.messages.reset,r))):1==r.total_results?t.appendChild(a(this.tplParser(this.messages.one_result+this.messages.reset,r))):1<r.total_results&&t.appendChild(a(this.tplParser(this.messages.results+this.messages.reset,r))),this.usingFilters(),e.appendChild(t)})};_filterPosition=e=>{e=/^([\w\-]+?)(?:__([0-9]+))(?:__([0-9]+))?$/gm.exec(e);return e?[e[1],e[2]]:null};isFilterOpen=()=>document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.contains("filter--in");toggleFilter=()=>{document.querySelector(".js-poncho-map-filters"+this.scope_sufix).classList.toggle("filter--in")};_filterContainerHeight=()=>{var e=document.querySelector(".js-filter-container"+this.scope_sufix),t=document.querySelector(".js-close-filter"+this.scope_sufix),a=e.offsetParent.offsetHeight,r=3*this._cssVarComputedDistance(),a=a-e.offsetTop-t.offsetHeight-r,e=document.querySelector(".js-poncho-map-filters"+this.scope_sufix),t=(e.style.maxHeight=a+"px",e.offsetHeight-45),r=document.querySelector(".js-filters"+this.scope_sufix);r.style.height=t+"px",r.style.overflow="auto"};_clickToggleFilter=()=>document.querySelectorAll(".js-close-filter"+this.scope_sufix).forEach(e=>e.onclick=e=>{e.preventDefault(),this.toggleFilter(),this._filterContainerHeight()});_setFilter=e=>{const[t,a="checked"]=e;e=this.entries.map(e=>{if(e.properties.hasOwnProperty(t))return e.properties[t]}).filter(e=>e),e=[...new Set(e)].map(e=>[t,e,[e],a]);return e.sort((e,t)=>{e=e[1].toUpperCase(),t=t[1].toUpperCase();return t<e?1:e<t?-1:0}),e};_fieldsToUse=e=>{var{type:e="checkbox",fields:t=!1,field:a=!1}=e;t||a||this.errorMessage("Filters requiere el uso del atributo `field` o `fields`.","warning"),a&&"radio"===e&&(a[1]=!1);let r=t||this._setFilter(a);return"radio"===e&&!1===t&&(a=r.map(e=>e[1]),r=[[r[0][0],"Todos",a,"checked"],...r]),r};_fields=(e,t)=>{var a=document.createElement("div"),r=(a.classList.add("field-list","p-b-1"),this._fieldsToUse(e));for(const c in r){var o=r[c],i=document.createElement("input"),s=(i.type=this.valid_fields.includes(e.type)?e.type:"checkbox",i.id=`id__${o[0]}__${t}__`+c,"radio"==e.type?i.name=o[0]+"__"+t:i.name=o[0]+`__${t}__`+c,i.className="form-check-input",i.value=c,void 0!==o[3]&&"checked"==o[3]&&i.setAttribute("checked","checked"),document.createElement("label")),n=(s.style.marginLeft=".33rem",s.textContent=o[1],s.className="form-check-label",s.setAttribute("for",`id__${o[0]}__${t}__`+c),document.createElement("span")),o=(n.dataset.info=o[0]+`__${t}__`+c,s.appendChild(n),document.createElement("div"));o.className="form-check",o.appendChild(i),o.appendChild(s),a.appendChild(o)}var l=document.createElement("div");return l.appendChild(a),l};_filterButton=()=>{var e=document.createElement("i"),t=(e.setAttribute("aria-hidden","true"),e.classList.add("pmi","pmi-filter"),document.createElement("span")),a=(t.textContent="Abre o cierra el filtro de búsqueda",t.classList.add("pm-visually-hidden"),document.createElement("button")),e=(a.classList.add("pm-btn","pm-btn-rounded-circle","pm-my-1","js-close-filter"+this.scope_sufix),a.id="filtrar-busqueda"+this.scope_sufix,a.appendChild(e),a.appendChild(t),a.setAttribute("role","button"),a.setAttribute("aria-label","Abre o cierra el filtro de búsqueda"),a.setAttribute("aria-controls","poncho-map-filters"+this.scope_sufix),document.createElement("div"));e.classList.add("js-filter-container"+this.scope_sufix,"filter-container"),e.appendChild(a),document.querySelector(".poncho-map"+this.scope_selector).appendChild(e)};_cssVarComputedDistance=()=>{var e=document.querySelector(".poncho-map"),e=getComputedStyle(e).getPropertyValue("--pm-slider-distance");return parseInt(e.toString().replace(/[^0-9]*/gm,""))||0};_controlZoomSize=()=>{var e=document.querySelector(this.scope_selector+" .leaflet-control-zoom");return{controlHeight:e.offsetHeight,controlTop:e.offsetTop}};_filterContainer=()=>{var e=document.createElement("div"),t=(e.className="js-filters"+this.scope_sufix,document.createElement("button")),a=(t.classList.add("btn","btn-xs","btn-secondary","btn-close","js-close-filter"+this.scope_sufix),t.title="Cerrar panel",t.setAttribute("role","button"),t.setAttribute("aria-label","Cerrar panel de filtros"),t.innerHTML='<span class="pm-visually-hidden">Cerrar </span>✕',document.createElement("form"));a.classList.add("js-formulario"+this.scope_sufix),a.appendChild(t),a.appendChild(e);const r=document.createElement("div");r.classList.add("js-poncho-map-filters"+this.scope_sufix,"pm-container","poncho-map-filters","pm-caret","pm-caret-t"),r.setAttribute("role","region"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-label","Panel de filtros"),r.id="poncho-map-filters"+this.scope_sufix,this.filters_visible&&r.classList.add("filter--in");this._cssVarComputedDistance();t=this._controlZoomSize();const o=t.controlHeight+t.controlTop+"px";r.appendChild(a),document.querySelectorAll(".js-filter-container"+this.scope_sufix).forEach(e=>{e.style.top=o,e.appendChild(r)})};_checkUncheckButtons=e=>{var t=document.createElement("button"),a=(t.classList.add("js-select-items","select-items__button"),t.textContent="Marcar todos",t.dataset.field=e.field[0],t.dataset.value=1,document.createElement("button")),e=(a.classList.add("js-select-items","select-items__button"),a.textContent="Desmarcar todos",a.dataset.field=e.field[0],a.dataset.value=0,document.createElement("div"));return e.classList.add("select-items"),e.appendChild(t),e.appendChild(a),e};_createFilters=e=>{const o=document.querySelector(".js-filters"+this.scope_sufix);e.forEach((e,t)=>{var a=document.createElement("legend"),r=(a.textContent=e.legend,a.classList.add("m-b-1","color-primary","h6"),document.createElement("fieldset"));r.appendChild(a),e.hasOwnProperty("check_uncheck_all")&&e.check_uncheck_all&&"radio"!=e?.type&&r.appendChild(this._checkUncheckButtons(e)),r.appendChild(this._fields(e,t)),o.appendChild(r)})};formFilters=()=>{var e;return this.filters.length<1?[]:(e=document.querySelector(".js-formulario"+this.scope_sufix),e=new FormData(e),Array.from(e).map(e=>{var t=this._filterPosition(e[0]);return[parseInt(t[1]),parseInt(e[1]),t[0]]}))};defaultFiltersConfiguration=()=>{return this.filters.map((e,a)=>{return this._fieldsToUse(e).map((e,t)=>[a,t,e[0],"undefinded"!=typeof e[3]&&"checked"==e[3]])}).flat()};usingFilters=()=>{return this.defaultFiltersConfiguration().every(e=>document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]).checked)};_resetFormFilters=()=>{this.defaultFiltersConfiguration().forEach(e=>{document.querySelector(`#id__${e[2]}__${e[0]}__`+e[1]).checked=e[3]})};get inputSearchValue(){var e=document.querySelector("#js-search-input"+this.scope_sufix).value.trim();return""!==e&&e}_countOccurrences=(e,a,r)=>{return e.reduce((e,t)=>a.some(e=>t.properties[r].includes(e))?e+1:e,0)};totals=()=>{return this.formFilters().map(e=>{var t=this._fieldsToUse(this.filters[e[0]])[e[1]];return[t[1],this._countOccurrences(this.filtered_entries,t[2],t[0]),...e]})};_totalsInfo=()=>{if(!this.filters_info)return"";this.totals().forEach(e=>{var t=document.querySelector(""+this.scope_selector+` [data-info="${e[4]}__${e[2]}__${e[3]}"]`),a=e[1]<2?"":"s",r=document.createElement("i"),o=(r.style.cursor="help",r.style.opacity=".75",r.style.marginLeft=".5em",r.style.marginRight=".25em",r.classList.add("fa","fa-info-circle","small","text-info"),r.title=e[1]+" resultado"+a,r.setAttribute("aria-hidden","true"),document.createElement("span")),e=(o.className="pm-visually-hidden",o.style.fontWeight="400",o.textContent=e[1]+` elemento${a}.`,document.createElement("small"));e.appendChild(r),e.appendChild(o),t.appendChild(e)})};_validateEntry=(r,o)=>{var e=this.filters.length;return Array.from({length:e},(e,t)=>{return this._validateGroup(r,(a=t,o.filter(e=>e[0]==a)));var a}).reduce((e,t)=>e&&t,!0)};_search=(t,e,a)=>{const r=this._fieldsToUse(this.filters[e])[a];return r[2].filter(e=>e).some(e=>{if(t.hasOwnProperty(r[0]))return t[r[0]].includes(e)})};_validateGroup=(t,e)=>{return e.map(e=>this._search(t,e[0],e[1])).some(e=>e)};_filterData=()=>{var e=this.formFilters(),t=this.entries.filter(e=>this._validateEntry(e.properties,this.formFilters())),t=this.searchEntries(this.inputSearchValue,t);return t=this.filters.length<1||0<e.length?t:[],this.filtered_entries=t};_filteredData=e=>{e=void 0!==e?this.entries:this._filterData(),this.markersMap(e),this._selectedMarker(),this._helpText(e),this._resetSearch(),this._clickToggleFilter(),this.slider&&(this._renderSlider(),this._clickeableMarkers(),this._clickeableFeatures(),this._clickToggleSlider()),this._urlHash(),this._setFetureAttributes(),this._accesibleMenu()};_clearSearchInput=()=>document.querySelectorAll("#js-search-input"+this.scope_sufix).forEach(e=>e.value="");_resetSearch=()=>{document.querySelectorAll(".js-poncho-map-reset"+this.scope_sufix).forEach(e=>{e.onclick=e=>{e.preventDefault(),this._resetFormFilters(),this._filteredData(this.entries),this._clearSearchInput(),this.resetView()}})};filterChange=t=>document.querySelectorAll(".js-filters"+this.scope_sufix).forEach(e=>{e.onchange=t});checkUncheckFilters=()=>{document.querySelectorAll(this.scope_selector+" .js-select-items").forEach(t=>{t.onclick=e=>{e.preventDefault(),document.querySelectorAll(`${this.scope_selector} [id^=id__${t.dataset.field}]`).forEach(e=>{e.checked=parseInt(t.dataset.value)}),this._filteredData()}})};render=()=>{this._hiddenSearchInput(),this._resetViewButton(),this._menuTheme(),this._setThemes(),0<this.filters.length&&(this._filterButton(),this._filterContainer(),this._createFilters(this.filters)),this.titleLayer.addTo(this.map),this._filteredData(),this._totalsInfo(),this.scroll&&this.hasHash()&&this.scrollCenter(),this.checkUncheckFilters(),this.filterChange(e=>{e.preventDefault(),this._filteredData()}),setTimeout(this.gotoHashedEntry,this.anchor_delay),this.filters_visible&&this._filterContainerHeight(),this.mapOpacity(),this.mapBackgroundColor()}}class PonchoMapSearch{constructor(e,t){var a={scope:!1,placeholder:"Su búsqueda",search_fields:e.search_fields,sort:!0,sort_reverse:!1,sort_key:"text",datalist:!0},a=(this.instance=e,Object.assign({},a,t));this.text=e.title||!1,this.datalist=a.datalist,this.placeholder=a.placeholder,this.scope=a.scope,this.scope_sufix="--"+this.scope,this.sort=a.sort,this.sort_reverse=a.sort_reverse,this.search_scope_selector=this.scope?`[data-scope="${this.scope}"]`:"",this.instance.search_fields=a.search_fields,this.instance.accesible_menu_search=[{text:"Hacer una búsqueda",anchor:"#id-poncho-map-search"+this.scope_sufix}]}sortData=(e,r)=>{e=e.sort((e,t)=>{var a=e=>{this.instance.removeAccents(e).toUpperCase()};return a(e[r]),a(t[r]),a(e[r]),a(t[r]),0});return this.sort_reverse?e.reverse():e};_triggerSearch=()=>{const t=document.querySelector(this.search_scope_selector+" .js-poncho-map-search__input");t.id="id-poncho-map-search"+this.scope_sufix,document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__submit").forEach(e=>{e.onclick=e=>{e.preventDefault();document.querySelector("#js-search-input"+this.instance.scope_sufix).value=t.value;e=t.value;this._renderSearch(e)}})};_keyup=()=>{document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__input").forEach(e=>{const t=document.querySelector("#js-search-input"+this.instance.scope_sufix);e.onkeyup=()=>{t.value=e.value},e.onkeydown=()=>{t.value=e.value}})};_placeHolder=()=>{if(!this.placeholder)return"";document.querySelectorAll(this.search_scope_selector+" .js-poncho-map-search__input").forEach(e=>e.placeholder=this.placeholder.toString())};_renderSearch=e=>{var t=this.instance._filterData();this.instance.markersMap(t),this.instance.slider&&(this.instance._renderSlider(),this.instance._clickeableFeatures(),this.instance._clickeableMarkers(),this.instance._clickToggleSlider()),this.instance.hash&&this.instance._urlHash(),this.instance.resetView(),1==t.length?this.instance.gotoEntry(t[0].properties[this.instance.id]):""!=e.trim()&&(this.instance.removeHash(),setTimeout(this.instance.fitBounds,this.instance.anchor_delay)),this.instance._helpText(t),this.instance._resetSearch(),this.instance._clickToggleFilter(),this.instance._setFetureAttributes(),this.instance._accesibleMenu()};_addDataListOptions=()=>{if(!this.datalist)return null;document.querySelectorAll(this.search_scope_selector+" .js-porcho-map-search__list,"+` ${this.search_scope_selector} .js-poncho-map-search__list`).forEach(a=>{a.innerHTML="";var e=document.querySelector(this.search_scope_selector+" .js-poncho-map-search__input"),t="id-datalist"+this.scope_sufix;e.setAttribute("list",t),a.id=t,this.instance.filtered_entries.forEach(e=>{var t;e.properties[this.text]&&a.appendChild((e=e.properties[this.text],(t=document.createElement("option")).value=e,t))})})};_searchRegion=()=>{var e=document.querySelector(this.search_scope_selector);e.setAttribute("role","region"),e.setAttribute("aria-label","Buscador")};render=()=>{this._placeHolder(),this._triggerSearch(),this._addDataListOptions(),this.instance.filterChange(e=>{e.preventDefault(),this.instance._filteredData(),this._addDataListOptions()}),this._searchRegion(),this._keyup(),this.instance._accesibleMenu()}}const PONCHOMAP_GEOJSON_PROVINCES="/profiles/argentinagobar/themes/contrib/poncho/resources/jsons/geo-provincias-argentinas.json",ponchoMapProvinceMergeData=(r={},o={},i="provincia")=>{if(r.hasOwnProperty("features"))return r.features.forEach((t,e)=>{var a=o.find(e=>e[i]==t.properties.fna||e[i]==t.properties.nam);!a&&t.properties.fna?delete r.features[e]:(a?.color&&!t.properties["pm-type"]&&(r.features[e].properties.stroke=ponchoColor(a.color)),"n"===t.properties["pm-interactive"]&&"n"!==a?.["pm-interactive"]&&delete a["pm-interactive"],Object.assign(r.features[e].properties,a))}),r;throw new Error("Invalid data format")},ponchoMapProvinceCssStyles=e=>{"boolean"!=typeof e||e||document.querySelectorAll(".poncho-map-province__toggle-map,.poncho-map-province__toggle-element").forEach(e=>{e.classList.remove("poncho-map-province__toggle-map","poncho-map-province__toggle-element")})};class PonchoMapProvinces extends PonchoMapFilter{constructor(e,t,a){a=Object.assign({},{initial_entry:!1,random_entry:!1,overlay_image:!0,overlay_image_bounds:[[-20.56830872133435,-44.91768177759874],[-55.861359445914566,-75.2246121480093]],overlay_image_opacity:.8,overlay_image_url:"https://www.argentina.gob.ar/sites/default/files/map-shadow.png",hide_select:!1,toggle_select:!0,province_index:"provincia",fit_bounds:!0,map_view:[-40.47815508388363,-60.0045383246273],map_init_options:{zoomSnap:.2,zoomControl:!0,doubleClickZoom:!1,scrollWheelZoom:!1,boxZoom:!1},map_zoom:4.4,tooltip_options:{permanent:!1,className:"leaflet-tooltip-own",direction:"auto",offset:[0,-3],sticky:!0,opacity:1},tooltip:!0,slider:!0},a),ponchoMapProvinceCssStyles(a.toggle_select),e=ponchoMapProvinceMergeData(e,t,a.province_index);super(e,a),this.initialEntry=a.initial_entry,this.randomEntry=a.random_entry,this.overlayImage=a.overlay_image,this.overlayImageUrl=a.overlay_image_url,this.overlayImageBounds=a.overlay_image_bounds,this.overlayImageOpacity=a.overlay_image_opacity,this.mapView=a.map_view,this.toggleSelect=a.toggle_select,this.hideSelect=a.hide_select,this.fitToBounds=a.fit_bounds}sortObject=(e,a=0)=>e.sort((e,t)=>{e=e[a].toUpperCase(),t=t[a].toUpperCase();return t<e?1:e<t?-1:0});hideSelectProvinces=e=>{"boolean"==typeof e&&(e=`[data-scope-related="${this.scope}"]`,document.querySelectorAll(e).forEach(e=>{e.style.display=this.hideSelect?"none":""}))};_randomEntry=e=>e[Math.floor(Math.random()*e.length)][0];_provincesFromGeoJSON=(e,r)=>{let o={};return e.features.map(e=>{var{name:t=!1,"pm-interactive":a=!1}=e.properties;if("n"===a||!t)return!1;o[e.properties[r]]=t}).filter(e=>e),this.sortObject(Object.entries(o),1)};_selectedEntry=e=>{var t=window.location.hash.replace("#","");let a="";return t?a=t:this.initialEntry?a=this.initialEntry:this.randomEntry&&(a=this._randomEntry(e)),a};_setSelectProvinces=e=>{window.location.hash.replace("#","");e=this._provincesFromGeoJSON(e.geoJSON,e.id);const a=this._selectedEntry(e),r=document.getElementById("id_provincia");return[["","Elegí una provincia"],...e].forEach(e=>{var t=document.createElement("option");e[0]===a&&t.setAttribute("selected","selected"),t.value=e[0],t.textContent=e[1],r.appendChild(t)}),{object:r,selected:a}};_selectedPolygon=e=>{e.map.eachLayer(e=>{e.on("keypress click",e=>{e?.target?.feature?.properties&&(e=e.target.feature.properties["id"],document.getElementById("id_provincia").value=e)})})};_selectProvinces=t=>{this._selectedPolygon(t);const a=this._setSelectProvinces(t);a.selected&&t.gotoEntry(a.selected),a.object.addEventListener("change",e=>{t.gotoEntry(e.target.value),e.value=a.selected})};_overlayImage=()=>{this.overlayImage&&"string"==typeof this.overlayImageUrl&&"number"==typeof this.overlayImageOpacity&&L.imageOverlay(this.overlayImageUrl,this.overlayImageBounds,{opacity:this.overlayImageOpacity}).addTo(this.map)};renderProvinceMap=()=>{this.hideSelectProvinces(this.hideSelect),this._overlayImage(),this.render(),this.fitToBounds&&this.fitBounds(),this._selectProvinces(this)}}class GapiSheetData{constructor(e){e=Object.assign({},{gapi_key:"AIzaSyCq2wEEKL9-6RmX-TkW23qJsrmnFHFf5tY",gapi_uri:"https://sheets.googleapis.com/v4/spreadsheets/"},e);this.gapi_key=e.gapi_key,this.gapi_uri=e.gapi_uri}url=(e,t,a)=>{return["https://sheets.googleapis.com/v4/spreadsheets/",t,"/values/",e,"?key=",void 0!==a?a:this.gapi_key,"&alt=json"].join("")};json_data=e=>{e=this.feed(e);return{feed:e,entries:this.entries(e),headers:this.headers(e)}};feed=(e,i=!0)=>{const s=e.values[0],n=/ |\/|_/gi;let l=[];return e.values.forEach((e,t)=>{if(0<t){var a,r={};for(a in s){var o=e.hasOwnProperty(a)?e[a].trim():"";i?r[""+s[a].toLowerCase().replace(n,"")]=o:r[""+s[a].replace(n,"")]=o}l.push(r)}}),l};gapi_feed_row=(e,t="-",a=!0)=>{const r=a?"filtro-":"";a=Object.entries(e);let o={};return a.map(e=>{return o[e[0].replace("gsx$","").replace(r,"").replace(/-/g,t)]=e[1].$t}),o};entries=e=>e.filter((e,t)=>0<t);headers=e=>e.find((e,t)=>0==t)}"undefined"!=typeof exports&&(module.exports=GapiSheetData);class TranslateHTML{ATTRIBUTES=["title","placeholder","alt","value","href","src","html.lang"];constructor(e=[],t=[]){this.dictionary=this.sortByLength(e),this.attributes=t.length?t:this.ATTRIBUTES}sortByLength=e=>(e.sort((e,t)=>e[0].length>t[0].length?-1:e[0].length<t[0].length?1:e[0]-t[0]),e);translateAttributes=(e=!1)=>{const t=e||this.dictionary;this.attributes.forEach(e=>{e=e.split(".").slice(-2);const a=2===e.length?e[0]:"",r=2===e.length?e[1]:e[0];t.forEach(t=>{document.querySelectorAll(`${a}[${r}='${t[0]}']`).forEach(e=>e[r]=t[1])})})};translateHTML=(a,r)=>{for(var e,t=document.evaluate("//*/text()",document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),o=[];e=t.iterateNext();)o.push(e);o.forEach(e=>{var t=e.textContent.replace(a,r);t!==e.textContent&&(t=document.createTextNode(t),e.parentNode.replaceChild(t,e))})};translate=()=>{this.dictionary.forEach(e=>{var t=new RegExp(e[0],"g");this.translateHTML(t,e[1])})}}
|