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app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/controller_registry.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/controller.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/controller/markers.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/controller/static.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/controller/drag_marker.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map/factory.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/map.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/vendor/jquery-tmpl.js","webpack://app/../usr/local/bundle/gems/decidim-core-0.26.7/app/packs/src/decidim/vendor/leaflet-tilelayer-here.js"],"sourcesContent":["import * as L from \"leaflet\";\nimport { SVGIcon } from \"leaflet-svgicon\"\n\nL.DivIcon.SVGIcon = SVGIcon;\nL.DivIcon.SVGIcon.DecidimIcon = L.DivIcon.SVGIcon.extend({\n options: {\n fillColor: \"#ef604d\",\n opacity: 0\n },\n _createPathDescription: function() {\n return \"M14 1.17a11.685 11.685 0 0 0-11.685 11.685c0 11.25 10.23 20.61 10.665 21a1.5 1.5 0 0 0 2.025 0c0.435-.435 10.665-9.81 10.665-21A11.685 11.685 0 0 0 14 1.17Zm0 17.415A5.085 5.085 0 1 1 19.085 13.5 5.085 5.085 0 0 1 14 18.585Z\";\n },\n _createCircle: function() {\n return \"\"\n },\n // Improved version of the _createSVG, essentially the same as in later\n // versions of Leaflet. It adds the `px` values after the width and height\n // CSS making the focus borders work correctly across all browsers.\n _createSVG: function() {\n const path = this._createPath();\n const circle = this._createCircle();\n const text = this._createText();\n const className = `${this.options.className}-svg`;\n\n const style = `width:${this.options.iconSize.x}px; height:${this.options.iconSize.y}px;`;\n\n const svg = `${path}${circle}${text}`;\n\n return svg;\n }\n});\n","const CONTROLLER_REGISTRY = {};\n\nexport default class MapControllerRegistry {\n static getController(mapId) {\n return CONTROLLER_REGISTRY[mapId];\n }\n\n static setController(mapId, map) {\n CONTROLLER_REGISTRY[mapId] = map;\n }\n\n static findByMap(map) {\n return Object.values(CONTROLLER_REGISTRY).find((ctrl) => {\n return ctrl.getMap() === map;\n });\n }\n}\n","import * as L from \"leaflet\";\nimport \"src/decidim/map/icon\"\nimport MapControllerRegistry from \"src/decidim/map/controller_registry\"\n\nexport default class MapController {\n constructor(mapId, config) {\n // Remove the old map if there is already one with the same ID.\n const old = MapControllerRegistry.getController(mapId);\n if (old) {\n old.remove();\n }\n\n this.mapId = mapId;\n this.config = $.extend({\n popupTemplateId: \"marker-popup\",\n markerColor: \"#ef604d\"\n }, config);\n\n this.map = null;\n this.eventHandlers = {};\n\n MapControllerRegistry.setController(mapId, this);\n }\n\n getConfig() {\n return this.config;\n }\n\n getMap() {\n return this.map;\n }\n\n load() {\n this.map = L.map(this.mapId);\n\n this.map.scrollWheelZoom.disable();\n\n // Fix the keyboard navigation on the map\n this.map.on(\"popupopen\", (ev) => {\n const $popup = $(ev.popup.getElement());\n $popup.attr(\"tabindex\", 0).focus();\n });\n this.map.on(\"popupclose\", (ev) => {\n $(ev.popup._source._icon).focus();\n });\n\n return this.map;\n }\n\n // Override this in the specific map controllers.\n start() {}\n\n remove() {\n if (this.map) {\n this.map.remove();\n this.map = null;\n }\n }\n\n createIcon() {\n return new L.DivIcon.SVGIcon.DecidimIcon({\n fillColor: this.config.markerColor,\n iconSize: L.point(28, 36)\n });\n }\n\n setEventHandler(name, callback) {\n this.eventHandlers[name] = callback;\n }\n\n triggerEvent(eventName, payload) {\n const handler = this.eventHandlers[eventName];\n if (typeof handler === \"function\") {\n return Reflect.apply(handler, this, payload);\n }\n return null;\n }\n}\n","import \"src/decidim/vendor/jquery-tmpl\"\nimport * as L from \"leaflet\";\nimport MapController from \"src/decidim/map/controller\"\nimport \"leaflet.markercluster\";\n\nexport default class MapMarkersController extends MapController {\n start() {\n this.markerClusters = null;\n\n if (Array.isArray(this.config.markers) && this.config.markers.length > 0) {\n this.addMarkers(this.config.markers);\n } else {\n this.map.fitWorld();\n }\n }\n\n addMarkers(markersData) {\n if (this.markerClusters === null) {\n this.markerClusters = new L.MarkerClusterGroup();\n this.map.addLayer(this.markerClusters);\n }\n\n // Pre-compiles the template\n $.template(\n this.config.popupTemplateId,\n $(`#${this.config.popupTemplateId}`).html()\n );\n\n const bounds = new L.LatLngBounds(\n markersData.map(\n (markerData) => [markerData.latitude, markerData.longitude]\n )\n );\n\n markersData.forEach((markerData) => {\n let marker = new L.Marker([markerData.latitude, markerData.longitude], {\n icon: this.createIcon(),\n keyboard: true,\n title: markerData.title\n });\n\n let node = document.createElement(\"div\");\n\n $.tmpl(this.config.popupTemplateId, markerData).appendTo(node);\n marker.bindPopup(node, {\n maxwidth: 640,\n minWidth: 500,\n keepInView: true,\n className: \"map-info\"\n }).openPopup();\n\n this.markerClusters.addLayer(marker);\n });\n\n // Make sure there is enough space in the map for the padding to be\n // applied. Otherwise the map will automatically zoom out (test it on\n // mobile). Make sure there is at least the same amount of width and\n // height available on both sides + the padding (i.e. 4x padding in\n // total).\n const size = this.map.getSize();\n if (size.y >= 400 && size.x >= 400) {\n this.map.fitBounds(bounds, { padding: [100, 100] });\n } else if (size.y >= 120 && size.x >= 120) {\n this.map.fitBounds(bounds, { padding: [30, 30] });\n } else {\n this.map.fitBounds(bounds);\n }\n }\n\n clearMarkers() {\n this.map.removeLayer(this.markerClusters);\n this.markerClusters = new L.MarkerClusterGroup();\n this.map.addLayer(this.markerClusters);\n }\n}\n","import * as L from \"leaflet\";\nimport MapController from \"src/decidim/map/controller\"\n\nconst openLink = window.open;\n\nexport default class MapStaticController extends MapController {\n start() {\n this.map.removeControl(this.map.zoomControl);\n this.map.dragging.disable();\n this.map.touchZoom.disable();\n this.map.doubleClickZoom.disable();\n this.map.scrollWheelZoom.disable();\n this.map.boxZoom.disable();\n this.map.keyboard.disable();\n if (this.map.tap) {\n this.map.tap.disable();\n }\n\n if (this.config.zoom) {\n this.map.setZoom(this.config.zoom);\n } else {\n this.map.setZoom(15);\n }\n\n if (this.config.latitude && this.config.longitude) {\n const coordinates = [this.config.latitude, this.config.longitude];\n\n this.map.panTo(coordinates);\n const marker = L.marker(coordinates, {\n icon: this.createIcon(),\n keyboard: true,\n title: this.config.title\n }).addTo(this.map);\n marker._icon.removeAttribute(\"tabindex\");\n }\n\n if (this.config.link) {\n this.map._container.addEventListener(\"click\", (ev) => {\n ev.preventDefault();\n this.map._container.focus();\n openLink(this.config.link, \"_blank\");\n });\n }\n }\n}\n","import * as L from \"leaflet\";\nimport MapController from \"src/decidim/map/controller\"\nimport \"src/decidim/vendor/leaflet-tilelayer-here\"\n\nexport default class MapDragMarkerController extends MapController {\n start() {\n if (this.config.marker) {\n this.addMarker(this.config.marker);\n } else {\n this.map.fitWorld();\n }\n }\n\n addMarker(markerData) {\n if (markerData.latitude === null || markerData.longitude === null) {\n return;\n }\n\n const coordinates = {\n lat: markerData.latitude,\n lng: markerData.longitude\n };\n this.triggerEvent(\"coordinates\", [coordinates]);\n\n this.marker = L.marker(coordinates, {\n icon: this.createIcon(),\n keyboard: true,\n title: markerData.title,\n draggable: true\n });\n this.marker.on(\"drag\", (ev) => {\n this.triggerEvent(\"coordinates\", [ev.target.getLatLng()]);\n });\n this.marker.addTo(this.map);\n\n const zoom = parseInt(this.config.zoom, 10) || 14;\n this.map.setView(coordinates, zoom);\n }\n\n getMarker() {\n return this.marker;\n }\n\n removeMarker() {\n if (this.marker) {\n this.marker.remove();\n this.marker = null;\n }\n }\n}\n","import MapMarkersController from \"src/decidim/map/controller/markers\"\nimport MapStaticController from \"src/decidim/map/controller/static\"\nimport MapDragMarkerController from \"src/decidim/map/controller/drag_marker\"\n\n/**\n * A factory method that creates a new map controller instance. This method\n * can be overridden in order to return different types of maps for\n * differently configured map elements.\n *\n * For instance, one map could pass an extra `type` configuration with the\n * value \"custom\" for the map element, this factory method would identify\n * it and then return a different controller for that map than the default.\n * This would allow this types of maps to function differently.\n *\n * An example how to use in the ERB view:\n * <%= dynamic_map_for type: \"custom\" do %>\n * <%= javascript_pack_tag \"map_customization\" %>\n * <% end %>\n *\n * And then the actual customization at `map_customization.js.es6`:\n * var originalCreateMapController = window.Decidim.createMapController;\n * window.Decidim.createMapController = (mapId, config) => {\n * if (config.type === \"custom\") {\n * // Obviously you need to implement CustomMapController for this to\n * // work.\n * return new window.Decidim.CustomMapController(mapId, config);\n * }\n *\n * return originalCreateMapController(mapId, config);\n * }\n *\n * @param {string} mapId The ID of the map element.\n * @param {Object} config The map configuration object.\n * @returns {MapController} The controller for the map.\n */\nconst createMapController = function(mapId, config) {\n if (config.type === \"static\") {\n return new MapStaticController(mapId, config);\n } else if (config.type === \"drag-marker\") {\n return new MapDragMarkerController(mapId, config);\n }\n\n return new MapMarkersController(mapId, config);\n}\n\nwindow.Decidim.createMapController = createMapController;\n","import \"src/decidim/map/factory\"\n\n$(() => {\n // Load the map controller factory method in the document.ready handler to\n // allow overriding it by any script that is loaded before the document is\n // ready.\n let $mapElements = $(\"[data-decidim-map]\");\n if ($mapElements.length < 1 && $(\"#map\").length > 0) {\n throw new Error(\n \"DEPRECATION: Please update your maps customizations or include 'decidim/map/legacy.js' for legacy support!\"\n );\n }\n\n $mapElements.each((_i, el) => {\n const $map = $(el);\n let mapId = $map.attr(\"id\");\n if (!mapId) {\n mapId = `map-${Math.random().toString(36).substr(2, 9)}`;\n $map.attr(\"id\", mapId);\n }\n\n const mapConfig = $map.data(\"decidim-map\");\n const ctrl = window.Decidim.createMapController(mapId, mapConfig);\n const map = ctrl.load();\n\n $map.data(\"map\", map);\n $map.data(\"map-controller\", ctrl);\n\n $map.trigger(\"configure.decidim\", [map, mapConfig]);\n\n ctrl.start();\n\n // Indicates the map is loaded with the map objects initialized and ready\n // to be used.\n $map.trigger(\"ready.decidim\", [map, mapConfig]);\n });\n});\n","/* eslint-disable */\n\n/*\n * jQuery Templating Plugin\n * Copyright 2010, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n */\n;(function( jQuery, undefined ){\n var oldManip = jQuery.fn.domManip, tmplItmAtt = \"_tmplitem\", htmlExpr = /^[^<]*(<[\\w\\W]+>)[^>]*$|\\{\\{\\! /,\n newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];\n\n function newTmplItem( options, parentItem, fn, data ) {\n // Returns a template item data structure for a new rendered instance of a template (a 'template item').\n // The content field is a hierarchical array of strings and nested items (to be\n // removed and replaced by nodes field of dom elements, once inserted in DOM).\n var newItem = {\n data: data || (parentItem ? parentItem.data : {}),\n _wrap: parentItem ? parentItem._wrap : null,\n tmpl: null,\n parent: parentItem || null,\n nodes: [],\n calls: tiCalls,\n nest: tiNest,\n wrap: tiWrap,\n html: tiHtml,\n update: tiUpdate\n };\n if ( options ) {\n jQuery.extend( newItem, options, { nodes: [], parent: parentItem } );\n }\n if ( fn ) {\n // Build the hierarchical content to be used during insertion into DOM\n newItem.tmpl = fn;\n newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );\n newItem.key = ++itemKey;\n // Keep track of new template item, until it is stored as jQuery Data on DOM element\n (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;\n }\n return newItem;\n }\n\n // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).\n jQuery.each({\n appendTo: \"append\",\n prependTo: \"prepend\",\n insertBefore: \"before\",\n insertAfter: \"after\",\n replaceAll: \"replaceWith\"\n }, function( name, original ) {\n jQuery.fn[ name ] = function( selector ) {\n var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,\n parent = this.length === 1 && this[0].parentNode;\n\n appendToTmplItems = newTmplItems || {};\n if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {\n insert[ original ]( this[0] );\n ret = this;\n } else {\n for ( i = 0, l = insert.length; i < l; i++ ) {\n cloneIndex = i;\n elems = (i > 0 ? this.clone(true) : this).get();\n jQuery.fn[ original ].apply( jQuery(insert[i]), elems );\n ret = ret.concat( elems );\n }\n cloneIndex = 0;\n ret = this.pushStack( ret, name, insert.selector );\n }\n tmplItems = appendToTmplItems;\n appendToTmplItems = null;\n jQuery.tmpl.complete( tmplItems );\n return ret;\n };\n });\n\n jQuery.fn.extend({\n // Use first wrapped element as template markup.\n // Return wrapped set of template items, obtained by rendering template against data.\n tmpl: function( data, options, parentItem ) {\n return jQuery.tmpl( this[0], data, options, parentItem );\n },\n\n // Find which rendered template item the first wrapped DOM element belongs to\n tmplItem: function() {\n return jQuery.tmplItem( this[0] );\n },\n\n // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.\n template: function( name ) {\n return jQuery.template( name, this[0] );\n },\n\n domManip: function( args, table, callback, options ) {\n // This appears to be a bug in the appendTo, etc. implementation\n // it should be doing .call() instead of .apply(). See #6227\n if ( args[0] && args[0].nodeType ) {\n var dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem;\n while ( i < argsLength && !(tmplItem = jQuery.data( args[i++], \"tmplItem\" ))) {}\n if ( argsLength > 1 ) {\n dmArgs[0] = [jQuery.makeArray( args )];\n }\n if ( tmplItem && cloneIndex ) {\n dmArgs[2] = function( fragClone ) {\n // Handler called by oldManip when rendered template has been inserted into DOM.\n jQuery.tmpl.afterManip( this, fragClone, callback );\n };\n }\n oldManip.apply( this, dmArgs );\n } else {\n oldManip.apply( this, arguments );\n }\n cloneIndex = 0;\n if ( !appendToTmplItems ) {\n jQuery.tmpl.complete( newTmplItems );\n }\n return this;\n }\n });\n\n jQuery.extend({\n // Return wrapped set of template items, obtained by rendering template against data.\n tmpl: function( tmpl, data, options, parentItem ) {\n var ret, topLevel = !parentItem;\n if ( topLevel ) {\n // This is a top-level tmpl call (not from a nested template using {{tmpl}})\n parentItem = topTmplItem;\n tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );\n wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level\n } else if ( !tmpl ) {\n // The template item is already associated with DOM - this is a refresh.\n // Re-evaluate rendered template for the parentItem\n tmpl = parentItem.tmpl;\n newTmplItems[parentItem.key] = parentItem;\n parentItem.nodes = [];\n if ( parentItem.wrapped ) {\n updateWrapped( parentItem, parentItem.wrapped );\n }\n // Rebuild, without creating a new template item\n return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));\n }\n if ( !tmpl ) {\n return []; // Could throw...\n }\n if ( typeof data === \"function\" ) {\n data = data.call( parentItem || {} );\n }\n if ( options && options.wrapped ) {\n updateWrapped( options, options.wrapped );\n }\n ret = jQuery.isArray( data ) ?\n jQuery.map( data, function( dataItem ) {\n return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;\n }) :\n [ newTmplItem( options, parentItem, tmpl, data ) ];\n return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;\n },\n\n // Return rendered template item for an element.\n tmplItem: function( elem ) {\n var tmplItem;\n if ( elem instanceof jQuery ) {\n elem = elem[0];\n }\n while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, \"tmplItem\" )) && (elem = elem.parentNode) ) {}\n return tmplItem || topTmplItem;\n },\n\n // Set:\n // Use $.template( name, tmpl ) to cache a named template,\n // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.\n // Use $( \"selector\" ).template( name ) to provide access by name to a script block template declaration.\n\n // Get:\n // Use $.template( name ) to access a cached template.\n // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )\n // will return the compiled template, without adding a name reference.\n // If templateString includes at least one HTML tag, $.template( templateString ) is equivalent\n // to $.template( null, templateString )\n template: function( name, tmpl ) {\n if (tmpl) {\n // Compile template and associate with name\n if ( typeof tmpl === \"string\" ) {\n // This is an HTML string being passed directly in.\n tmpl = buildTmplFn( tmpl )\n } else if ( tmpl instanceof jQuery ) {\n tmpl = tmpl[0] || {};\n }\n if ( tmpl.nodeType ) {\n // If this is a template block, use cached copy, or generate tmpl function and cache.\n tmpl = jQuery.data( tmpl, \"tmpl\" ) || jQuery.data( tmpl, \"tmpl\", buildTmplFn( tmpl.innerHTML ));\n }\n return typeof name === \"string\" ? (jQuery.template[name] = tmpl) : tmpl;\n }\n // Return named compiled template\n return name ? (typeof name !== \"string\" ? jQuery.template( null, name ):\n (jQuery.template[name] ||\n // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec)\n jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;\n },\n\n encode: function( text ) {\n // Do HTML encoding replacing < > & and ' and \" by corresponding entities.\n return (\"\" + text).split(\"<\").join(\"<\").split(\">\").join(\">\").split('\"').join(\""\").split(\"'\").join(\"'\");\n }\n });\n\n jQuery.extend( jQuery.tmpl, {\n tag: {\n \"tmpl\": {\n _default: { $2: \"null\" },\n open: \"if($notnull_1){_=_.concat($item.nest($1,$2));}\"\n // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)\n // This means that {{tmpl foo}} treats foo as a template (which IS a function).\n // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.\n },\n \"wrap\": {\n _default: { $2: \"null\" },\n open: \"$item.calls(_,$1,$2);_=[];\",\n close: \"call=$item.calls();_=call._.concat($item.wrap(call,_));\"\n },\n \"each\": {\n _default: { $2: \"$index, $value\" },\n open: \"if($notnull_1){$.each($1a,function($2){with(this){\",\n close: \"}});}\"\n },\n \"if\": {\n open: \"if(($notnull_1) && $1a){\",\n close: \"}\"\n },\n \"else\": {\n _default: { $1: \"true\" },\n open: \"}else if(($notnull_1) && $1a){\"\n },\n \"html\": {\n // Unecoded expression evaluation.\n open: \"if($notnull_1){_.push($1a);}\"\n },\n \"=\": {\n // Encoded expression evaluation. Abbreviated form is ${}.\n _default: { $1: \"$data\" },\n open: \"if($notnull_1){_.push($.encode($1a));}\"\n },\n \"!\": {\n // Comment tag. Skipped by parser\n open: \"\"\n }\n },\n\n // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events\n complete: function( items ) {\n newTmplItems = {};\n },\n\n // Call this from code which overrides domManip, or equivalent\n // Manage cloning/storing template items etc.\n afterManip: function afterManip( elem, fragClone, callback ) {\n // Provides cloned fragment ready for fixup prior to and after insertion into DOM\n var content = fragClone.nodeType === 11 ?\n jQuery.makeArray(fragClone.childNodes) :\n fragClone.nodeType === 1 ? [fragClone] : [];\n\n // Return fragment to original caller (e.g. append) for DOM insertion\n callback.call( elem, fragClone );\n\n // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.\n storeTmplItems( content );\n cloneIndex++;\n }\n });\n\n //========================== Private helper functions, used by code above ==========================\n\n function build( tmplItem, nested, content ) {\n // Convert hierarchical content into flat string array\n // and finally return array of fragments ready for DOM insertion\n var frag, ret = content ? jQuery.map( content, function( item ) {\n return (typeof item === \"string\") ?\n // Insert template item annotations, to be converted to jQuery.data( \"tmplItem\" ) when elems are inserted into DOM.\n (tmplItem.key ? item.replace( /(<\\w+)(?=[\\s>])(?![^>]*_tmplitem)([^>]*)/g, \"$1 \" + tmplItmAtt + \"=\\\"\" + tmplItem.key + \"\\\" $2\" ) : item) :\n // This is a child template item. Build nested template.\n build( item, tmplItem, item._ctnt );\n }) :\n // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.\n tmplItem;\n if ( nested ) {\n return ret;\n }\n\n // top-level template\n ret = ret.join(\"\");\n\n // Support templates which have initial or final text nodes, or consist only of text\n // Also support HTML entities within the HTML markup.\n ret.replace( /^\\s*([^<\\s][^<]*)?(<[\\w\\W]+>)([^>]*[^>\\s])?\\s*$/, function( all, before, middle, after) {\n frag = jQuery( middle ).get();\n\n storeTmplItems( frag );\n if ( before ) {\n frag = unencode( before ).concat(frag);\n }\n if ( after ) {\n frag = frag.concat(unencode( after ));\n }\n });\n return frag ? frag : unencode( ret );\n }\n\n function unencode( text ) {\n // Use createElement, since createTextNode will not render HTML entities correctly\n var el = document.createElement( \"div\" );\n el.innerHTML = text;\n return jQuery.makeArray(el.childNodes);\n }\n\n // Generate a reusable function that will serve to render a template against data\n function buildTmplFn( markup ) {\n return new Function(\"jQuery\",\"$item\",\n \"var $=jQuery,call,_=[],$data=$item.data;\" +\n\n // Introduce the data as local variables using with(){}\n \"with($data){_.push('\" +\n\n // Convert the template into pure JavaScript\n jQuery.trim(markup)\n .replace( /([\\\\'])/g, \"\\\\$1\" )\n .replace( /[\\r\\t\\n]/g, \" \" )\n .replace( /\\$\\{([^\\}]*)\\}/g, \"{{= $1}}\" )\n .replace( /\\{\\{(\\/?)(\\w+|.)(?:\\(((?:[^\\}]|\\}(?!\\}))*?)?\\))?(?:\\s+(.*?)?)?(\\(((?:[^\\}]|\\}(?!\\}))*?)\\))?\\s*\\}\\}/g,\n function( all, slash, type, fnargs, target, parens, args ) {\n var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;\n if ( !tag ) {\n throw \"Template command not found: \" + type;\n }\n def = tag._default || [];\n if ( parens && !/\\w$/.test(target)) {\n target += parens;\n parens = \"\";\n }\n if ( target ) {\n target = unescape( target );\n args = args ? (\",\" + unescape( args ) + \")\") : (parens ? \")\" : \"\");\n // Support for target being things like a.toLowerCase();\n // In that case don't call with template item as 'this' pointer. Just evaluate...\n expr = parens ? (target.indexOf(\".\") > -1 ? target + parens : (\"(\" + target + \").call($item\" + args)) : target;\n exprAutoFnDetect = parens ? expr : \"(typeof(\" + target + \")==='function'?(\" + target + \").call($item):(\" + target + \"))\";\n } else {\n exprAutoFnDetect = expr = def.$1 || \"null\";\n }\n fnargs = unescape( fnargs );\n return \"');\" +\n tag[ slash ? \"close\" : \"open\" ]\n .split( \"$notnull_1\" ).join( target ? \"typeof(\" + target + \")!=='undefined' && (\" + target + \")!=null\" : \"true\" )\n .split( \"$1a\" ).join( exprAutoFnDetect )\n .split( \"$1\" ).join( expr )\n .split( \"$2\" ).join( fnargs ?\n fnargs.replace( /\\s*([^\\(]+)\\s*(\\((.*?)\\))?/g, function( all, name, parens, params ) {\n params = params ? (\",\" + params + \")\") : (parens ? \")\" : \"\");\n return params ? (\"(\" + name + \").call($item\" + params) : all;\n })\n : (def.$2||\"\")\n ) +\n \"_.push('\";\n }) +\n \"');}return _;\"\n );\n }\n function updateWrapped( options, wrapped ) {\n // Build the wrapped content.\n options._wrap = build( options, true,\n // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.\n jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]\n ).join(\"\");\n }\n\n function unescape( args ) {\n return args ? args.replace( /\\\\'/g, \"'\").replace(/\\\\\\\\/g, \"\\\\\" ) : null;\n }\n function outerHtml( elem ) {\n var div = document.createElement(\"div\");\n div.appendChild( elem.cloneNode(true) );\n return div.innerHTML;\n }\n\n // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.\n function storeTmplItems( content ) {\n var keySuffix = \"_\" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;\n for ( i = 0, l = content.length; i < l; i++ ) {\n if ( (elem = content[i]).nodeType !== 1 ) {\n continue;\n }\n elems = elem.getElementsByTagName(\"*\");\n for ( m = elems.length - 1; m >= 0; m-- ) {\n processItemKey( elems[m] );\n }\n processItemKey( elem );\n }\n function processItemKey( el ) {\n var pntKey, pntNode = el, pntItem, tmplItem, key;\n // Ensure that each rendered template inserted into the DOM has its own template item,\n if ( (key = el.getAttribute( tmplItmAtt ))) {\n while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }\n if ( pntKey !== key ) {\n // The next ancestor with a _tmplitem expando is on a different key than this one.\n // So this is a top-level element within this template item\n // Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.\n pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;\n if ( !(tmplItem = newTmplItems[key]) ) {\n // The item is for wrapped content, and was copied from the temporary parent wrappedItem.\n tmplItem = wrappedItems[key];\n tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true );\n tmplItem.key = ++itemKey;\n newTmplItems[itemKey] = tmplItem;\n }\n if ( cloneIndex ) {\n cloneTmplItem( key );\n }\n }\n el.removeAttribute( tmplItmAtt );\n } else if ( cloneIndex && (tmplItem = jQuery.data( el, \"tmplItem\" )) ) {\n // This was a rendered element, cloned during append or appendTo etc.\n // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.\n cloneTmplItem( tmplItem.key );\n newTmplItems[tmplItem.key] = tmplItem;\n pntNode = jQuery.data( el.parentNode, \"tmplItem\" );\n pntNode = pntNode ? pntNode.key : 0;\n }\n if ( tmplItem ) {\n pntItem = tmplItem;\n // Find the template item of the parent element.\n // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)\n while ( pntItem && pntItem.key != pntNode ) {\n // Add this element as a top-level node for this rendered template item, as well as for any\n // ancestor items between this item and the item of its parent element\n pntItem.nodes.push( el );\n pntItem = pntItem.parent;\n }\n // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...\n delete tmplItem._ctnt;\n delete tmplItem._wrap;\n // Store template item as jQuery data on the element\n jQuery.data( el, \"tmplItem\", tmplItem );\n }\n function cloneTmplItem( key ) {\n key = key + keySuffix;\n tmplItem = newClonedItems[key] =\n (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true ));\n }\n }\n }\n\n //---- Helper functions for template item ----\n\n function tiCalls( content, tmpl, data, options ) {\n if ( !content ) {\n return stack.pop();\n }\n stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });\n }\n\n function tiNest( tmpl, data, options ) {\n // nested template, using {{tmpl}} tag\n return jQuery.tmpl( jQuery.template( tmpl ), data, options, this );\n }\n\n function tiWrap( call, wrapped ) {\n // nested template, using {{wrap}} tag\n var options = call.options || {};\n options.wrapped = wrapped;\n // Apply the template, which may incorporate wrapped content,\n return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );\n }\n\n function tiHtml( filter, textOnly ) {\n var wrapped = this._wrap;\n return jQuery.map(\n jQuery( jQuery.isArray( wrapped ) ? wrapped.join(\"\") : wrapped ).filter( filter || \"*\" ),\n function(e) {\n return textOnly ?\n e.innerText || e.textContent :\n e.outerHTML || outerHtml(e);\n });\n }\n\n function tiUpdate() {\n var coll = this.nodes;\n jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );\n jQuery( coll ).remove();\n }\n})( jQuery );\n","/* eslint-disable */\n\n// 🍂class TileLayer.HERE\n// Tile layer for HERE maps tiles.\nL.TileLayer.HERE = L.TileLayer.extend({\n\n options: {\n subdomains: '1234',\n minZoom: 2,\n maxZoom: 18,\n\n // 🍂option scheme: String = 'normal.day'\n // The \"map scheme\", as documented in the HERE API.\n scheme: 'normal.day',\n\n // 🍂option resource: String = 'maptile'\n // The \"map resource\", as documented in the HERE API.\n resource: 'maptile',\n\n // 🍂option mapId: String = 'newest'\n // Version of the map tiles to be used, or a hash of an unique map\n mapId: 'newest',\n\n // 🍂option format: String = 'png8'\n // Image format to be used (`png8`, `png`, or `jpg`)\n format: 'png8',\n\n // 🍂option appId: String = ''\n // Required option. The `app_id` provided as part of the HERE credentials\n appId: '',\n\n // 🍂option appCode: String = ''\n // Required option. The `app_code` provided as part of the HERE credentials\n appCode: '',\n\n // 🍂option useCIT: boolean = false\n // Whether to use the CIT when loading the here-maptiles\n useCIT: false,\n\n // 🍂option useHTTPS: boolean = true\n // Whether to use HTTPS when loading the here-maptiles\n useHTTPS: true,\n\n // 🍂option language: String = ''\n // The language of the descriptions on the maps that are loaded\n language: '',\n\n // 🍂option language: String = ''\n // The second language of the descriptions on the maps that are loaded\n language2: '',\n },\n\n\n initialize: function initialize(options) {\n options = L.setOptions(this, options);\n\n // Decide if this scheme uses the aerial servers or the basemap servers\n var schemeStart = options.scheme.split('.')[0];\n options.tileResolution = 256;\n\n // {Base URL}{Path}/{resource (tile type)}/{map id}/{scheme}/{zoom}/{column}/{row}/{size}/{format}\n // ?apiKey={YOUR_API_KEY}\n // &{param}={value}\n\n var params = [\n 'apiKey=' + encodeURIComponent(options.apiKey)\n ];\n // Fallback to old app_id,app_code if no apiKey passed\n if(!options.apiKey) {\n params = [\n 'app_id=' + encodeURIComponent(options.appId),\n 'app_code=' + encodeURIComponent(options.appCode),\n ];\n }\n if(options.language) {\n params.push('lg=' + encodeURIComponent(options.language));\n }\n if(options.language2) {\n params.push('lg2=' + encodeURIComponent(options.language2));\n }\n var urlQuery = '?' + params.join('&');\n\n var path = '/maptile/2.1/{resource}/{mapId}/{scheme}/{z}/{x}/{y}/{tileResolution}/{format}' + urlQuery;\n var attributionPath = '/maptile/2.1/copyright/{mapId}?apiKey={apiKey}';\n\n var baseUrl = 'maps.ls.hereapi.com';\n\n // Old style with apiId/apiCode for compatibility\n if(!options.apiKey) {\n // make sure the CIT-url can be used\n baseUrl = 'maps' + (options.useCIT ? '.cit' : '') + '.api.here.com';\n attributionPath = '/maptile/2.1/copyright/{mapId}?app_id={appId}&app_code={appCode}';\n }\n\n var tileServer = 'base.' + baseUrl;\n if (schemeStart == 'satellite' || schemeStart == 'terrain' || schemeStart == 'hybrid') {\n tileServer = 'aerial.' + baseUrl;\n }\n if (options.scheme.indexOf('.traffic.') !== -1) {\n tileServer = 'traffic' + baseUrl;\n }\n\n var protocol = 'http' + (options.useHTTPS ? 's' : '');\n var tileUrl = protocol + '://{s}.' + tileServer + path;\n\n this._attributionUrl = L.Util.template(protocol + '://1.' + tileServer + attributionPath, this.options);\n\n L.TileLayer.prototype.initialize.call(this, tileUrl, options);\n\n this._attributionText = '';\n\n },\n\n onAdd: function onAdd(map) {\n L.TileLayer.prototype.onAdd.call(this, map);\n\n if (!this._attributionBBoxes) {\n this._fetchAttributionBBoxes();\n }\n },\n\n onRemove: function onRemove(map) {\n //\n // Remove the attribution text, and clear the cached text so it will be recalculated\n // if/when we are shown again.\n //\n this._map.attributionControl.removeAttribution(this._attributionText);\n this._attributionText = '';\n\n this._map.off('moveend zoomend resetview', this._findCopyrightBBox, this);\n\n //\n // Call the prototype last, once we've tidied up our own changes\n //\n L.TileLayer.prototype.onRemove.call(this, map);\n },\n\n _fetchAttributionBBoxes: function _onMapMove() {\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = L.bind(function(){\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n this._parseAttributionBBoxes(JSON.parse(xmlhttp.responseText));\n }\n }, this);\n xmlhttp.open(\"GET\", this._attributionUrl, true);\n xmlhttp.send();\n },\n\n _parseAttributionBBoxes: function _parseAttributionBBoxes(json) {\n if (!this._map) { return; }\n var providers = json[this.options.scheme.split('.')[0]] || json.normal;\n for (var i=0; i= zoom) {\n\n if (!providers[i].boxes) {\n // No boxes = attribution always visible\n visibleProviders.push(providers[i]);\n } else {\n for (var j=0; jHERE maps'];\n for (var i=0; i' + provider.label + '');\n }\n\n var attributionText = '© ' + attributions.join(', ') + '. ';\n\n if (attributionText !== this._attributionText) {\n this._map.attributionControl.removeAttribution(this._attributionText);\n this._map.attributionControl.addAttribution(this._attributionText = attributionText);\n }\n },\n\n});\n\n\nL.tileLayer.here = function(opts){\n return new L.TileLayer.HERE(opts);\n}\n"],"names":["L","SVGIcon","options","fillColor","opacity","_createPathDescription","_createCircle","_createSVG","path","this","_createPath","circle","text","_createText","className","style","iconSize","x","y","CONTROLLER_REGISTRY","MapControllerRegistry","mapId","map","Object","values","find","ctrl","getMap","MapController","config","old","getController","remove","$","extend","popupTemplateId","markerColor","eventHandlers","setController","scrollWheelZoom","disable","on","ev","popup","getElement","attr","focus","_source","_icon","name","callback","eventName","payload","handler","Reflect","apply","MapMarkersController","markerClusters","Array","isArray","markers","length","addMarkers","fitWorld","markersData","addLayer","template","html","bounds","markerData","latitude","longitude","forEach","marker","icon","_this","createIcon","keyboard","title","node","document","createElement","tmpl","appendTo","bindPopup","maxwidth","minWidth","keepInView","openPopup","size","getSize","fitBounds","padding","removeLayer","openLink","window","open","MapStaticController","removeControl","zoomControl","dragging","touchZoom","doubleClickZoom","boxZoom","tap","zoom","setZoom","coordinates","panTo","addTo","removeAttribute","link","_container","addEventListener","preventDefault","MapDragMarkerController","addMarker","lat","lng","triggerEvent","draggable","target","getLatLng","parseInt","setView","Decidim","createMapController","type","$mapElements","Error","each","_i","el","$map","Math","random","toString","substr","mapConfig","data","load","trigger","start","jQuery","undefined","appendToTmplItems","oldManip","fn","domManip","tmplItmAtt","htmlExpr","newTmplItems","wrappedItems","topTmplItem","key","itemKey","cloneIndex","stack","newTmplItem","parentItem","newItem","_wrap","parent","nodes","calls","tiCalls","nest","tiNest","wrap","tiWrap","tiHtml","update","tiUpdate","_ctnt","build","tmplItem","nested","content","frag","ret","item","replace","join","all","before","middle","after","storeTmplItems","get","unencode","concat","innerHTML","makeArray","childNodes","buildTmplFn","markup","Function","trim","slash","fnargs","parens","args","def","expr","exprAutoFnDetect","tag","_default","test","unescape","indexOf","$1","split","params","$2","updateWrapped","wrapped","elem","elems","i","l","m","keySuffix","newClonedItems","nodeType","getElementsByTagName","processItemKey","pntKey","pntItem","pntNode","getAttribute","parentNode","cloneTmplItem","push","pop","_","call","filter","textOnly","e","innerText","textContent","outerHTML","div","appendChild","cloneNode","coll","insertBefore","prependTo","insertAfter","replaceAll","original","selector","tmplItems","insert","clone","pushStack","complete","table","dmArgs","arguments","argsLength","fragClone","afterManip","topLevel","dataItem","encode","close","items","TileLayer","HERE","subdomains","minZoom","maxZoom","scheme","resource","format","appId","appCode","useCIT","useHTTPS","language","language2","initialize","schemeStart","setOptions","tileResolution","encodeURIComponent","apiKey","attributionPath","baseUrl","tileServer","protocol","tileUrl","_attributionUrl","Util","prototype","_attributionText","onAdd","_attributionBBoxes","_fetchAttributionBBoxes","onRemove","_map","attributionControl","removeAttribution","off","_findCopyrightBBox","xmlhttp","XMLHttpRequest","onreadystatechange","bind","readyState","status","_parseAttributionBBoxes","JSON","parse","responseText","send","json","providers","normal","boxes","j","box","latLngBounds","_attributionProviders","visibleProviders","getZoom","visibleBounds","getBounds","minLevel","maxLevel","intersects","attributions","provider","alt","label","attributionText","addAttribution","tileLayer","here","opts"],"sourceRoot":""}