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+D,IACzByD,EAAUzB,EAAShC,GAChBsB,EAAoB2B,EAAEO,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOnC,EAAoBQ,EAAEC,EAC9B,EAEIiC,EAAqBC,KAAgC,0BAAIA,KAAgC,2BAAK,GAClGD,EAAmBE,QAAQR,EAAqBtE,KAAK,KAAM,IAC3D4E,EAAmBhD,KAAO0C,EAAqBtE,KAAK,KAAM4E,EAAmBhD,KAAK5B,KAAK4E,G,IC/CvF,IAAIG,EAAsB7C,EAAoBQ,OAAEL,EAAW,CAAC,KAAK,KAAK,OAAO,WAAa,OAAOH,EAAoB,MAAQ,IAC7H6C,EAAsB7C,EAAoBQ,EAAEqC,E","sources":["webpack://decidim_parma/webpack/runtime/chunk loaded","webpack://decidim_parma/./app/packs/src/decidim/map/provider/here.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/map/icon.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/map/controller/static.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/map/controller/drag_marker.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/map/factory.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/map.js","webpack://decidim_parma/./node_modules/leaflet-tilelayer-here/leaflet-tilelayer-here.js","webpack://decidim_parma/webpack/bootstrap","webpack://decidim_parma/webpack/runtime/compat get default export","webpack://decidim_parma/webpack/runtime/define property getters","webpack://decidim_parma/webpack/runtime/hasOwnProperty shorthand","webpack://decidim_parma/webpack/runtime/jsonp chunk loading","webpack://decidim_parma/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import \"leaflet\"\nimport \"leaflet-tilelayer-here\"\n\n/**\n * NOTE:\n * This has to load before decidim/map in order for it to apply correctly when\n * the map is initialized. The document.ready handler set by this script has to\n * be registered before decidim/map registers its own.\n */\n$(() => {\n $(\"[data-decidim-map]\").on(\"configure.decidim\", (_ev, map, mapConfig) => {\n L.tileLayer.here(mapConfig.tileLayer).addTo(map);\n });\n});\n","import { 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 = ``;\n\n return svg;\n }\n});\n","import 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 MapController from \"src/decidim/map/controller\"\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 \"src/decidim/map/icon\"\n\nimport 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. You can find an example at:\n * // decidim-dev/app/packs/src/decidim/dev/test/custom_map_factory.js\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","L.TileLayer.HERE = L.TileLayer.extend({\n\toptions: {\n\t\tsubdomains: '1234',\n\t\tminZoom: 2,\n\t\tmaxZoom: 18,\n\n\t\t// option style: String = 'explore.day'\n\t\tstyle: 'explore.day',\n\n\t\t// option resource: String = 'base'\n\t\tresource: 'base',\n\n\t\t// option format: String = 'png8'\n\t\t// Image format to be used (`png8`, `png`, or `jpg`)\n\t\tformat: 'png8',\n\n\t\t// option apiKey: String = ''\n\t\t// Required option. The `apiKey` provided as part of the HERE credentials\n\t\tapiKey: '',\n\n\t\t// option features: String = ''\n\t\t// Map Features\n\t\tfeatures: null,\n\n\t\t// option mapVersion: String = ''\n\t\t// Map Version\n\t\tmapVersion: null,\n\n\t\t// option language: String = ''\n\t\t// Map language\n\t\tlanguage: null\n\t},\n\n\n\tinitialize: function initialize(options) {\n\t\toptions = L.setOptions(this, options);\n\n\t\toptions.tileResolution = 256;\n\n\t\tif (L.Browser.retina) {\n\t\t\toptions.tileResolution = 512;\n\t\t}\n\n\t\tvar tileUrl = 'https://maps.hereapi.com/v3/{resource}/mc/{z}/{x}/{y}/{format}?apiKey={apiKey}&style={style}&size={tileResolution}';\n\t\tvar copyrightUrl = 'https://maps.hereapi.com/v3/copyright?apiKey={apiKey}';\n\n\t\tif (options.features) {\n\t\t\ttileUrl += '&features={features}'\n\t\t}\n\n\t\tif (options.mapVersion) {\n\t\t\ttileUrl += '&mv={mapVersion}'\n\t\t}\n\n\t\tif (options.language) {\n\t\t\ttileUrl += '&lang={language}'\n\t\t}\n\n\t\tthis._attributionUrl = L.Util.template(copyrightUrl, this.options);\n\n\t\tL.TileLayer.prototype.initialize.call(this, tileUrl, options);\n\n\t\tthis._attributionText = '';\n\t},\n\n\tonAdd: function onAdd(map) {\n\t\tL.TileLayer.prototype.onAdd.call(this, map);\n\n\t\tif (!this._attributionBBoxes) {\n\t\t\tthis._fetchAttributionBBoxes();\n\t\t}\n\t},\n\n\tonRemove: function onRemove(map) {\n\t\tL.TileLayer.prototype.onRemove.call(this, map);\n\n\t\tif (this._map.attributionControl) {\n\t\t\tthis._map.attributionControl.removeAttribution(this._attributionText);\n\t\t}\n\n\t\tthis._map.off('moveend zoomend resetview', this._findCopyrightBBox, this);\n\t},\n\n\t_fetchAttributionBBoxes: function _onMapMove() {\n\t\tvar xmlhttp = new XMLHttpRequest();\n\t\txmlhttp.onreadystatechange = L.bind(function () {\n\t\t\tif (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t\t\tthis._parseAttributionBBoxes(JSON.parse(xmlhttp.responseText));\n\t\t\t}\n\t\t}, this);\n\t\txmlhttp.open(\"GET\", this._attributionUrl, true);\n\t\txmlhttp.send();\n\t},\n\n\t_parseAttributionBBoxes: function _parseAttributionBBoxes(json) {\n\t\tif (!this._map) { return; }\n\t\tvar providers = json.copyrights.in;\n\n\t\tfor (var i = 0; i < providers.length; i++) {\n\t\t\tif (providers[i].boundingBoxes) {\n\t\t\t\tfor (var j = 0; j < providers[i].boundingBoxes.length; j++) {\n\t\t\t\t\tvar box = providers[i].boundingBoxes[j];\n\t\t\t\t\tproviders[i].boundingBoxes[j] = L.latLngBounds([[box.east, box.north], [box.west, box.south]]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._map.on('moveend zoomend resetview', this._findCopyrightBBox, this);\n\n\t\tthis._attributionProviders = providers;\n\n\t\tthis._findCopyrightBBox();\n\t},\n\n\t_findCopyrightBBox: function _findCopyrightBBox() {\n\t\tif (!this._map) { return; }\n\t\tvar providers = this._attributionProviders;\n\t\tvar visibleProviders = [];\n\t\tvar zoom = this._map.getZoom();\n\t\tvar visibleBounds = this._map.getBounds();\n\n\t\tfor (var i = 0; i < providers.length; i++) {\n\t\t\tif (providers[i].minLevel < zoom && providers[i].maxLevel > zoom)\n\n\t\t\t\tif (!providers[i].boundingBoxes) {\n\t\t\t\t\t// No boxes = attribution always visible\n\t\t\t\t\tvisibleProviders.push(providers[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tfor (var j = 0; j < providers[i].boundingBoxes.length; j++) {\n\t\t\t\tvar box = providers[i].boundingBoxes[j];\n\t\t\t\tif (visibleBounds.overlaps(box)) {\n\t\t\t\t\tvisibleProviders.push(providers[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar attributionText = '© HERE maps';\n\n\t\tif (attributionText !== this._attributionText && this._map.attributionControl) {\n\t\t\tthis._map.attributionControl.removeAttribution(this._attributionText);\n\t\t\tthis._map.attributionControl.addAttribution(this._attributionText = attributionText);\n\t\t}\n\t}\n});\n\n\nL.tileLayer.here = function (opts) {\n\treturn new L.TileLayer.HERE(opts);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t3896: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdecidim_parma\"] = self[\"webpackChunkdecidim_parma\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7544,6904,5120], function() { return __webpack_require__(52580); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","$","on","_ev","map","mapConfig","L","tileLayer","here","addTo","DivIcon","SVGIcon","DecidimIcon","extend","options","fillColor","opacity","_createPathDescription","_createCircle","_createSVG","path","this","_createPath","circle","text","_createText","className","concat","style","iconSize","x","y","openLink","window","open","MapStaticController","_MapController","_classCallCheck","_callSuper","arguments","_inherits","key","value","_this","removeControl","zoomControl","dragging","disable","touchZoom","doubleClickZoom","scrollWheelZoom","boxZoom","keyboard","tap","config","zoom","setZoom","latitude","longitude","coordinates","panTo","marker","icon","createIcon","title","_icon","removeAttribute","link","_container","addEventListener","ev","preventDefault","focus","MapController","MapDragMarkerController","addMarker","fitWorld","markerData","lat","lng","triggerEvent","draggable","target","getLatLng","parseInt","setView","remove","Decidim","createMapController","mapId","type","MapMarkersController","$mapElements","length","Error","each","_i","el","$map","attr","Math","random","toString","substr","data","ctrl","load","trigger","start","TileLayer","HERE","subdomains","minZoom","maxZoom","resource","format","apiKey","features","mapVersion","language","initialize","setOptions","tileResolution","Browser","retina","tileUrl","_attributionUrl","Util","template","prototype","call","_attributionText","onAdd","_attributionBBoxes","_fetchAttributionBBoxes","onRemove","_map","attributionControl","removeAttribution","off","_findCopyrightBBox","xmlhttp","XMLHttpRequest","onreadystatechange","bind","readyState","status","_parseAttributionBBoxes","JSON","parse","responseText","send","json","providers","copyrights","in","i","boundingBoxes","j","box","latLngBounds","east","north","west","south","_attributionProviders","visibleProviders","getZoom","visibleBounds","getBounds","minLevel","maxLevel","push","overlaps","attributionText","addAttribution","opts","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","Object","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","obj","prop","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","forEach","__webpack_exports__"],"sourceRoot":""}