com.mware.web.product.map.dist.geoShapePreview.js.map Maven / Gradle / Ivy
The newest version!
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 3e9f9da24d684a7ee6f7","webpack:///geoShapePreview.js","webpack:///external {\"amd\":\"openlayers\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"util/withDataRequest\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"jscache\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"util/vertex/formatters\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"util/mapConfig\",\"commonjs2\":false,\"commonjs\":false}","webpack:///./detail/geoShapePreview.js","webpack:///external {\"amd\":\"public/v1/api\",\"commonjs2\":false,\"commonjs\":false}","webpack:///./util/layerHelpers.js","webpack:///./util/cache.js","webpack:///./multiPointCluster.js"],"names":["root","factory","exports","module","require","define","amd","undefined","self","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_10__","__WEBPACK_EXTERNAL_MODULE_11__","__WEBPACK_EXTERNAL_MODULE_12__","__WEBPACK_EXTERNAL_MODULE_19__","__WEBPACK_EXTERNAL_MODULE_192__","__webpack_require__","moduleId","installedModules","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","10","11","12","19","191","api","ol","layerHelpers","mapConfig","F","GeoShapePreview","attributes","ignoreUpdateModelNotImplemented","before","node","config","element","model","after","setupMap","byType","layerHelper","vectorXhr","tile","source","sourceOptions","configure","tileLayer","layer","id","propName","ONTOLOGY_CONSTANTS","PROP_RAW","propKey","mimeType","vertex","prop","PROP_MIME_TYPE","wrapX","olSource","geoShapeLayer","map","Map","target","layers","controls","control","Zoom","view","View","zoom","minZoom","center","featurePromise","featureCache","loadFeatures","Promise","resolve","then","features","getView","getSource","addFeatures","set","fit","getExtent","onDetailPaneResize","updateSize","defineComponent","192","4","_objectWithoutProperties","obj","keys","indexOf","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","Symbol","iterator","next","done","push","value","length","err","Array","isArray","TypeError","_extends","assign","arguments","key","MultiPointCluster","withDataRequest","cache","interpolate","v","x0","x1","y0","y1","setLayerConfig","visible","opacity","zIndex","properties","_","mapObject","unset","setVisible","setOpacity","setZIndex","syncFeatures","focused","existingFeatures","indexBy","getFeatures","f","getId","newFeatures","changed","featureIndex","data","styles","geometryOverride","geometry","geoLocations","rest","getOrCreateGeometry","feature","featureValues","normal","selected","radius","getRadiusFromStyles","normalImage","isFunction","getImage","_nodeRadius","getStroke","newSelected","clone","prevStroke","newStroke","style","Stroke","color","width","getWidth","image_","stroke","isFocusing","type","focusedDim","existingFeature","any","getProperties","val","isEqual","setProperties","Feature","setId","fitFeatures","isEmpty","forEach","removeFeature","getFormatForMimeType","format","GeoJSON","KML","getOverlayIdForLayer","VECTOR_FEATURE_SELECTION_OVERLAY","image","getRadius","nodeRadius","devicePixelRatio","DEFAULT_LAYER_CONFIG","sortable","toggleable","options","baseLayerSource","console","error","Error","crossOrigin","Tile","label","addEvents","handlers","on","event","_retryCount","warn","src_","defer","load","cluster","Vector","clusterSource","heatmap","Heatmap","clear","count","selectionState","isSelected","heatmapLayer","vectorLayer","addToElements","list","el","isPartiallySelected","filter","getClusterFromEvent","pixel","pixelFeatures","getFeaturesAtPixel","layerFilter","onHeatmapClick","elements","vertices","edges","forEachFeatureAtPixel","onSelectElements","onClusterClick","targetFeature","clusterIterator","onAddSelection","selectInteraction","interaction","Select","addCondition","originalEvent","shiftKey","condition","events","click","toggleCondition","platformModifierKeyOnly","addInteraction","clusters","includes","debounce","newSelection","innerFeatures","all","some","extend","update","ancillary","_superExtent","extent","apply","customExtent","createEmpty","renderBuffer","updateWhileInteracting","updateWhileAnimating","extensionStyles","layerOptions","overlayId","e","featuresAtPixel","sourceFeatures","getFeatureById","every","selectionOverlay","forEachFeature","geom","getGeometry","featureExtent","Polygon","fromExtent","setGeometry","layerStatus","selectedOverlay","setStyle","Style","fill","Fill","addFeature","dataRequest","dataProjection","readProjection","proj","getCode","readFeatures","featureProjection","catch","message","i18n","featureSelected","needFocusStyle","styleList","normalStyle","selectedStyle","getOrCreateFeature","src","imgSize","scale","anchor","addFocus","reset","addDim","focusStats","selectionCount","countStats","min","max","Math","getOrCreateCluster","7","_toConsumableArray","arr2","from","Cache","hash","join","geoCache","cacheOptions","expirationSliding","EXPIRATION_MINUTES","FocusFill","FocusStroke","geo","getItem","MultiPoint","fromLonLat","setItem","cached","Icon","splice","renderer","point","context","pixelRatio","resolution","rotation","setTransform","x","y","w","FocusPadding","h","save","globalAlpha","beginPath","moveTo","lineTo","quadraticCurveTo","closePath","fillStyle","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","restore","r","dim","Circle","lineWidth","textStroke","translate","arc","PI","strokeStyle","portion","font","textAlign","textBaseline","text","toString","strokeText","fillText","focusStyle","getOpacity","9","attributions","logo","projection","distance","geometryFunction","refresh","bind","inherits","updateResolution","setDistance","clustered","maxRadius","reduce","Number","MAX_VALUE","mapDistanceSearch","mapDistance","coordinates","getCoordinates","coordinate","coordinateIndex","extentSearch","boundingExtent","buffer","extent1","neighbors","getFeaturesInExtent","coords","featuresToCluster","neighbor","neighborGeometry","neighborCoordinates","neighborUid","coordsInCluster","uid","extent2","intersects","createCluster","centers","sums","average","Point"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,EAAQG,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,IACxF,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,aAAc,uBAAwB,UAAW,yBAA0B,iBAAkB,iBAAkBJ,GAC7F,gBAAZC,SACdA,QAAyB,gBAAID,EA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,IAAMtD,EAAWsD,KAAOpO,EAAQpJ,IAAI,eAEnD,IAAMib,GAAUrB,EAAYL,OAAO,SAAC2B,EAAM3b,GAAP,MAAa2b,GAAK/X,IAAI,SAAC3C,EAAGtB,GAAJ,MAAUsB,GAAIjB,EAAEL,OAAM,EAAG,IAC5Eic,EAAUF,EAAQ9X,IAAI,SAAA6H,GAAA,MAAOA,GAAM4O,EAAYtT,SAC/C0C,EAAW,GAAIhI,GAAG8Q,KAAKsJ,MAAMD,EAEnC,OAAO,IAAIna,GAAGmK,SAAUnC,WAAU3E,WAAUuV,cAAa/L,QAAOqG,gBAG7DnN,GA1JX","file":"geoShapePreview.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(false), require(false), require(false), require(false), require(false), require(false));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\", \"util/withDataRequest\", \"jscache\", \"util/vertex/formatters\", \"util/mapConfig\", \"public/v1/api\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geoShapePreview\"] = factory(require(false), require(false), require(false), require(false), require(false), require(false));\n\telse\n\t\troot[\"geoShapePreview\"] = factory(root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__, __WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_192__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 191);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3e9f9da24d684a7ee6f7","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(false), require(false), require(false), require(false), require(false), require(false));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\", \"util/withDataRequest\", \"jscache\", \"util/vertex/formatters\", \"util/mapConfig\", \"public/v1/api\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geoShapePreview\"] = factory(require(false), require(false), require(false), require(false), require(false), require(false));\n\telse\n\t\troot[\"geoShapePreview\"] = factory(root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__, __WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_192__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 191);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_10__;\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_11__;\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_12__;\n\n/***/ }),\n\n/***/ 19:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_19__;\n\n/***/ }),\n\n/***/ 191:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(192), __webpack_require__(0), __webpack_require__(4), __webpack_require__(19), __webpack_require__(12)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (api, ol, layerHelpers, mapConfig, F) {\n 'use strict';\n\n var featureCache = {};\n\n return api.defineComponent(GeoShapePreview);\n\n function GeoShapePreview() {\n\n this.attributes({\n ignoreUpdateModelNotImplemented: true\n });\n\n this.before('initialize', function (node, config) {\n this.element = config.model;\n });\n\n this.after('initialize', function () {\n this.setupMap();\n });\n\n this.setupMap = function () {\n var _this = this;\n\n var _layerHelpers$byType = layerHelpers.byType,\n layerHelper = _layerHelpers$byType.vectorXhr,\n tile = _layerHelpers$byType.tile;\n\n var _mapConfig = mapConfig(),\n source = _mapConfig.source,\n sourceOptions = _mapConfig.sourceOptions;\n\n var _tile$configure = tile.configure('base', { source: source, sourceOptions: sourceOptions }),\n tileLayer = _tile$configure.layer;\n\n var _layerHelper$configur = layerHelper.configure(this.element.id, {\n id: this.element.id,\n element: this.element,\n propName: ONTOLOGY_CONSTANTS.PROP_RAW,\n propKey: '',\n mimeType: F.vertex.prop(this.element, ONTOLOGY_CONSTANTS.PROP_MIME_TYPE),\n sourceOptions: {\n wrapX: false\n }\n }),\n olSource = _layerHelper$configur.source,\n geoShapeLayer = _layerHelper$configur.layer;\n\n var map = new ol.Map({\n target: this.node,\n layers: [tileLayer, geoShapeLayer],\n controls: [new ol.control.Zoom()],\n view: new ol.View({\n zoom: 2,\n minZoom: 1,\n center: [0, 0]\n })\n });\n\n this.geoShapeLayer = geoShapeLayer;\n this.map = map;\n\n var featurePromise = featureCache[this.element.id] || layerHelper.loadFeatures(olSource, geoShapeLayer);\n\n Promise.resolve(featurePromise).then(function (features) {\n var view = _this.map.getView();\n var olSource = _this.geoShapeLayer.getSource();\n\n olSource.addFeatures(features);\n _this.geoShapeLayer.set('status', 'loaded');\n\n view.fit(olSource.getExtent());\n\n if (!featureCache[_this.element.id]) {\n featureCache[_this.element.id] = features;\n }\n });\n };\n\n this.onDetailPaneResize = function () {\n if (this.map) {\n this.map.updateSize();\n }\n };\n }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ 192:\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_192__;\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(9), __webpack_require__(10), __webpack_require__(7)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ol, MultiPointCluster, withDataRequest, cache) {\n 'use strict';\n\n var FEATURE_CLUSTER_RADIUS = 12;\n var FEATURE_CLUSTER_RADIUS_MAX = 20;\n var VECTOR_FEATURE_SELECTION_OVERLAY = 'org-bigconnect-map-vector-selected-overlay';\n\n var DEFAULT_LAYER_CONFIG = {\n sortable: true,\n toggleable: true\n };\n\n var layers = {\n tile: {\n configure: function configure(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var source = options.source,\n _options$sourceOption = options.sourceOptions,\n sourceOptions = _options$sourceOption === undefined ? {} : _options$sourceOption,\n config = _objectWithoutProperties(options, ['source', 'sourceOptions']);\n\n var baseLayerSource = void 0;\n\n if (source in ol.source && _.isFunction(ol.source[source])) {\n baseLayerSource = new ol.source[source](_extends({\n crossOrigin: 'anonymous'\n }, sourceOptions));\n } else {\n console.error('Unknown map provider type: ', source);\n throw new Error('map.provider is invalid');\n }\n\n var layer = new ol.layer.Tile(_extends({}, DEFAULT_LAYER_CONFIG, {\n id: id,\n label: 'Base',\n type: 'tile',\n sortable: false,\n source: baseLayerSource\n }, config));\n\n return { source: baseLayerSource, layer: layer };\n },\n addEvents: function addEvents(map, _ref, handlers) {\n var source = _ref.source;\n\n return [source.on('tileloaderror', function (event) {\n var MaxRetry = 3;\n var tile = event.tile;\n\n\n if (tile) {\n tile._retryCount = (tile._retryCount || 0) + 1;\n if (tile._retryCount <= MaxRetry) {\n console.warn('Tile error retry: ' + tile._retryCount + ' of ' + MaxRetry, tile.src_);\n _.defer(function () {\n tile.load();\n });\n }\n }\n })];\n }\n },\n\n cluster: {\n configure: function configure(id) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var source = new ol.source.Vector({ features: [] });\n var clusterSource = new MultiPointCluster({ source: source });\n var layer = new ol.layer.Vector(_extends({}, DEFAULT_LAYER_CONFIG, {\n id: id,\n label: 'Cluster',\n type: 'cluster',\n style: function style(cluster) {\n return _this.style(cluster, { source: source });\n },\n source: clusterSource\n }, options));\n var heatmap = new ol.layer.Heatmap(_extends({}, DEFAULT_LAYER_CONFIG, options, {\n visible: false,\n id: 'heatmap_cluster',\n label: 'Heatmap',\n type: 'cluster_heatmap',\n source: source\n }));\n\n cache.clear();\n\n return { source: source, clusterSource: clusterSource, layers: [heatmap, layer] };\n },\n style: function style(cluster) {\n var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n source = _ref2.source,\n _ref2$selected = _ref2.selected,\n selected = _ref2$selected === undefined ? false : _ref2$selected;\n\n var count = cluster.get('count');\n var selectionState = cluster.get('selectionState') || 'none';\n var isSelected = selected || selectionState !== 'none';\n\n if (count > 1) {\n return styles.cluster(cluster, { selected: isSelected, source: source });\n } else {\n return styles.feature(cluster.get('features')[0], { selected: isSelected });\n }\n },\n addEvents: function addEvents(map, _ref3, handlers) {\n var _this2 = this;\n\n var source = _ref3.source,\n clusterSource = _ref3.clusterSource,\n layers = _ref3.layers;\n\n var _layers = _slicedToArray(layers, 2),\n heatmapLayer = _layers[0],\n vectorLayer = _layers[1];\n\n var addToElements = function addToElements(list) {\n return function (feature) {\n var el = feature.get('element');\n var key = el.type === 'vertex' ? 'vertices' : 'edges';\n list[key].push(el.id);\n };\n };\n var isPartiallySelected = function isPartiallySelected(cluster) {\n if (cluster.get('count') < 2) return false;\n\n var features = cluster.get('features');\n var selected = features.filter(function (f) {\n return f.get('selected');\n });\n return 0 < selected.length && selected.length < features.length;\n };\n var getClusterFromEvent = function getClusterFromEvent(_ref4) {\n var pixel = _ref4.pixel;\n\n var pixelFeatures = map.getFeaturesAtPixel(pixel, {\n layerFilter: function layerFilter(layer) {\n return layer === vectorLayer;\n }\n });\n return pixelFeatures && pixelFeatures[0];\n };\n\n // For heatmap selections\n var onHeatmapClick = map.on('click', function (_ref5) {\n var pixel = _ref5.pixel;\n\n var elements = { vertices: [], edges: [] };\n map.forEachFeatureAtPixel(pixel, addToElements(elements), {\n layerFilter: function layerFilter(layer) {\n return layer === heatmapLayer;\n }\n });\n\n if (elements.vertices.length || elements.edges.length) {\n handlers.onSelectElements(elements);\n }\n });\n\n // For partial cluster selections\n var onClusterClick = map.on('click', function (event) {\n var targetFeature = getClusterFromEvent(event);\n\n if (targetFeature && isPartiallySelected(targetFeature)) {\n var elements = { vertices: [], edges: [] };\n var clusterIterator = addToElements(elements);\n\n targetFeature.get('features').forEach(clusterIterator);\n handlers.onAddSelection(elements);\n }\n });\n\n //this does not support ol.interaction.Select.multi because of partial cluster selection\n var selectInteraction = new ol.interaction.Select({\n addCondition: function addCondition(event) {\n if (event.originalEvent.shiftKey) {\n return true;\n } else {\n var targetFeature = getClusterFromEvent(event);\n return !!targetFeature && isPartiallySelected(targetFeature);\n }\n },\n condition: ol.events.condition.click,\n toggleCondition: ol.events.condition.platformModifierKeyOnly,\n layers: [vectorLayer],\n style: function style(cluster) {\n return _this2.style(cluster, { source: source, selected: true });\n }\n });\n\n map.addInteraction(selectInteraction);\n\n var onSelectCluster = selectInteraction.on('select', function (event) {\n var selected = event.selected,\n interaction = event.target;\n\n var clusters = interaction.getFeatures();\n var elements = { vertices: [], edges: [] };\n var clusterIterator = addToElements(elements);\n\n clusters.forEach(function (cluster) {\n var features = cluster.get('features');\n if (isPartiallySelected(cluster) && !selected.includes(cluster)) {\n features = features.filter(function (f) {\n return f.get('selected');\n });\n }\n features.forEach(clusterIterator);\n });\n\n handlers.onSelectElements(elements);\n });\n\n var onClusterSourceChange = clusterSource.on('change', _.debounce(function () {\n var selected = selectInteraction.getFeatures(),\n clusters = this.getFeatures(),\n newSelection = [],\n isSelected = function isSelected(feature) {\n return feature.get('selected');\n };\n\n clusters.forEach(function (cluster) {\n var innerFeatures = cluster.get('features');\n var all = true,\n some = false,\n count = 0;\n innerFeatures.forEach(function (feature) {\n var selected = isSelected(feature);\n all = all && selected;\n some = some || selected;\n count += selected ? 1 : 0;\n });\n\n if (some) {\n newSelection.push(cluster);\n cluster.set('selectionState', all ? 'all' : 'some');\n cluster.set('selectionCount', count);\n } else {\n cluster.unset('selectionState');\n cluster.unset('selectionCount');\n }\n });\n\n selected.clear();\n if (newSelection.length) {\n selected.extend(newSelection);\n }\n }, 100));\n\n return [onHeatmapClick, onClusterClick, onSelectCluster, onClusterSourceChange];\n },\n\n\n update: syncFeatures\n },\n\n ancillary: {\n configure: function configure(id) {\n var _this3 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var map = arguments[2];\n\n var source = new ol.source.Vector({\n features: [],\n wrapX: false\n });\n if (options.getExtent) {\n var _superExtent = source.getExtent;\n source.getExtent = function () {\n var extent = _superExtent && _superExtent.apply(this, arguments);\n var customExtent = options.getExtent(map, source, extent);\n if (ol.extent.isEmpty(customExtent)) {\n return extent || ol.extent.createEmpty();\n }\n return customExtent || extent || ol.extent.createEmpty();\n };\n }\n var layer = new ol.layer.Vector(_extends({}, DEFAULT_LAYER_CONFIG, {\n id: id,\n type: 'ancillary',\n sortable: false,\n toggleable: false,\n source: source,\n renderBuffer: 500,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: function style(ancillary) {\n return _this3.style(ancillary);\n }\n }, options));\n\n return { source: source, layer: layer };\n },\n style: function style(ancillary) {\n var extensionStyles = ancillary.get('styles');\n if (extensionStyles) {\n var normal = extensionStyles.normal;\n\n if (normal.length) {\n return normal;\n }\n }\n },\n\n\n update: syncFeatures\n },\n\n vectorXhr: {\n configure: function configure(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _options$sourceOption2 = options.sourceOptions,\n sourceOptions = _options$sourceOption2 === undefined ? {} : _options$sourceOption2,\n layerOptions = _objectWithoutProperties(options, ['sourceOptions']);\n\n var source = new ol.source.Vector(sourceOptions);\n var layer = new ol.layer.Vector(_extends({}, DEFAULT_LAYER_CONFIG, {\n id: id,\n type: 'vectorXhr',\n source: source\n }, layerOptions));\n\n return { source: source, layer: layer };\n },\n addEvents: function addEvents(map, _ref6, handlers) {\n var olSource = _ref6.source,\n layer = _ref6.layer;\n\n var elements = { vertices: [], edges: [] };\n var element = layer.get('element');\n var key = element.type === 'vertex' ? 'vertices' : 'edges';\n var overlayId = getOverlayIdForLayer(layer);\n\n elements[key].push(element.id);\n\n var onGeoShapeClick = map.on('click', function (e) {\n var map = e.map,\n pixel = e.pixel;\n\n var featuresAtPixel = map.getFeaturesAtPixel(pixel);\n var sourceFeatures = olSource.getFeatures();\n\n if (featuresAtPixel) {\n if (featuresAtPixel.length === 1 && featuresAtPixel[0].getId() === overlayId && olSource.getFeatureById(overlayId)) {\n handlers.onSelectElements({ vertices: [], edges: [] });\n } else if (featuresAtPixel.every(function (feature) {\n return sourceFeatures.includes(feature);\n })) {\n handlers.onSelectElements(elements);\n }\n }\n });\n\n var onLayerFeaturesLoaded = olSource.on('propertyChange', function (e) {\n if (e.key === 'status' && e.target.get(e.key) === 'loaded') {\n var selectionOverlay = olSource.getFeatureById(overlayId);\n\n if (selectionOverlay) {\n var extent = void 0;\n\n olSource.forEachFeature(function (feature) {\n var geom = feature.getGeometry();\n var featureExtent = geom.getExtent();\n\n if (feature.getId() !== overlayId) {\n if (extent) {\n ol.extent.extend(extent, featureExtent);\n } else {\n extent = featureExtent;\n }\n }\n });\n\n var geometry = ol.geom.Polygon.fromExtent(extent);\n selectionOverlay.setGeometry(geometry);\n }\n }\n });\n\n return [onGeoShapeClick, onLayerFeaturesLoaded];\n },\n update: function update(source, _ref7) {\n var olSource = _ref7.source,\n layer = _ref7.layer;\n var element = source.element,\n features = source.features,\n selected = source.selected;\n\n var layerStatus = layer.get('status');\n var nextFeatures = [];\n var changed = false;\n var fitFeatures = void 0;\n\n if (element !== layer.get('element')) {\n olSource.set('element', element);\n changed = true;\n }\n\n if (!layerStatus) {\n this.loadFeatures(olSource, layer).then(function (features) {\n if (features) {\n olSource.clear(true);\n olSource.addFeatures(features);\n layer.set('status', 'loaded');\n }\n });\n } else if (selected !== olSource.get('selected')) {\n var overlayId = getOverlayIdForLayer(layer);\n olSource.set('selected', selected);\n changed = true;\n\n if (selected && layerStatus === 'loaded') {\n var extent = void 0;\n olSource.forEachFeature(function (feature) {\n var geom = feature.getGeometry();\n var featureExtent = geom.getExtent();\n\n if (feature.getId() !== overlayId) {\n if (extent) {\n ol.extent.extend(extent, featureExtent);\n } else {\n extent = featureExtent;\n }\n }\n });\n\n var selectedOverlay = new ol.Feature(ol.geom.Polygon.fromExtent(extent || [0, 0, 0, 0]));\n selectedOverlay.setStyle(new ol.style.Style({\n fill: new ol.style.Fill({ color: [0, 136, 204, 0.3] }),\n stroke: new ol.style.Stroke({ color: [0, 136, 204, 0.4], width: 1 })\n }));\n selectedOverlay.setId(overlayId);\n\n olSource.addFeature(selectedOverlay);\n } else {\n var _selectedOverlay = olSource.getFeatureById(overlayId);\n if (_selectedOverlay) {\n olSource.removeFeature(_selectedOverlay);\n }\n }\n }\n\n return { changed: changed };\n },\n loadFeatures: function loadFeatures(olSource, layer) {\n var _layer$getProperties = layer.getProperties(),\n id = _layer$getProperties.id,\n element = _layer$getProperties.element,\n propName = _layer$getProperties.propName,\n propKey = _layer$getProperties.propKey,\n mimeType = _layer$getProperties.mimeType;\n\n layer.set('status', 'loading');\n\n return withDataRequest.dataRequest('vertex', 'propertyValue', id, propName, propKey).then(function (source) {\n var format = getFormatForMimeType(mimeType);\n var dataProjection = format.readProjection(source);\n\n if (!dataProjection || !ol.proj.get(dataProjection.getCode())) {\n throw new Error('unhandledDataProjection');\n } else {\n var features = format.readFeatures(source, {\n dataProjection: dataProjection,\n featureProjection: 'EPSG:3857'\n });\n\n return features;\n }\n }).then(function (features) {\n return features.map(function (feature, i) {\n feature.setId(layer.get('id') + ':' + i);\n feature.set('element', element);\n\n return feature;\n });\n }).catch(function (e) {\n var message = e.message === 'unhandledDataProjection' ? i18n('org.bigconnect.web.product.map.MapWorkProduct.layer.error.data.format') : i18n('org.bigconnect.web.product.map.MapWorkProduct.layer.error');\n\n layer.set('status', { type: 'error', message: message });\n });\n }\n }\n };\n\n var styles = {\n feature: function feature(_feature) {\n var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref8$selected = _ref8.selected,\n selected = _ref8$selected === undefined ? false : _ref8$selected;\n\n var _feature$getPropertie = _feature.getProperties(),\n focused = _feature$getPropertie.focused,\n focusedDim = _feature$getPropertie.focusedDim,\n extensionStyles = _feature$getPropertie.styles,\n featureSelected = _feature$getPropertie.selected,\n radius = _feature$getPropertie._nodeRadius;\n\n var isSelected = selected || featureSelected;\n var needSelectedStyle = true;\n var needFocusStyle = true;\n var styleList = void 0;\n\n if (extensionStyles) {\n var normalStyle = extensionStyles.normal,\n selectedStyle = extensionStyles.selected;\n\n var style = void 0;\n if (normalStyle.length && (!isSelected || !selectedStyle.length)) {\n style = normalStyle;\n } else if (selectedStyle.length && isSelected) {\n style = selectedStyle;\n }\n\n if (style) {\n styleList = _.isArray(style) ? style : [style];\n }\n } else {\n needSelectedStyle = false;\n needFocusStyle = false;\n styleList = cache.getOrCreateFeature({\n src: _feature.get(isSelected ? 'iconUrlSelected' : 'iconUrl'),\n imgSize: _feature.get('iconSize'),\n scale: 1 / _feature.get('pixelRatio'),\n anchor: _feature.get('iconAnchor')\n }, focused);\n }\n\n if (_.isEmpty(styleList)) {\n console.warn('No styles for feature, ignoring.', _feature);\n return [];\n }\n\n if (needFocusStyle && focused) {\n return cache.addFocus(radius, cache.reset(radius, styleList));\n }\n if (focusedDim) {\n return cache.addDim(radius, styleList);\n }\n\n return cache.reset(radius, styleList);\n },\n cluster: function cluster(_cluster) {\n var _ref9 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref9$selected = _ref9.selected,\n selected = _ref9$selected === undefined ? false : _ref9$selected,\n source = _ref9.source,\n clusterSource = _ref9.clusterSource;\n\n var count = _cluster.get('count'),\n focusStats = _cluster.get('focusStats'),\n selectionState = _cluster.get('selectionState') || 'none',\n selectionCount = _cluster.get('selectionCount') || 0,\n _source$countStats = source.countStats,\n min = _source$countStats.min,\n max = _source$countStats.max,\n value = Math.min(max, Math.max(min, count)),\n radius = min === max ? FEATURE_CLUSTER_RADIUS : interpolate(value, min, max, FEATURE_CLUSTER_RADIUS, FEATURE_CLUSTER_RADIUS_MAX);\n\n\n return cache.getOrCreateCluster({\n count: count, radius: radius, selected: selected, selectionState: selectionState, selectionCount: selectionCount, focusStats: focusStats\n });\n }\n };\n\n function interpolate(v, x0, x1, y0, y1) {\n return (y0 * (x1 - v) + y1 * (v - x0)) / (x1 - x0);\n }\n\n function setLayerConfig() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var layer = arguments[1];\n\n var _config$visible = config.visible,\n visible = _config$visible === undefined ? true : _config$visible,\n _config$opacity = config.opacity,\n opacity = _config$opacity === undefined ? 1 : _config$opacity,\n _config$zIndex = config.zIndex,\n zIndex = _config$zIndex === undefined ? 0 : _config$zIndex,\n properties = _objectWithoutProperties(config, ['visible', 'opacity', 'zIndex']);\n\n _.mapObject(properties, function (value, key) {\n if (value === null) {\n layer.unset(key);\n } else {\n layer.set(key, value);\n }\n });\n\n layer.setVisible(visible);\n layer.setOpacity(opacity);\n layer.setZIndex(zIndex);\n }\n\n function syncFeatures(_ref10, _ref11, focused) {\n var features = _ref10.features;\n var source = _ref11.source;\n\n var existingFeatures = _.indexBy(source.getFeatures(), function (f) {\n return f.getId();\n });\n var newFeatures = [];\n var changed = false;\n\n if (features) {\n for (var featureIndex = 0; featureIndex < features.length; featureIndex++) {\n var data = features[featureIndex];\n\n var id = data.id,\n _styles = data.styles,\n geometryOverride = data.geometry,\n geoLocations = data.geoLocations,\n element = data.element,\n rest = _objectWithoutProperties(data, ['id', 'styles', 'geometry', 'geoLocations', 'element']);\n\n var geometry = null;\n\n if (geometryOverride) {\n geometry = geometryOverride;\n } else if (geoLocations) {\n geometry = cache.getOrCreateGeometry(id, geoLocations);\n }\n\n if (geometry) {\n var feature;\n\n (function () {\n var featureValues = _extends({}, rest, {\n element: element,\n geoLocations: geoLocations,\n geometry: geometry\n });\n\n if (_styles) {\n var normal = _styles.normal,\n selected = _styles.selected;\n\n if (normal && normal.length) {\n var radius = getRadiusFromStyles(normal);\n var normalImage = _.isFunction(normal[0].getImage) && normal[0].getImage();\n\n featureValues._nodeRadius = radius;\n\n if (selected.length === 0 && !geometryOverride && normalImage && _.isFunction(normalImage.getStroke)) {\n var newSelected = normal[0].clone();\n var prevStroke = normal[0].getImage().getStroke();\n var newStroke = new ol.style.Stroke({\n color: '#0088cc',\n width: prevStroke && prevStroke.getWidth() || 1\n });\n\n newSelected.image_ = normal[0].getImage().clone({\n stroke: newStroke,\n opacity: 1\n });\n\n featureValues.styles = {\n normal: normal,\n selected: [newSelected]\n };\n } else {\n featureValues.styles = _styles;\n }\n }\n }\n\n if (focused && focused.isFocusing) {\n if (element.id in focused[element.type === 'vertex' ? 'vertices' : 'edges']) {\n featureValues.focused = true;\n featureValues.focusedDim = false;\n } else {\n featureValues.focused = false;\n featureValues.focusedDim = true;\n }\n } else {\n featureValues.focused = false;\n featureValues.focusedDim = false;\n }\n\n if (id in existingFeatures) {\n var existingFeature = existingFeatures[id];\n var diff = _.any(existingFeature.getProperties(), function (val, name) {\n switch (name) {\n case 'styles':\n case 'interacting':\n return false;\n case 'geoLocations':\n return !_.isEqual(val, featureValues[name]);\n default:\n return val !== featureValues[name];\n }\n });\n\n if (diff) {\n changed = true;\n if (existingFeature.get('interacting')) {\n delete featureValues.geometry;\n }\n existingFeature.setProperties(featureValues);\n }\n delete existingFeatures[id];\n } else {\n feature = new ol.Feature(featureValues);\n\n feature.setId(data.id);\n newFeatures.push(feature);\n }\n })();\n }\n }\n }\n\n var fitFeatures = void 0;\n if (newFeatures.length) {\n changed = true;\n source.addFeatures(newFeatures);\n fitFeatures = newFeatures;\n }\n if (!_.isEmpty(existingFeatures)) {\n changed = true;\n _.forEach(existingFeatures, function (feature) {\n return source.removeFeature(feature);\n });\n }\n return { changed: changed, fitFeatures: fitFeatures };\n }\n\n function getFormatForMimeType(mimeType) {\n switch (mimeType) {\n case 'application/vnd.geo+json':\n return new ol.format.GeoJSON();\n case 'application/vnd.google-earth.kml+xml':\n return new ol.format.KML();\n }\n }\n\n function getOverlayIdForLayer(layer) {\n return layer.get('id') + '|' + VECTOR_FEATURE_SELECTION_OVERLAY;\n }\n\n function getRadiusFromStyles(styles) {\n for (var i = styles.length - 1; i >= 0; i--) {\n if (_.isFunction(styles[i].getImage)) {\n var image = styles[i].getImage();\n var radius = image && _.isFunction(image.getRadius) && image.getRadius();\n\n if (radius) {\n var nodeRadius = radius / devicePixelRatio;\n return nodeRadius;\n }\n }\n }\n }\n\n return {\n byType: layers,\n styles: styles,\n setLayerConfig: setLayerConfig\n };\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(11)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ol, Cache) {\n\n var MAX_CACHE_ITEMS = 1000;\n var EXPIRATION_MINUTES = 5;\n var DEBUG = false;\n var SELECTED_COLOR = '#0088cc';\n\n var cache = new Cache(MAX_CACHE_ITEMS, DEBUG);\n var geoCache = new Cache(MAX_CACHE_ITEMS, DEBUG);\n var cacheOptions = {\n expirationSliding: EXPIRATION_MINUTES * 60\n };\n var FocusPadding = 3;\n var FocusCirclePadding = 6;\n var FocusRadius = 5;\n var FocusFill = new ol.style.Fill({ color: SELECTED_COLOR });\n var FocusStroke = new ol.style.Stroke({ color: '#ffffff', width: 1 });\n\n return {\n clear: function clear() {\n cache.clear();\n geoCache.clear();\n },\n getOrCreateGeometry: function getOrCreateGeometry(id, geoLocations) {\n var hash = ['geo', id].concat(_toConsumableArray(geoLocations.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n latitude = _ref2[0],\n longitude = _ref2[1];\n\n return latitude + ',' + longitude;\n }))).join(',');\n var geo = geoCache.getItem(hash);\n if (!geo) {\n geo = new ol.geom.MultiPoint(geoLocations.map(function (geo) {\n return ol.proj.fromLonLat(geo);\n }));\n geoCache.setItem(hash, geo, cacheOptions);\n }\n return geo;\n },\n getOrCreateFeature: function getOrCreateFeature(options, focused) {\n var key = hash(options, focused);\n var cached = cache.getItem(key);\n if (cached) {\n return cached;\n }\n\n var style = [new ol.style.Style({ image: new ol.style.Icon(options), zIndex: 1 })];\n if (focused) {\n var imgSize = options.imgSize,\n _options$anchor = options.anchor,\n anchor = _options$anchor === undefined ? [0.5, 0.5] : _options$anchor;\n\n style.splice(0, 0, new ol.style.Style({\n renderer: function renderer(point, _ref3) {\n var context = _ref3.context,\n feature = _ref3.feature,\n geometry = _ref3.geometry,\n pixelRatio = _ref3.pixelRatio,\n resolution = _ref3.resolution,\n rotation = _ref3.rotation;\n\n context.setTransform(1, 0, 0, 1, 0, 0);\n var x = point[0] - imgSize[0] * anchor[0] - FocusPadding * pixelRatio;\n var y = point[1] - imgSize[1] * anchor[1] - FocusPadding * pixelRatio;\n var w = imgSize[0] + FocusPadding * 2 * pixelRatio;\n var h = imgSize[1] + FocusPadding * 2 * pixelRatio;\n var radius = FocusRadius * pixelRatio;\n\n context.save();\n context.globalAlpha = 0.2;\n context.beginPath();\n context.moveTo(x + radius, y);\n context.lineTo(x + w - radius, y);\n context.quadraticCurveTo(x + w, y, x + w, y + radius);\n context.lineTo(x + w, y + h - radius);\n context.quadraticCurveTo(x + w, y + h, x + w - radius, y + h);\n context.lineTo(x + radius, y + h);\n context.quadraticCurveTo(x, y + h, x, y + h - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n context.closePath();\n context.fillStyle = SELECTED_COLOR;\n context.shadowBlur = radius / 2;\n context.shadowColor = 'white';\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n context.fill();\n\n context.restore();\n },\n\n zIndex: 0\n }));\n }\n cache.setItem(key, style, cacheOptions);\n\n return style;\n },\n getOrCreateCluster: function getOrCreateCluster(_ref4) {\n var count = _ref4.count,\n r = _ref4.radius,\n selected = _ref4.selected,\n selectionState = _ref4.selectionState,\n selectionCount = _ref4.selectionCount,\n _ref4$focusStats = _ref4.focusStats,\n all = _ref4$focusStats.all,\n some = _ref4$focusStats.some,\n dim = _ref4$focusStats.dim;\n\n var key = ['cluster', count, r, selected, selectionState, selectionCount, all, some, dim].join('|');\n\n var style = cache.getItem(key);\n if (style) {\n return style;\n }\n\n style = [new ol.style.Style({\n image: new ol.style.Circle({\n radius: r * devicePixelRatio,\n fill: new ol.style.Fill({ color: 'rgba(255,255,255,0.01)' })\n })\n }), new ol.style.Style({\n renderer: function renderer(_ref5, _ref6) {\n var _ref7 = _slicedToArray(_ref5, 2),\n x = _ref7[0],\n y = _ref7[1];\n\n var context = _ref6.context,\n pixelRatio = _ref6.pixelRatio;\n\n var radius = r * pixelRatio;\n var unselectedFill = 'rgba(241,59,60,0.8)',\n selectedFill = 'rgba(0,112,195,0.8)',\n selectedFillNoAlpha = 'rgb(0,112,195)',\n unselectedStroke = '#AD2E2E',\n stroke = selected ? '#08538B' : unselectedStroke,\n lineWidth = 2 * pixelRatio,\n textStroke = stroke,\n fill = selected ? selectedFill : unselectedFill;\n\n if (selected && selectionState === 'some') {\n fill = unselectedFill;\n textStroke = unselectedStroke;\n stroke = unselectedStroke;\n }\n\n context.save();\n if (dim && !some) {\n context.globalAlpha = 0.4;\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.translate(x, y);\n\n if (some) {\n context.beginPath();\n context.arc(0, 0, radius + FocusCirclePadding * pixelRatio, 0, 2 * Math.PI, true);\n context.fillStyle = 'rgba(0, 136, 204, 0.2)';\n context.fill();\n context.closePath();\n }\n\n context.beginPath();\n context.arc(0, 0, radius, 0, 2 * Math.PI, true);\n context.fillStyle = fill;\n context.fill();\n\n if (selectionState === 'some') {\n context.strokeStyle = stroke;\n context.lineWidth = Math.max(4 * pixelRatio, lineWidth);\n context.stroke();\n context.closePath();\n var portion = Math.max(0.1, Math.min(0.9, selectionCount / count));\n context.beginPath();\n context.arc(0, 0, radius, Math.PI / -2, Math.PI * 2 * portion - Math.PI / 2, false);\n context.strokeStyle = selectedFillNoAlpha;\n context.stroke();\n context.closePath();\n } else {\n context.strokeStyle = stroke;\n context.lineWidth = lineWidth;\n context.stroke();\n context.closePath();\n }\n\n context.font = 'bold condensed ' + radius + 'px sans-serif';\n context.textAlign = 'center';\n context.fillStyle = 'white';\n context.textBaseline = 'middle';\n context.strokeStyle = textStroke;\n context.lineWidth = pixelRatio;\n\n if (some && some !== count) {\n var text = some.toString();\n context.strokeText(text, 0, radius * -0.4);\n context.fillText(text, 0, radius * -0.4);\n\n context.font = 'bold condensed ' + radius * 0.7 + 'px sans-serif';\n context.fillStyle = 'rgba(255,255,255,0.8)';\n context.strokeText(count.toString(), 0, radius * 0.55);\n context.fillText(count.toString(), 0, radius * 0.55);\n\n context.beginPath();\n context.moveTo(radius * -0.5, radius * 0.1);\n context.lineTo(radius * 0.5, radius * 0.1);\n context.strokeStyle = 'rgba(255,255,255,0.3)';\n context.stroke();\n context.closePath();\n } else {\n var _text = count.toString();\n context.strokeText(_text, 0, 0);\n context.fillText(_text, 0, 0);\n }\n\n context.restore();\n }\n })];\n\n cache.setItem(key, style, cacheOptions);\n return style;\n },\n addFocus: function addFocus(radius, list) {\n var key = 'focus' + radius;\n var focusStyle = cache.getItem(key);\n if (!focusStyle) {\n focusStyle = new ol.style.Style({\n image: new ol.style.Circle({\n radius: radius + 5,\n fill: FocusFill,\n stroke: FocusStroke\n }),\n zIndex: 0\n });\n focusStyle.getImage().setOpacity(0.2);\n cache.setItem(key, focusStyle, cacheOptions);\n }\n\n return [focusStyle].concat(_toConsumableArray(list));\n },\n addDim: function addDim(radius, list) {\n var image = list.length && list[0].getImage();\n if (image) {\n image.setOpacity(0.4);\n }\n return list;\n },\n reset: function reset(radius, list) {\n var image = list.length && list[0].getImage();\n if (image && image.getOpacity() < 1) {\n image.setOpacity(1);\n }\n return list;\n }\n };\n\n function hash(_ref8, focused) {\n var src = _ref8.src,\n imgSize = _ref8.imgSize,\n scale = _ref8.scale,\n anchor = _ref8.anchor;\n\n return [focused, src, imgSize[0] + ',' + imgSize[1], scale, anchor[0] + ',' + anchor[1]].join('|');\n }\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n\n/**\n * This file is a fork of http://openlayers.org/en/master/apidoc/ol.source.Cluster.html\n * with support for multi-point clusters.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ol) {\n 'use strict';\n\n var MultiPointCluster = function MultiPointCluster(options) {\n ol.source.Vector.call(this, {\n attributions: options.attributions,\n extent: options.extent,\n logo: options.logo,\n projection: options.projection,\n wrapX: options.wrapX\n });\n\n this.resolution = undefined;\n this.distance = 20 * devicePixelRatio;\n this.features = [];\n this.geometryFunction = options.geometryFunction || function (feature) {\n return feature.getGeometry();\n };\n this.source = options.source;\n this.refresh = _.debounce(this.refresh.bind(this), 100);\n this.source.on('change', this.refresh);\n };\n\n ol.inherits(MultiPointCluster, ol.source.Vector);\n\n MultiPointCluster.prototype.refresh = function () {\n this.clear();\n this.cluster();\n this.addFeatures(this.features);\n this.changed();\n };\n\n MultiPointCluster.prototype.getSource = function () {\n return this.source;\n };\n\n MultiPointCluster.prototype.loadFeatures = function (extent, resolution, projection) {\n this.source.loadFeatures(extent, resolution, projection);\n this.updateResolution(resolution);\n };\n\n MultiPointCluster.prototype.updateResolution = function (resolution) {\n if (resolution !== this.resolution) {\n this.clear();\n this.resolution = resolution;\n this.cluster();\n this.addFeatures(this.features);\n }\n };\n\n MultiPointCluster.prototype.setDistance = function (distance) {\n this.distance = distance;\n this.refresh();\n };\n\n MultiPointCluster.prototype.cluster = function () {\n var self = this;\n if (this.resolution === undefined) {\n return;\n }\n var resolution = this.resolution;\n var distance = this.distance;\n this.features.length = 0;\n var source = this.source;\n var features = source.getFeatures();\n var clustered = {};\n\n var getRadius = function getRadius(feature) {\n var radius = feature.get('_nodeRadius') * devicePixelRatio;\n return radius || distance;\n };\n var maxRadius = features.reduce(function (max, f) {\n var radius = getRadius(f);\n return Math.max(max, radius);\n }, 0);\n var countStats = { max: 0, min: Number.MAX_VALUE };\n this.source.countStats = countStats;\n\n for (var i = 0; i < features.length; i++) {\n clusterFeature(features[i]);\n }\n\n function clusterFeature(feature) {\n var radius = getRadius(feature);\n var mapDistanceSearch = (radius + maxRadius) * resolution;\n var mapDistance = radius * resolution;\n var geometry = self.geometryFunction(feature);\n if (geometry) {\n var coordinates = geometry.getCoordinates();\n for (var _i = 0; _i < coordinates.length; _i++) {\n clusterCoordinate(coordinates[_i], _i);\n }\n }\n\n function clusterCoordinate(coordinate, coordinateIndex) {\n if (!(feature.getId().toString() + '_' + coordinateIndex in clustered)) {\n\n // Search radius is this feature box + max size\n var extentSearch = ol.extent.boundingExtent([coordinate]);\n ol.extent.buffer(extentSearch, mapDistanceSearch, extentSearch);\n\n // Exact bounds to further match for collision\n var extent1 = ol.extent.boundingExtent([coordinate]);\n ol.extent.buffer(extent1, mapDistance, extent1);\n\n var neighbors = source.getFeaturesInExtent(extentSearch),\n coords = [],\n count = 0;\n\n var featuresToCluster = neighbors.filter(function (neighbor) {\n var neighborGeometry = self.geometryFunction(neighbor);\n var neighborCoordinates = neighborGeometry.getCoordinates();\n var neighborUid = neighbor.getId().toString() + '_';\n\n var coordsInCluster = neighborCoordinates.filter(function (coordinate, coordinateIndex) {\n var uid = neighborUid + coordinateIndex;\n\n var extent2 = ol.extent.boundingExtent([coordinate]);\n ol.extent.buffer(extent2, getRadius(neighbor) * resolution, extent2);\n\n if (ol.extent.intersects(extent1, extent2)) {\n if (!(uid in clustered)) {\n coords.push(coordinate);\n clustered[uid] = true;\n return true;\n }\n }\n return false;\n }).length;\n count += coordsInCluster;\n return coordsInCluster > 0;\n });\n\n countStats.max = Math.max(count, countStats.max);\n countStats.min = Math.min(count, countStats.min);\n self.features.push(self.createCluster(featuresToCluster, coords, count));\n }\n }\n }\n };\n\n MultiPointCluster.prototype.createCluster = function (features, coordinates, count) {\n var focusStats = { some: 0, all: false, dim: false };\n features.forEach(function (feature) {\n var focused = feature.get('focused');\n focusStats.some += focused ? 1 : 0;\n focusStats.all = focusStats.all && focused;\n focusStats.dim = focusStats.dim || feature.get('focusedDim');\n });\n var centers = coordinates.reduce(function (sums, c) {\n return sums.map(function (s, i) {\n return s + c[i];\n });\n }, [0, 0]);\n var average = centers.map(function (val) {\n return val / coordinates.length;\n });\n var geometry = new ol.geom.Point(average);\n\n return new ol.Feature({ geometry: geometry, features: features, coordinates: coordinates, count: count, focusStats: focusStats });\n };\n\n return MultiPointCluster;\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ })\n\n/******/ });\n});\n\n\n// WEBPACK FOOTER //\n// geoShapePreview.js","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"openlayers\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 0\n// module chunks = 0 1 2","module.exports = __WEBPACK_EXTERNAL_MODULE_10__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"util/withDataRequest\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 10\n// module chunks = 0 1 2","module.exports = __WEBPACK_EXTERNAL_MODULE_11__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"jscache\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 11\n// module chunks = 0 1 2","module.exports = __WEBPACK_EXTERNAL_MODULE_12__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"util/vertex/formatters\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 12\n// module chunks = 0 1 2","module.exports = __WEBPACK_EXTERNAL_MODULE_19__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"util/mapConfig\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 19\n// module chunks = 1 2","/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\ndefine([\n 'public/v1/api',\n 'openlayers',\n '../util/layerHelpers',\n 'util/mapConfig',\n 'util/vertex/formatters'\n], function(\n api,\n ol,\n layerHelpers,\n mapConfig,\n F) {\n 'use strict';\n\n const featureCache = {};\n\n return api.defineComponent(GeoShapePreview);\n\n function GeoShapePreview() {\n\n this.attributes({\n ignoreUpdateModelNotImplemented: true\n })\n\n this.before('initialize', function(node, config) {\n this.element = config.model;\n });\n\n this.after('initialize', function() {\n this.setupMap();\n })\n\n this.setupMap = function() {\n const { vectorXhr: layerHelper, tile } = layerHelpers.byType;\n const { source, sourceOptions } = mapConfig();\n\n const { layer: tileLayer } = tile.configure('base', { source, sourceOptions });\n const { source: olSource, layer: geoShapeLayer } = layerHelper.configure(this.element.id, {\n id: this.element.id,\n element: this.element,\n propName: ONTOLOGY_CONSTANTS.PROP_RAW,\n propKey: '',\n mimeType: F.vertex.prop(this.element, ONTOLOGY_CONSTANTS.PROP_MIME_TYPE),\n sourceOptions: {\n wrapX: false\n }\n });\n\n const map = new ol.Map({\n target: this.node,\n layers: [\n tileLayer,\n geoShapeLayer\n ],\n controls: [new ol.control.Zoom()],\n view: new ol.View({\n zoom: 2,\n minZoom: 1,\n center: [0, 0],\n })\n });\n\n this.geoShapeLayer = geoShapeLayer;\n this.map = map;\n\n let featurePromise = featureCache[this.element.id] || layerHelper.loadFeatures(olSource, geoShapeLayer);\n\n Promise.resolve(featurePromise).then((features) => {\n const view = this.map.getView();\n const olSource = this.geoShapeLayer.getSource();\n\n olSource.addFeatures(features);\n this.geoShapeLayer.set('status', 'loaded');\n\n view.fit(olSource.getExtent());\n\n if (!featureCache[this.element.id]) {\n featureCache[this.element.id] = features;\n }\n });\n };\n\n this.onDetailPaneResize = function() {\n if (this.map) {\n this.map.updateSize();\n }\n }\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// ./detail/geoShapePreview.js","module.exports = __WEBPACK_EXTERNAL_MODULE_192__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"public/v1/api\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 192\n// module chunks = 2","/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\ndefine([\n 'openlayers',\n '../multiPointCluster',\n 'util/withDataRequest',\n './cache',\n], function(\n ol,\n MultiPointCluster,\n withDataRequest,\n cache\n) {\n 'use strict';\n\n const FEATURE_CLUSTER_RADIUS = 12;\n const FEATURE_CLUSTER_RADIUS_MAX = 20;\n const VECTOR_FEATURE_SELECTION_OVERLAY = 'org-bigconnect-map-vector-selected-overlay';\n\n const DEFAULT_LAYER_CONFIG = {\n sortable: true,\n toggleable: true\n };\n\n const layers = {\n tile: {\n configure(id, options = {}) {\n const { source, sourceOptions = {}, ...config } = options;\n let baseLayerSource;\n\n if (source in ol.source && _.isFunction(ol.source[source])) {\n baseLayerSource = new ol.source[source]({\n crossOrigin: 'anonymous',\n ...sourceOptions\n });\n } else {\n console.error('Unknown map provider type: ', source);\n throw new Error('map.provider is invalid')\n }\n\n const layer = new ol.layer.Tile({\n ...DEFAULT_LAYER_CONFIG,\n id,\n label: 'Base',\n type: 'tile',\n sortable: false,\n source: baseLayerSource,\n ...config\n });\n\n return { source: baseLayerSource, layer }\n },\n\n addEvents(map, { source }, handlers) {\n return [\n source.on('tileloaderror', function(event) {\n const MaxRetry = 3;\n const { tile } = event;\n\n if (tile) {\n tile._retryCount = (tile._retryCount || 0) + 1;\n if (tile._retryCount <= MaxRetry) {\n console.warn(`Tile error retry: ${tile._retryCount} of ${MaxRetry}`, tile.src_);\n _.defer(() => {\n tile.load();\n })\n }\n }\n })\n ]\n }\n },\n\n cluster: {\n configure(id, options = {}) {\n const source = new ol.source.Vector({ features: [] });\n const clusterSource = new MultiPointCluster({ source });\n const layer = new ol.layer.Vector({\n ...DEFAULT_LAYER_CONFIG,\n id,\n label: 'Cluster',\n type: 'cluster',\n style: cluster => this.style(cluster, { source }),\n source: clusterSource,\n ...options\n });\n const heatmap = new ol.layer.Heatmap({\n ...DEFAULT_LAYER_CONFIG,\n ...options,\n visible: false,\n id: 'heatmap_cluster',\n label: 'Heatmap',\n type: 'cluster_heatmap',\n source\n })\n\n cache.clear();\n\n return { source, clusterSource, layers: [heatmap, layer] }\n },\n\n style(cluster, { source, selected = false } = {}) {\n const count = cluster.get('count');\n const selectionState = cluster.get('selectionState') || 'none';\n const isSelected = selected || selectionState !== 'none';\n\n if (count > 1) {\n return styles.cluster(cluster, { selected: isSelected, source });\n } else {\n return styles.feature(cluster.get('features')[0], { selected: isSelected })\n }\n },\n\n addEvents(map, { source, clusterSource, layers }, handlers) {\n const [ heatmapLayer, vectorLayer ] = layers;\n const addToElements = list => feature => {\n const el = feature.get('element');\n const key = el.type === 'vertex' ? 'vertices' : 'edges';\n list[key].push(el.id);\n };\n const isPartiallySelected = (cluster) => {\n if (cluster.get('count') < 2) return false;\n\n const features = cluster.get('features');\n const selected = features.filter(f => f.get('selected'));\n return 0 < selected.length && selected.length < features.length;\n };\n const getClusterFromEvent = ({ pixel }) => {\n const pixelFeatures = map.getFeaturesAtPixel(pixel, {\n layerFilter: layer => layer === vectorLayer\n });\n return pixelFeatures && pixelFeatures[0];\n };\n\n // For heatmap selections\n const onHeatmapClick = map.on('click', ({ pixel }) => {\n const elements = { vertices: [], edges: [] };\n map.forEachFeatureAtPixel(pixel, addToElements(elements), {\n layerFilter: layer => layer === heatmapLayer\n });\n\n if (elements.vertices.length || elements.edges.length) {\n handlers.onSelectElements(elements);\n }\n });\n\n // For partial cluster selections\n const onClusterClick = map.on('click', event => {\n const targetFeature = getClusterFromEvent(event);\n\n if (targetFeature && isPartiallySelected(targetFeature)) {\n const elements = { vertices: [], edges: [] };\n const clusterIterator = addToElements(elements);\n\n targetFeature.get('features').forEach(clusterIterator);\n handlers.onAddSelection(elements);\n }\n });\n\n //this does not support ol.interaction.Select.multi because of partial cluster selection\n const selectInteraction = new ol.interaction.Select({\n addCondition: (event) => {\n if (event.originalEvent.shiftKey) {\n return true;\n } else {\n const targetFeature = getClusterFromEvent(event);\n return !!targetFeature && isPartiallySelected(targetFeature);\n }\n },\n condition: ol.events.condition.click,\n toggleCondition: ol.events.condition.platformModifierKeyOnly,\n layers: [vectorLayer],\n style: cluster => this.style(cluster, { source, selected: true })\n });\n\n map.addInteraction(selectInteraction);\n\n const onSelectCluster = selectInteraction.on('select', function(event) {\n const { selected, target: interaction } = event;\n const clusters = interaction.getFeatures();\n const elements = { vertices: [], edges: [] };\n const clusterIterator = addToElements(elements);\n\n clusters.forEach(cluster => {\n let features = cluster.get('features');\n if (isPartiallySelected(cluster) && !selected.includes(cluster)) {\n features = features.filter(f => f.get('selected'));\n }\n features.forEach(clusterIterator);\n });\n\n handlers.onSelectElements(elements);\n });\n\n const onClusterSourceChange = clusterSource.on('change', _.debounce(function() {\n var selected = selectInteraction.getFeatures(),\n clusters = this.getFeatures(),\n newSelection = [],\n isSelected = feature => feature.get('selected');\n\n clusters.forEach(cluster => {\n var innerFeatures = cluster.get('features');\n var all = true, some = false, count = 0;\n innerFeatures.forEach(feature => {\n const selected = isSelected(feature);\n all = all && selected;\n some = some || selected;\n count += (selected ? 1 : 0)\n })\n\n if (some) {\n newSelection.push(cluster);\n cluster.set('selectionState', all ? 'all' : 'some');\n cluster.set('selectionCount', count);\n } else {\n cluster.unset('selectionState');\n cluster.unset('selectionCount');\n }\n })\n\n selected.clear()\n if (newSelection.length) {\n selected.extend(newSelection)\n }\n }, 100));\n\n return [\n onHeatmapClick,\n onClusterClick,\n onSelectCluster,\n onClusterSourceChange\n ]\n },\n\n update: syncFeatures\n },\n\n ancillary: {\n configure(id, options = {}, map) {\n const source = new ol.source.Vector({\n features: [],\n wrapX: false\n });\n if (options.getExtent) {\n const _superExtent = source.getExtent;\n source.getExtent = function() {\n const extent = _superExtent && _superExtent.apply(this, arguments);\n const customExtent = options.getExtent(map, source, extent);\n if (ol.extent.isEmpty(customExtent)) {\n return extent || ol.extent.createEmpty();\n }\n return customExtent || extent || ol.extent.createEmpty();\n };\n }\n const layer = new ol.layer.Vector({\n ...DEFAULT_LAYER_CONFIG,\n id,\n type: 'ancillary',\n sortable: false,\n toggleable: false,\n source,\n renderBuffer: 500,\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n style: ancillary => this.style(ancillary),\n ...options\n });\n\n return { source, layer }\n },\n\n style(ancillary) {\n const extensionStyles = ancillary.get('styles');\n if (extensionStyles) {\n const { normal } = extensionStyles;\n if (normal.length) {\n return normal;\n }\n }\n },\n\n update: syncFeatures\n },\n\n vectorXhr: {\n configure(id, options = {}) {\n const { sourceOptions = {}, ...layerOptions } = options;\n const source = new ol.source.Vector(sourceOptions);\n const layer = new ol.layer.Vector({\n ...DEFAULT_LAYER_CONFIG,\n id,\n type: 'vectorXhr',\n source,\n ...layerOptions\n });\n\n return { source, layer };\n },\n\n addEvents(map, { source: olSource, layer }, handlers) {\n const elements = { vertices: [], edges: [] };\n const element = layer.get('element');\n const key = element.type === 'vertex' ? 'vertices' : 'edges';\n const overlayId = getOverlayIdForLayer(layer);\n\n elements[key].push(element.id);\n\n const onGeoShapeClick = map.on('click', (e) => {\n const { map, pixel } = e;\n const featuresAtPixel = map.getFeaturesAtPixel(pixel);\n const sourceFeatures = olSource.getFeatures();\n\n if (featuresAtPixel) {\n if (featuresAtPixel.length === 1\n && featuresAtPixel[0].getId() === overlayId\n && olSource.getFeatureById(overlayId)) {\n handlers.onSelectElements({ vertices: [], edges: [] });\n } else if (featuresAtPixel.every(feature => sourceFeatures.includes(feature))) {\n handlers.onSelectElements(elements);\n }\n }\n });\n\n const onLayerFeaturesLoaded = olSource.on('propertyChange', (e) => {\n if (e.key === 'status' && e.target.get(e.key) === 'loaded') {\n const selectionOverlay = olSource.getFeatureById(overlayId);\n\n if (selectionOverlay) {\n let extent;\n\n olSource.forEachFeature(feature => {\n const geom = feature.getGeometry();\n const featureExtent = geom.getExtent();\n\n if (feature.getId() !== overlayId) {\n if (extent) {\n ol.extent.extend(extent, featureExtent);\n } else {\n extent = featureExtent;\n }\n }\n });\n\n const geometry = ol.geom.Polygon.fromExtent(extent);\n selectionOverlay.setGeometry(geometry);\n }\n }\n });\n\n return [ onGeoShapeClick, onLayerFeaturesLoaded ]\n },\n\n update(source, { source: olSource, layer }) {\n const { element, features, selected } = source;\n const layerStatus = layer.get('status');\n const nextFeatures = [];\n let changed = false;\n let fitFeatures;\n\n if (element !== layer.get('element')) {\n olSource.set('element', element);\n changed = true;\n }\n\n if (!layerStatus) {\n this.loadFeatures(olSource, layer).then((features) => {\n if (features) {\n olSource.clear(true)\n olSource.addFeatures(features);\n layer.set('status', 'loaded');\n }\n });\n } else if (selected !== olSource.get('selected')) {\n const overlayId = getOverlayIdForLayer(layer);\n olSource.set('selected', selected);\n changed = true;\n\n if (selected && layerStatus === 'loaded') {\n let extent;\n olSource.forEachFeature(feature => {\n const geom = feature.getGeometry();\n const featureExtent = geom.getExtent();\n\n if (feature.getId() !== overlayId) {\n if (extent) {\n ol.extent.extend(extent, featureExtent);\n } else {\n extent = featureExtent;\n }\n }\n });\n\n const selectedOverlay = new ol.Feature(ol.geom.Polygon.fromExtent(extent || [0, 0, 0, 0]));\n selectedOverlay.setStyle(new ol.style.Style({\n fill: new ol.style.Fill({ color: [0, 136, 204, 0.3] }),\n stroke: new ol.style.Stroke({ color: [0, 136, 204, 0.4], width: 1 })\n }));\n selectedOverlay.setId(overlayId)\n\n olSource.addFeature(selectedOverlay);\n } else {\n const selectedOverlay = olSource.getFeatureById(overlayId);\n if (selectedOverlay) {\n olSource.removeFeature(selectedOverlay);\n }\n }\n }\n\n return { changed };\n },\n\n loadFeatures(olSource, layer) {\n const { id, element, propName, propKey, mimeType } = layer.getProperties();\n\n layer.set('status', 'loading');\n\n return withDataRequest.dataRequest('vertex', 'propertyValue', id, propName, propKey).then(source => {\n const format = getFormatForMimeType(mimeType);\n const dataProjection = format.readProjection(source);\n\n if (!dataProjection || !ol.proj.get(dataProjection.getCode())) {\n throw new Error('unhandledDataProjection');\n } else {\n const features = format.readFeatures(source, {\n dataProjection,\n featureProjection: 'EPSG:3857'\n });\n\n return features;\n }\n\n })\n .then(features => {\n return features.map((feature, i) => {\n feature.setId(`${layer.get('id')}:${i}`)\n feature.set('element', element)\n\n return feature\n })\n })\n .catch(e => {\n const message = e.message === 'unhandledDataProjection'\n ? i18n('org.bigconnect.web.product.map.MapWorkProduct.layer.error.data.format')\n : i18n('org.bigconnect.web.product.map.MapWorkProduct.layer.error');\n\n layer.set('status', { type: 'error', message });\n });\n }\n }\n };\n\n\n const styles = {\n feature(feature, { selected = false } = {}) {\n const {\n focused,\n focusedDim,\n styles: extensionStyles,\n selected: featureSelected,\n _nodeRadius: radius\n } = feature.getProperties();\n\n const isSelected = selected || featureSelected;\n let needSelectedStyle = true;\n let needFocusStyle = true;\n let styleList;\n\n if (extensionStyles) {\n const { normal: normalStyle, selected: selectedStyle } = extensionStyles;\n let style;\n if (normalStyle.length && (!isSelected || !selectedStyle.length)) {\n style = normalStyle;\n } else if (selectedStyle.length && isSelected) {\n style = selectedStyle;\n }\n\n if (style) {\n styleList = _.isArray(style) ? style : [style];\n }\n } else {\n needSelectedStyle = false;\n needFocusStyle = false;\n styleList = cache.getOrCreateFeature({\n src: feature.get(isSelected ? 'iconUrlSelected' : 'iconUrl'),\n imgSize: feature.get('iconSize'),\n scale: 1 / feature.get('pixelRatio'),\n anchor: feature.get('iconAnchor')\n }, focused)\n }\n\n if (_.isEmpty(styleList)) {\n console.warn('No styles for feature, ignoring.', feature);\n return [];\n }\n\n if (needFocusStyle && focused) {\n return cache.addFocus(radius, cache.reset(radius, styleList));\n }\n if (focusedDim) {\n return cache.addDim(radius, styleList)\n }\n\n return cache.reset(radius, styleList);\n },\n\n cluster(cluster, { selected = false, source, clusterSource } = {}) {\n var count = cluster.get('count'),\n focusStats = cluster.get('focusStats'),\n selectionState = cluster.get('selectionState') || 'none',\n selectionCount = cluster.get('selectionCount') || 0,\n { min, max } = source.countStats,\n value = Math.min(max, Math.max(min, count)),\n radius = min === max ?\n FEATURE_CLUSTER_RADIUS :\n interpolate(value, min, max, FEATURE_CLUSTER_RADIUS, FEATURE_CLUSTER_RADIUS_MAX);\n\n return cache.getOrCreateCluster({\n count, radius, selected, selectionState, selectionCount, focusStats\n })\n }\n };\n\n function interpolate(v, x0, x1, y0, y1) {\n return (y0 * (x1 - v) + y1 * (v - x0)) / (x1 - x0)\n }\n\n function setLayerConfig(config = {}, layer) {\n const { visible = true, opacity = 1, zIndex = 0, ...properties } = config;\n\n _.mapObject(properties, (value, key) => {\n if (value === null) {\n layer.unset(key);\n } else {\n layer.set(key, value);\n }\n })\n\n layer.setVisible(visible)\n layer.setOpacity(opacity)\n layer.setZIndex(zIndex)\n }\n\n function syncFeatures({ features }, { source }, focused) {\n const existingFeatures = _.indexBy(source.getFeatures(), f => f.getId());\n const newFeatures = [];\n var changed = false;\n\n if (features) {\n for (let featureIndex = 0; featureIndex < features.length; featureIndex++) {\n const data = features[featureIndex];\n const { id, styles, geometry: geometryOverride, geoLocations, element, ...rest } = data;\n let geometry = null;\n\n if (geometryOverride) {\n geometry = geometryOverride;\n } else if (geoLocations) {\n geometry = cache.getOrCreateGeometry(id, geoLocations);\n }\n\n if (geometry) {\n let featureValues = {\n ...rest,\n element,\n geoLocations,\n geometry\n };\n\n if (styles) {\n const { normal, selected } = styles;\n if (normal && normal.length) {\n const radius = getRadiusFromStyles(normal);\n const normalImage = _.isFunction(normal[0].getImage) &&\n normal[0].getImage();\n\n featureValues._nodeRadius = radius\n\n if (selected.length === 0 && !geometryOverride && normalImage && _.isFunction(normalImage.getStroke)) {\n const newSelected = normal[0].clone();\n const prevStroke = normal[0].getImage().getStroke();\n const newStroke = new ol.style.Stroke({\n color: '#0088cc',\n width: prevStroke && prevStroke.getWidth() || 1\n })\n\n newSelected.image_ = normal[0].getImage().clone({\n stroke: newStroke,\n opacity: 1\n });\n\n featureValues.styles = {\n normal,\n selected: [newSelected]\n }\n } else {\n featureValues.styles = styles;\n }\n }\n }\n\n if (focused && focused.isFocusing) {\n if (element.id in focused[element.type === 'vertex' ? 'vertices' : 'edges']) {\n featureValues.focused = true\n featureValues.focusedDim = false\n } else {\n featureValues.focused = false\n featureValues.focusedDim = true\n }\n } else {\n featureValues.focused = false\n featureValues.focusedDim = false\n }\n\n if (id in existingFeatures) {\n const existingFeature = existingFeatures[id];\n let diff = _.any(existingFeature.getProperties(), (val, name) => {\n switch (name) {\n case 'styles':\n case 'interacting':\n return false\n case 'geoLocations':\n return !_.isEqual(val, featureValues[name])\n default:\n return val !== featureValues[name]\n }\n })\n\n if (diff) {\n changed = true\n if (existingFeature.get('interacting')) {\n delete featureValues.geometry;\n }\n existingFeature.setProperties(featureValues)\n }\n delete existingFeatures[id];\n } else {\n var feature = new ol.Feature(featureValues);\n feature.setId(data.id);\n newFeatures.push(feature);\n }\n }\n }\n }\n\n let fitFeatures;\n if (newFeatures.length) {\n changed = true\n source.addFeatures(newFeatures);\n fitFeatures = newFeatures;\n }\n if (!_.isEmpty(existingFeatures)) {\n changed = true\n _.forEach(existingFeatures, feature => source.removeFeature(feature));\n }\n return { changed, fitFeatures };\n }\n\n function getFormatForMimeType(mimeType) {\n switch (mimeType) {\n case 'application/vnd.geo+json':\n return new ol.format.GeoJSON();\n case 'application/vnd.google-earth.kml+xml':\n return new ol.format.KML();\n }\n }\n\n function getOverlayIdForLayer(layer) {\n return layer.get('id') + '|' + VECTOR_FEATURE_SELECTION_OVERLAY;\n }\n\n function getRadiusFromStyles(styles) {\n for (let i = styles.length - 1; i >= 0; i--) {\n if (_.isFunction(styles[i].getImage)) {\n const image = styles[i].getImage();\n const radius = image && _.isFunction(image.getRadius) && image.getRadius();\n\n if (radius) {\n const nodeRadius = radius / devicePixelRatio\n return nodeRadius;\n }\n }\n }\n }\n\n return {\n byType: layers,\n styles,\n setLayerConfig\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./util/layerHelpers.js","/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\ndefine(['openlayers', 'jscache'], function(ol, Cache) {\n\n const MAX_CACHE_ITEMS = 1000;\n const EXPIRATION_MINUTES = 5;\n const DEBUG = false;\n const SELECTED_COLOR = '#0088cc'\n\n const cache = new Cache(MAX_CACHE_ITEMS, DEBUG);\n const geoCache = new Cache(MAX_CACHE_ITEMS, DEBUG);\n const cacheOptions = {\n expirationSliding: EXPIRATION_MINUTES * 60\n }\n const FocusPadding = 3;\n const FocusCirclePadding = 6;\n const FocusRadius = 5;\n const FocusFill = new ol.style.Fill({ color: SELECTED_COLOR });\n const FocusStroke = new ol.style.Stroke({ color: '#ffffff', width: 1 });\n\n return {\n clear() {\n cache.clear();\n geoCache.clear();\n },\n\n getOrCreateGeometry(id, geoLocations) {\n const hash = ['geo', id, ...geoLocations.map(([latitude, longitude]) => latitude + ',' + longitude)].join(',')\n let geo = geoCache.getItem(hash);\n if (!geo) {\n geo = new ol.geom.MultiPoint(geoLocations.map(geo => ol.proj.fromLonLat(geo)))\n geoCache.setItem(hash, geo, cacheOptions);\n }\n return geo;\n },\n\n getOrCreateFeature(options, focused) {\n const key = hash(options, focused);\n const cached = cache.getItem(key)\n if (cached) {\n return cached;\n }\n\n const style = [new ol.style.Style({ image: new ol.style.Icon(options), zIndex: 1 })];\n if (focused) {\n const { imgSize, anchor = [0.5, 0.5] } = options;\n style.splice(0, 0, new ol.style.Style({\n renderer(point, { context, feature, geometry, pixelRatio, resolution, rotation }) {\n context.setTransform(1, 0, 0, 1, 0, 0);\n const x = point[0] - imgSize[0] * anchor[0] - FocusPadding * pixelRatio;\n const y = point[1] - imgSize[1] * anchor[1] - FocusPadding * pixelRatio;\n const w = imgSize[0] + FocusPadding * 2 * pixelRatio;\n const h = imgSize[1] + FocusPadding * 2 * pixelRatio;\n const radius = FocusRadius * pixelRatio;\n\n context.save();\n context.globalAlpha = 0.2;\n context.beginPath();\n context.moveTo(x + radius, y);\n context.lineTo(x + w - radius, y);\n context.quadraticCurveTo(x + w, y, x + w, y + radius);\n context.lineTo(x + w, y + h - radius);\n context.quadraticCurveTo(x + w, y + h, x + w - radius, y + h);\n context.lineTo(x + radius, y + h);\n context.quadraticCurveTo(x, y + h, x, y + h - radius);\n context.lineTo(x, y + radius);\n context.quadraticCurveTo(x, y, x + radius, y);\n context.closePath();\n context.fillStyle = SELECTED_COLOR;\n context.shadowBlur = radius / 2;\n context.shadowColor = 'white';\n context.shadowOffsetX = 0;\n context.shadowOffsetY = 0;\n context.fill();\n\n context.restore();\n },\n zIndex: 0\n }))\n }\n cache.setItem(key, style, cacheOptions);\n\n return style;\n },\n\n getOrCreateCluster({\n count, radius: r, selected, selectionState, selectionCount,\n focusStats: { all, some, dim }\n }) {\n const key = [\n 'cluster', count, r, selected,\n selectionState, selectionCount,\n all, some, dim\n ].join('|');\n\n let style = cache.getItem(key);\n if (style) {\n return style;\n }\n\n style = [\n new ol.style.Style({\n image: new ol.style.Circle({\n radius: r * devicePixelRatio,\n fill: new ol.style.Fill({ color: 'rgba(255,255,255,0.01)' })\n })\n }),\n new ol.style.Style({\n renderer([x, y], { context, pixelRatio }) {\n const radius = r * pixelRatio;\n var unselectedFill = 'rgba(241,59,60,0.8)',\n selectedFill = 'rgba(0,112,195,0.8)',\n selectedFillNoAlpha = 'rgb(0,112,195)',\n unselectedStroke = '#AD2E2E',\n stroke = selected ? '#08538B' : unselectedStroke,\n lineWidth = 2 * pixelRatio,\n textStroke = stroke,\n fill = selected ? selectedFill : unselectedFill;\n\n if (selected && selectionState === 'some') {\n fill = unselectedFill;\n textStroke = unselectedStroke;\n stroke = unselectedStroke;\n }\n\n context.save();\n if (dim && !some) {\n context.globalAlpha = 0.4;\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.translate(x, y);\n\n if (some) {\n context.beginPath();\n context.arc(0, 0, radius + FocusCirclePadding * pixelRatio, 0, 2 * Math.PI, true);\n context.fillStyle = 'rgba(0, 136, 204, 0.2)';\n context.fill();\n context.closePath();\n }\n\n context.beginPath();\n context.arc(0, 0, radius, 0, 2 * Math.PI, true);\n context.fillStyle = fill;\n context.fill();\n\n if (selectionState === 'some') {\n context.strokeStyle = stroke;\n context.lineWidth = Math.max(4 * pixelRatio, lineWidth);\n context.stroke();\n context.closePath();\n const portion = Math.max(0.1, Math.min(0.9, selectionCount / count));\n context.beginPath();\n context.arc(0, 0, radius, Math.PI / -2, Math.PI * 2 * portion - Math.PI / 2, false);\n context.strokeStyle = selectedFillNoAlpha;\n context.stroke();\n context.closePath();\n } else {\n context.strokeStyle = stroke;\n context.lineWidth = lineWidth;\n context.stroke();\n context.closePath();\n }\n\n context.font = `bold condensed ${radius}px sans-serif`;\n context.textAlign = 'center';\n context.fillStyle = 'white';\n context.textBaseline = 'middle';\n context.strokeStyle = textStroke;\n context.lineWidth = pixelRatio;\n\n if (some && some !== count) {\n const text = some.toString();\n context.strokeText(text, 0, radius * -0.4);\n context.fillText(text, 0, radius * -0.4);\n\n context.font = `bold condensed ${radius * 0.7}px sans-serif`;\n context.fillStyle = 'rgba(255,255,255,0.8)';\n context.strokeText(count.toString(), 0, radius * 0.55);\n context.fillText(count.toString(), 0, radius * 0.55);\n\n context.beginPath();\n context.moveTo(radius * -0.5, radius * 0.1);\n context.lineTo(radius * 0.5, radius * 0.1);\n context.strokeStyle = 'rgba(255,255,255,0.3)';\n context.stroke();\n context.closePath();\n\n } else {\n const text = count.toString();\n context.strokeText(text, 0, 0);\n context.fillText(text, 0, 0);\n }\n\n context.restore();\n }\n })\n ];\n\n cache.setItem(key, style, cacheOptions);\n return style;\n },\n\n addFocus(radius, list) {\n const key = `focus${radius}`;\n let focusStyle = cache.getItem(key);\n if (!focusStyle) {\n focusStyle = new ol.style.Style({\n image: new ol.style.Circle({\n radius: radius + 5,\n fill: FocusFill,\n stroke: FocusStroke\n }),\n zIndex: 0\n })\n focusStyle.getImage().setOpacity(0.2);\n cache.setItem(key, focusStyle, cacheOptions);\n }\n\n return [focusStyle, ...list];\n },\n\n addDim(radius, list) {\n const image = list.length && list[0].getImage();\n if (image) {\n image.setOpacity(0.4);\n }\n return list;\n },\n\n reset(radius, list) {\n const image = list.length && list[0].getImage();\n if (image && image.getOpacity() < 1) {\n image.setOpacity(1);\n }\n return list;\n }\n }\n\n function hash({ src, imgSize, scale, anchor }, focused) {\n return [focused, src, `${imgSize[0]},${imgSize[1]}`, scale, `${anchor[0]},${anchor[1]}`].join('|')\n }\n\n});\n\n\n\n// WEBPACK FOOTER //\n// ./util/cache.js","/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n\n/**\n * This file is a fork of http://openlayers.org/en/master/apidoc/ol.source.Cluster.html\n * with support for multi-point clusters.\n */\ndefine(['openlayers'], function(ol) {\n 'use strict';\n\n var MultiPointCluster = function(options) {\n ol.source.Vector.call(this, {\n attributions: options.attributions,\n extent: options.extent,\n logo: options.logo,\n projection: options.projection,\n wrapX: options.wrapX\n });\n\n this.resolution = undefined;\n this.distance = 20 * devicePixelRatio;\n this.features = [];\n this.geometryFunction = options.geometryFunction || (feature => feature.getGeometry());\n this.source = options.source;\n this.refresh = _.debounce(this.refresh.bind(this), 100);\n this.source.on('change', this.refresh);\n };\n\n ol.inherits(MultiPointCluster, ol.source.Vector);\n\n MultiPointCluster.prototype.refresh = function() {\n this.clear();\n this.cluster();\n this.addFeatures(this.features);\n this.changed();\n }\n\n MultiPointCluster.prototype.getSource = function() {\n return this.source;\n }\n\n MultiPointCluster.prototype.loadFeatures = function(extent, resolution, projection) {\n this.source.loadFeatures(extent, resolution, projection);\n this.updateResolution(resolution);\n }\n\n MultiPointCluster.prototype.updateResolution = function(resolution) {\n if (resolution !== this.resolution) {\n this.clear();\n this.resolution = resolution;\n this.cluster();\n this.addFeatures(this.features);\n }\n }\n\n MultiPointCluster.prototype.setDistance = function(distance) {\n this.distance = distance;\n this.refresh();\n }\n\n MultiPointCluster.prototype.cluster = function() {\n var self = this;\n if (this.resolution === undefined) {\n return;\n }\n const resolution = this.resolution;\n const distance = this.distance;\n this.features.length = 0;\n var source = this.source;\n var features = source.getFeatures();\n var clustered = {};\n\n const getRadius = feature => {\n const radius = feature.get('_nodeRadius') * devicePixelRatio;\n return radius || distance;\n }\n const maxRadius = features.reduce((max, f) => {\n const radius = getRadius(f);\n return Math.max(max, radius)\n }, 0);\n const countStats = { max: 0, min: Number.MAX_VALUE };\n this.source.countStats = countStats;\n\n for (let i = 0; i < features.length; i++) {\n clusterFeature(features[i]);\n }\n\n function clusterFeature(feature) {\n const radius = getRadius(feature);\n var mapDistanceSearch = (radius + maxRadius) * resolution;\n var mapDistance = radius * resolution;\n var geometry = self.geometryFunction(feature);\n if (geometry) {\n var coordinates = geometry.getCoordinates();\n for (let i = 0; i < coordinates.length; i++) {\n clusterCoordinate(coordinates[i], i);\n }\n }\n\n function clusterCoordinate(coordinate, coordinateIndex) {\n if (!((feature.getId().toString() + '_' + coordinateIndex) in clustered)) {\n\n // Search radius is this feature box + max size\n const extentSearch = ol.extent.boundingExtent([coordinate])\n ol.extent.buffer(extentSearch, mapDistanceSearch, extentSearch);\n\n // Exact bounds to further match for collision\n const extent1 = ol.extent.boundingExtent([coordinate])\n ol.extent.buffer(extent1, mapDistance, extent1);\n\n var neighbors = source.getFeaturesInExtent(extentSearch),\n coords = [],\n count = 0;\n\n const featuresToCluster = neighbors.filter(function(neighbor) {\n var neighborGeometry = self.geometryFunction(neighbor);\n var neighborCoordinates = neighborGeometry.getCoordinates();\n var neighborUid = neighbor.getId().toString() + '_';\n\n var coordsInCluster = neighborCoordinates.filter(function(coordinate, coordinateIndex) {\n var uid = neighborUid + coordinateIndex;\n\n const extent2 = ol.extent.boundingExtent([coordinate])\n ol.extent.buffer(extent2, getRadius(neighbor) * resolution, extent2);\n\n if (ol.extent.intersects(extent1, extent2)) {\n if (!(uid in clustered)) {\n coords.push(coordinate)\n clustered[uid] = true;\n return true;\n }\n }\n return false;\n }).length\n count += coordsInCluster;\n return coordsInCluster > 0;\n });\n\n countStats.max = Math.max(count, countStats.max);\n countStats.min = Math.min(count, countStats.min);\n self.features.push(self.createCluster(featuresToCluster, coords, count));\n }\n }\n }\n };\n\n MultiPointCluster.prototype.createCluster = function(features, coordinates, count) {\n const focusStats = { some: 0, all: false, dim: false };\n features.forEach(feature => {\n const focused = feature.get('focused')\n focusStats.some += (focused ? 1 : 0);\n focusStats.all = focusStats.all && focused;\n focusStats.dim = focusStats.dim || feature.get('focusedDim');\n })\n const centers = coordinates.reduce((sums, c) => sums.map((s, i) => s + c[i]), [0, 0]);\n const average = centers.map(val => val / coordinates.length);\n const geometry = new ol.geom.Point(average);\n\n return new ol.Feature({ geometry, features, coordinates, count, focusStats });\n };\n\n return MultiPointCluster;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./multiPointCluster.js"],"sourceRoot":""}