@defra/interactive-map 0.0.53-alpha → 0.0.55-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/templates/add-polygons.njk +1 -1
- package/assets/templates/add-symbols.njk +4 -4
- package/assets/templates/draw-tools.njk +7 -7
- package/assets/templates/marker-panel.njk +5 -5
- package/assets/templates/place-marker.njk +8 -8
- package/assets/templates/search-control.njk +1 -1
- package/assets/templates/select-feature.njk +7 -7
- package/assets/templates/style-switcher.njk +4 -4
- package/assets/templates/toggle-marker-label.njk +3 -3
- package/dist/css/index.css +1 -1
- package/dist/esm/im-core.js +1 -1
- package/dist/esm/im-shell.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/umd/im-core.js +1 -1
- package/dist/umd/im-core.js.LICENSE.txt +0 -30
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.LICENSE.txt +0 -20
- package/docs/api/context.md +12 -0
- package/docs/api.md +14 -16
- package/docs/building-a-plugin.md +2 -2
- package/docs/examples/add-marker-with-panel.mdx +46 -44
- package/docs/examples/add-polygons.mdx +100 -98
- package/docs/examples/add-symbols.mdx +75 -73
- package/docs/examples/basic-map.mdx +16 -14
- package/docs/examples/button-map.mdx +16 -14
- package/docs/examples/draw-tools.mdx +119 -117
- package/docs/examples/place-marker.mdx +51 -49
- package/docs/examples/search-control.mdx +22 -20
- package/docs/examples/select-feature.mdx +107 -105
- package/docs/examples/style-switcher.mdx +47 -45
- package/docs/examples/toggle-marker-label.mdx +30 -28
- package/docs/getting-started.md +26 -24
- package/docs/plugins/datasets.md +2 -0
- package/docs/plugins/draw.md +10 -10
- package/docs/plugins/interact.md +9 -9
- package/docs/plugins/map-key.md +41 -0
- package/docs/plugins/plugin-descriptor.md +1 -1
- package/docs/plugins/search.md +3 -3
- package/docusaurus.config.cjs +23 -0
- package/package.json +3 -7
- package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -1
- package/plugins/beta/draw-es/dist/esm/index.js +1 -1
- package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -1
- package/plugins/beta/draw-ml/dist/esm/index.js +1 -1
- package/plugins/beta/draw-ml/dist/umd/im-draw-ml-plugin.js +1 -1
- package/plugins/beta/draw-ml/dist/umd/index.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/DrawMode.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/EditMode.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/geometryHelpers.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/im-draw-ol-plugin.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/index.js +1 -1
- package/plugins/beta/frame/dist/esm/im-frame-plugin.js +1 -1
- package/plugins/beta/frame/dist/esm/index.js +1 -1
- package/plugins/beta/frame/dist/umd/im-frame-plugin.js +1 -1
- package/plugins/beta/frame/dist/umd/index.js +1 -1
- package/plugins/beta/map-styles/dist/esm/im-map-styles-plugin.js +1 -1
- package/plugins/beta/map-styles/dist/esm/index.js +1 -1
- package/plugins/beta/map-styles/dist/umd/im-map-styles-plugin.js +1 -1
- package/plugins/beta/map-styles/dist/umd/index.js +1 -1
- package/plugins/beta/scale-bar/dist/esm/im-scale-bar-plugin.js +1 -1
- package/plugins/beta/scale-bar/dist/esm/index.js +1 -1
- package/plugins/beta/scale-bar/dist/umd/im-scale-bar-plugin.js +1 -1
- package/plugins/beta/scale-bar/dist/umd/index.js +1 -1
- package/plugins/beta/use-location/dist/esm/im-use-location-plugin.js +1 -1
- package/plugins/beta/use-location/dist/esm/index.js +1 -1
- package/plugins/beta/use-location/dist/umd/im-use-location-plugin.js +1 -1
- package/plugins/beta/use-location/dist/umd/index.js +1 -1
- package/plugins/datasets/dist/esm/im-datasets-esri-adapter.js +1 -1
- package/plugins/datasets/dist/esm/im-datasets-ml-adapter.js +1 -1
- package/plugins/datasets/dist/esm/im-datasets-ol-adapter.js +1 -1
- package/plugins/datasets/dist/esm/im-datasets-plugin.js +1 -1
- package/plugins/datasets/dist/esm/index.js +1 -1
- package/plugins/datasets/dist/esm/layerAdapter.js +1 -1
- package/plugins/datasets/dist/esm/mapboxStyleLayerAdapter.js +1 -1
- package/plugins/datasets/dist/umd/im-datasets-ml-adapter.js +1 -1
- package/plugins/datasets/dist/umd/im-datasets-ol-adapter.js +1 -1
- package/plugins/datasets/dist/umd/im-datasets-plugin.js +1 -1
- package/plugins/datasets/dist/umd/index.js +1 -1
- package/plugins/datasets/src/adapters/esri/esriLayerAdapter.js +6 -6
- package/plugins/datasets/src/adapters/esri/registry/esriDataset.test.js +1 -1
- package/plugins/datasets/src/adapters/maplibre/layerBuilders.js +1 -1
- package/plugins/datasets/src/adapters/maplibre/layerBuilders.test.js +3 -3
- package/plugins/datasets/src/adapters/maplibre/registry/mapLibreDataset.test.js +1 -1
- package/plugins/datasets/src/adapters/openlayers/canvasPatternStyle.js +1 -3
- package/plugins/datasets/src/adapters/openlayers/canvasPatternStyle.test.js +0 -12
- package/plugins/datasets/src/adapters/openlayers/openlayersLayerAdapter.test.js +2 -2
- package/plugins/datasets/src/adapters/openlayers/registry/openLayersDataset.js +1 -2
- package/plugins/datasets/src/adapters/openlayers/registry/openLayersDataset.test.js +3 -3
- package/plugins/datasets/src/fetch/createDynamicSource.js +2 -2
- package/plugins/datasets/src/initialise/DatasetsInit.jsx +2 -2
- package/plugins/datasets/src/initialise/defaults.js +12 -24
- package/plugins/datasets/src/initialise/defaults.test.js +25 -57
- package/plugins/datasets/src/initialise/initialiseDatasets.js +1 -4
- package/plugins/datasets/src/reducers/mappedDatasetsReducer.test.js +1 -1
- package/plugins/datasets/src/registry/dataset.js +21 -16
- package/plugins/datasets/src/registry/dataset.test.js +101 -11
- package/plugins/draw/dist/esm/im-draw-ml-adapter.js +1 -1
- package/plugins/draw/dist/esm/im-draw-ol-adapter.js +1 -1
- package/plugins/draw/dist/esm/im-draw-plugin.js +1 -1
- package/plugins/draw/dist/esm/index.js +1 -1
- package/plugins/draw/dist/esm/liveDrawChecks.js +1 -1
- package/plugins/draw/dist/umd/im-draw-ml-adapter.js +1 -1
- package/plugins/draw/dist/umd/im-draw-ol-adapter.js +1 -1
- package/plugins/draw/dist/umd/im-draw-plugin.js +1 -1
- package/plugins/draw/dist/umd/index.js +1 -1
- package/plugins/draw/src/adapters/maplibre/styles.js +3 -2
- package/plugins/draw/src/adapters/maplibre/styles.test.js +3 -3
- package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/esm/index.js +1 -1
- package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/umd/index.js +1 -1
- package/plugins/map-key/dist/css/index.css +1 -1
- package/plugins/map-key/dist/esm/im-map-key-plugin.js +1 -1
- package/plugins/map-key/dist/esm/index.js +1 -1
- package/plugins/map-key/dist/umd/im-map-key-plugin.js +1 -1
- package/plugins/map-key/dist/umd/index.js +1 -1
- package/plugins/map-key/src/components/Key/Key.module.scss +144 -53
- package/plugins/map-key/src/components/Key/KeyGroupItem.jsx +34 -3
- package/plugins/map-key/src/components/Key/KeyGroupItem.test.jsx +44 -2
- package/plugins/map-key/src/components/Key/KeySvg.jsx +5 -5
- package/plugins/map-key/src/components/Key/KeySvg.test.jsx +4 -4
- package/plugins/map-key/src/components/Key/KeySvgRamp.jsx +35 -6
- package/plugins/map-key/src/components/Key/KeySvgRamp.test.jsx +56 -16
- package/plugins/map-key/src/components/Key/useRampOrientation.js +61 -0
- package/plugins/map-key/src/components/Key/useRampOrientation.test.jsx +155 -0
- package/plugins/map-key/src/index.js +34 -0
- package/plugins/map-key/src/utils/groupStyles.js +5 -2
- package/plugins/menu/dist/esm/im-menu-plugin.js +1 -1
- package/plugins/menu/dist/esm/index.js +1 -1
- package/plugins/menu/dist/umd/im-menu-plugin.js +1 -1
- package/plugins/menu/dist/umd/index.js +1 -1
- package/plugins/search/dist/esm/im-search-plugin.js +1 -1
- package/plugins/search/dist/esm/index.js +1 -1
- package/plugins/search/dist/umd/im-search-plugin.js +1 -1
- package/plugins/search/dist/umd/index.js +1 -1
- package/plugins/search/src/Search.jsx +0 -1
- package/plugins/search/src/components/Form/Form.jsx +3 -3
- package/plugins/search/src/components/Suggestions/Suggestions.jsx +2 -0
- package/plugins/search/src/components/Suggestions/Suggestions.test.jsx +6 -0
- package/plugins/search/src/defaults.js +3 -0
- package/plugins/search/src/events/formHandlers.js +3 -9
- package/plugins/search/src/events/formHandlers.test.js +6 -9
- package/plugins/search/src/events/inputHandlers.js +8 -2
- package/plugins/search/src/events/inputHandlers.test.js +20 -0
- package/plugins/search/src/events/suggestionHandlers.js +3 -5
- package/plugins/search/src/events/suggestionHandlers.test.js +5 -8
- package/plugins/search/src/utils/showResult.js +9 -0
- package/plugins/search/src/utils/showResult.test.js +16 -0
- package/providers/beta/esri/dist/esm/im-esri-provider.js +1 -1
- package/providers/beta/esri/dist/esm/index.js +1 -1
- package/providers/beta/open-names/dist/esm/im-reverse-geocode.js +1 -1
- package/providers/beta/open-names/dist/esm/index.js +1 -1
- package/providers/beta/open-names/dist/umd/im-reverse-geocode.js +1 -1
- package/providers/beta/open-names/dist/umd/index.js +1 -1
- package/providers/beta/openlayers/dist/esm/im-openlayers-provider.js +1 -1
- package/providers/beta/openlayers/dist/esm/index.js +1 -1
- package/providers/beta/openlayers/dist/umd/im-openlayers-provider.js +1 -1
- package/providers/beta/openlayers/dist/umd/index.js +1 -1
- package/providers/beta/openlayers/src/index.js +27 -4
- package/providers/beta/openlayers/src/index.test.js +47 -0
- package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/esm/index.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-framework.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-framework.js.LICENSE.txt +3 -3
- package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-worker.js +2 -0
- package/providers/maplibre/dist/umd/im-maplibre-worker.js.LICENSE.txt +4 -0
- package/providers/maplibre/dist/umd/index.js +1 -1
- package/providers/maplibre/src/index.js +41 -12
- package/providers/maplibre/src/index.test.js +43 -12
- package/providers/maplibre/src/utils/detectModuleWorker.js +25 -0
- package/providers/maplibre/src/utils/detectModuleWorker.test.js +40 -0
- package/providers/maplibre/src/utils/spatial.js +22 -12
- package/providers/maplibre/src/utils/spatial.test.js +6 -6
- package/providers/maplibre/src/utils/workerUrl.js +15 -0
- package/providers/maplibre/src/utils/workerUrl.test.js +14 -0
- package/rollup.esm.mjs +38 -1
- package/src/App/components/Hints/Hints.module.scss +1 -1
- package/src/App/components/Viewport/Viewport.jsx +6 -4
- package/src/App/components/Viewport/Viewport.test.jsx +18 -1
- package/src/App/hooks/useMapAnnouncements.js +7 -2
- package/src/App/hooks/useMapAnnouncements.test.js +13 -2
- package/src/App/hooks/useModalPanelBehaviour.js +3 -1
- package/src/App/initialiseApp.js +1 -1
- package/src/App/store/ServiceProvider.jsx +7 -1
- package/src/App/store/ServiceProvider.test.jsx +15 -0
- package/src/InteractiveMap/InteractiveMap.js +5 -4
- package/src/InteractiveMap/InteractiveMap.test.js +9 -2
- package/src/InteractiveMap/domStateManager.js +21 -1
- package/src/InteractiveMap/domStateManager.test.js +48 -1
- package/src/InteractiveMap/polyfills.js +4 -3
- package/src/InteractiveMap/polyfills.test.js +12 -0
- package/src/services/mapFocus.js +64 -0
- package/src/services/mapFocus.test.js +76 -0
- package/src/types.js +5 -7
- package/src/utils/detectInterfaceType.js +16 -5
- package/src/utils/detectInterfaceType.test.js +32 -0
- package/webpack.dev.mjs +2 -0
- package/webpack.umd.mjs +28 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see im-datasets-plugin.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[447],{852(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{ns:()=>y,jE:()=>d,V:()=>l,p_:()=>p});var s,l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visible:!0,style:{stroke:"#d4351c",strokeWidth:2,symbolDescription:"red outline"}},c=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription"].concat(function(t){if(Array.isArray(t))return u(t)}(s=["symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolSize","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(s)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],p=function(t){return f.some(function(e){return e in t})},y=function(t,e){var r=t.style||{},n=a(a({},e.style),r);!("symbolDescription"in r)&&p(r)&&delete n.symbolDescription;var o=a({},t);delete o.style,c.forEach(function(t){return delete o[t]});var i=a({},e);return delete i.style,a(a(a({},i),o),n)},d=function(t){!0!==t.visible&&!1!==t.visible&&(t.visible="hidden"!==t.visibility);var e=a(a(a({},l),t),{},{style:a(a({},l.style),t.style)}),r=t.style||{};return!("symbolDescription"in r)&&p(r)&&delete e.style.symbolDescription,c.forEach(function(t){return delete e[t]}),e}},973(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{manifest:()=>ht});var l=function(t){var e=t.datasets,r=[],n=(void 0===e?[]:e).filter(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))}),o=new Map;return n.forEach(function(t){var e;if(null!==(e=t.sublayers)&&void 0!==e&&e.length){var n=t.sublayers.filter(function(e){return t.showInMenu?!1!==e.showInMenu:e.showInMenu});if(!1===t.showInMenu&&!n.length)return;var a={id:t.id,groupLabel:t.label,visibleWhen:!0,type:"checkbox",items:n.map(function(e){return{id:"".concat(t.id,"-").concat(e.id),label:e.label}})};0===a.items.length&&(delete a.groupLabel,a.items.push({id:t.id,label:t.label})),r.push(a)}else if(t.groupLabel){var i=o.has(t.groupLabel)?o.get(t.groupLabel):{id:t.groupLabel,groupLabel:t.groupLabel,visibleWhen:!0,type:"checkbox",items:[]};o.has(t.groupLabel)||(o.set(t.groupLabel,i),r.push(i)),i.items.push({id:t.id,label:t.label})}else r.push({visibleWhen:!0,type:"checkbox",id:t.id,items:[{id:t.id,label:t.label}]})}),r},c=function(t,e){return t.reduce(function(t,r){var n=r.items.filter(function(t){return!e.includes(t.id)});return n.length&&t.push(a(a({},r),{},{items:n})),t},[])},f=r(852);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){b(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function b(t,e,r){return(e=function(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=function(t,e){var r,n=e.id,o=(0,f.jE)(e);e.parentId&&("showInKey"in e||delete o.showInKey,"showInMenu"in e||delete o.showInMenu),t[n]=o;var a=t.orderedDatasets;a.push(n);var i=null===(r=e.sublayers)||void 0===r?void 0:r.map(function(t){return function(t,e){var r="".concat(t,"-").concat(e.id),n=e.id;return"hidden"!==e.visibility&&(e.visibility="visible"),d(d({},e),{},{id:r,parentId:t,sublayerId:n})}(n,t)});if(null!=i&&i.length){var u=null==i?void 0:i.map(function(t){return t.id}),s=null==i?void 0:i.reduce(v,{orderedDatasets:a});return t[n].sublayerIds=u,delete t[n].sublayers,d(d(d({},t),s),{},{orderedDatasets:a})}return d(d({},t),{},{orderedDatasets:a})},h=function(t){var e=(t.datasets||[]).reduce(v,{orderedDatasets:[]}),r=e.orderedDatasets;return delete e.orderedDatasets,d(d({},t),{},{mappedDatasets:e,orderedDatasets:r})},m=r(619);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function S(t){return function(t){if(Array.isArray(t))return D(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach(function(e){_(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _(t,e,r){return(e=function(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var P=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"not found";return!!t.mappedDatasets[e]||(m.v.error("".concat(r,": Dataset with id '").concat(e,"' ").concat(n)),!1)},w=0,E=function(t,e,r){return w=r.actionsArray.length?w+1:0,A(A({},r),{},{actionsArray:[].concat(S(r.actionsArray),[{method:t,parameters:e,actionId:w}])})},j={SET_DATASETS:function(t,e){var r=e.mappedDatasets,n=e.orderedDatasets;return A(A({},t),{},{mappedDatasets:r,orderedDatasets:n})},ADD_DATASET:function(t,e){var r=e.dataset,n=e.mapStyle;if(t.mappedDatasets[r.id])return m.v.error("addDataset: Dataset with id '".concat(r.id,"' already exists")),t;var o=h({datasets:[r]}),a=o.mappedDatasets,i=o.orderedDatasets,s=function(t,e){var r,n=u(t.menu),o=l({datasets:[e]}),a=n.find(function(t){return t.groupLabel===o[0].groupLabel});return a?(r=a.items).push.apply(r,u(o[0].items)):n.push.apply(n,u(o)),n}(t,r);return E("addDataset",[r.id,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),a),orderedDatasets:[].concat(S(t.orderedDatasets),S(i)),menu:s}))},REMOVE_DATASET:function(t,e){var r,n=e.id;if(!P(t,n,"removeDataset"))return t;var o=A({},t.mappedDatasets),a=[n].concat(S((null===(r=o[n])||void 0===r?void 0:r.sublayerIds)||[]));a.forEach(function(t){return delete o[t]});var i=t.orderedDatasets.filter(function(t){return!a.includes(t)});return A(A({},t),{},{mappedDatasets:o,orderedDatasets:i,menu:c(t.menu,a)})},SET_DATASET_VISIBILITY:function(t,e){var r=e.datasetId,n=e.visible;return P(t,r,"setDatasetVisibility")?t.mappedDatasets[r].visible===n?t:E("applyDatasetVisibility",[r,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,A(A({},t.mappedDatasets[r]),{},{visible:n})))})):t},SET_GLOBAL_VISIBILITY:function(t,e){var r=e.visible;return E("applyGlobalVisibility",[r],A(A({},t),{},{globals:A(A({},t.globals),{},{visible:r})}))},SET_DATASET_STYLE:function(t,e){var r=e.datasetId,n=e.styleChanges,o=e.mapStyle;if(!P(t,r,"setDatasetStyle"))return t;var a=A(A({},t.mappedDatasets[r].style),n),i=A(A(A({},t.mappedDatasets[r]),n),{},{style:a});return E("applyStyle",[r,o],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,i))}))},SET_OPACITY:function(t,e){var r=e.datasetId,n=e.opacity;if(!P(t,r,"setOpacity"))return t;var o=A(A({},t.mappedDatasets[r].style),{},{opacity:n}),a=A(A({},t.mappedDatasets[r]),{},{style:o});return E("applyDatasetOpacity",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,a))}))},SET_GLOBAL_OPACITY:function(t,e){var r=e.opacity;return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),{},{opacity:r})}))},HIDE_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - hideFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=o.hiddenFeatures||[],i=Array.from(new Set([].concat(S(a),S(n))));return o.hiddenFeatures=i,E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},SHOW_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - showFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=(o.hiddenFeatures||[]).filter(function(t){return!n.includes(t)});return o.hiddenFeatures=a.length?a:[-1],E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},REMOVE_ADAPTER_ACTIONS:function(t,e){return null!=e&&e.length?A(A({},t),{},{actionsArray:t.actionsArray.filter(function(t){return!e.includes(t)})}):t},SET_GLOBAL_STATE:function(t,e){return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),e)}))},SET_MENU:function(t,e){var r=e.menu;return A(A({},t),{},{menu:r})}},I=r(738),T={APP_ADD_MARKER:"app:addmarker",APP_UPDATE_MARKER:"app:updatemarker",APP_REMOVE_MARKER:"app:removemarker",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_SET_APPLICATION_MODE:"app:setapplicationmode",APP_CLEAR_APPLICATION_MODE:"app:clearapplicationmode",APP_SHOW_HINT:"app:showhint",APP_DISMISS_HINT:"app:dismisshint",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_FULLSCREEN_CHANGE:"app:fullscreenchange",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_SPATIAL_LIST:"map:setspatiallist",MAP_SET_SPATIAL_LIST_SUPPRESSED:"map:setspatiallistsuppressed",MAP_SET_ACTIVE_ITEM:"map:setactiveitem",MAP_SELECT_ITEM:"map:selectitem",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function M(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return k(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(k(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,k(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,k(f,"constructor",l),k(l,"constructor",s),s.displayName="GeneratorFunction",k(l,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m:p}})()}function k(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}k=function(t,e,r,n){function a(e,r){k(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},k(t,e,r,n)}function C(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var L=function(){var t,e=(t=M().m(function t(e,r,n,o){var a,i,u,s,l,c,f;return M().w(function(t){for(;;)switch(t.n){case 0:return a=n(e,r),u=(i="string"==typeof a?{url:a}:a).url,s=i.headers,l=void 0===s?{}:s,t.n=1,fetch(u,{headers:l,signal:o});case 1:if((c=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(c.status," ").concat(c.statusText));case 2:return t.n=3,c.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){C(a,n,o,i,u,"next",t)}function u(t){C(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var x=function(t){return t.getBounds()},F=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},N=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return G(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},R=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},B=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,a=function(t,i){var u;0===i?(u=t,e=Math.min(e,u[0]),r=Math.min(r,u[1]),n=Math.max(n,u[0]),o=Math.max(o,u[1])):t.forEach(function(t){return a(t,i-1)})};switch(t.type){case"Point":a(t.coordinates,0);break;case"LineString":case"MultiPoint":a(t.coordinates,1);break;case"Polygon":case"MultiLineString":a(t.coordinates,2);break;case"MultiPolygon":a(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var a=B(t);e=Math.min(e,a[0]),r=Math.min(r,a[1]),n=Math.max(n,a[2]),o=Math.max(o,a[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function V(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return U(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(U(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,U(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,U(f,"constructor",l),U(l,"constructor",s),s.displayName="GeneratorFunction",U(l,o,"GeneratorFunction"),U(f),U(f,o,"Generator"),U(f,n,function(){return this}),U(f,"toString",function(){return"[object Generator]"}),(V=function(){return{w:a,m:p}})()}function U(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}U=function(t,e,r,n){function a(e,r){U(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},U(t,e,r,n)}function H(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||W(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var z=function(t){return{type:"FeatureCollection",features:Array.from(t.values()).map(function(t){return t.feature})}},Q=function(t,e,r){if(r&&!(t.size<=1.2*r)){var n,o=r,a=[],i=[],u=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=W(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){i=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(i)throw o}}}}(t);try{for(u.s();!(n=u.n()).done;){var s=K(n.value,2),l=s[0],c=s[1];R(c.bbox,e)?a.push(l):i.push({id:l,lastSeenAt:c.lastSeenAt})}}catch(t){u.e(t)}finally{u.f()}i.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var f=t.size-o,p=0;p<f&&p<i.length;p++)t.delete(i[p].id);if(t.size>o)for(var y=t.size-o,d=a.map(function(e){return{id:e,lastSeenAt:t.get(e).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<y&&b<d.length;b++)t.delete(d[b].id)}},Y=function(t,e,r){var n=Date.now();e.features.forEach(function(e){var o=function(t,e){var r,n;return e&&null!==(r=null===(n=t.properties)||void 0===n?void 0:n[e])&&void 0!==r?r:t.id}(e,r);null!=o?t.set(o,{feature:e,bbox:B(e.geometry),lastSeenAt:n}):console.warn("Feature missing ID, skipping:",e)})},J=function(){var t,e=(t=V().m(function t(e,r){var n,o,a,i,u,s,l,c,f,p,y,d,b,v,h;return V().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=r.mapProvider,o=r.dynamicGeoJSON,a=r.onUpdate,i=o.url,u=o.idProperty,s=o.transformRequest,l=o.maxFeatures,c=o.minZoom,f=void 0===c?0:c,!((p=n.getZoom())<f)){t.n=1;break}return t.a(2);case 1:if(y=x(n),!e.fetchedBbox||!F(e.fetchedBbox,y)){t.n=2;break}return t.a(2);case 2:return e.currentController&&e.currentController.abort(),e.currentController=new AbortController,t.p=3,d={bbox:y,zoom:p},t.n=4,L(i,d,s,e.currentController.signal);case 4:b=t.v,Y(e.features,b,u),e.fetchedBbox=N(e.fetchedBbox,y),v=e.features.size,Q(e.features,y,l),e.features.size<v&&(e.fetchedBbox=y),a(o.id,z(e.features)),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(h=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),h);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){H(a,n,o,i,u,"next",t)}function u(t){H(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r){return e.apply(this,arguments)}}(),$=r(262),q=r(447),X=function(t){var e=t.adapter,r=t.pluginConfig,n=t.mapStyle,o=t.mapProvider,a=t.events,i=t.dispatch,u=t.eventBus,s=r.datasets,c=new Map;r.globals&&i({type:"SET_GLOBAL_STATE",payload:r.globals});var p=s.map(function(t){return(0,f.ns)(t,f.V)}),y=h({datasets:s}),d=y.mappedDatasets,b=y.orderedDatasets;e.createDataset&&$.Q.attachCreateDataset(e.createDataset),$.Q.attach(d,b,n);var v=l({datasets:p});u.requestOnce("menu:state",q.vf),i({type:"SET_MENU",payload:{menu:v}}),i({type:"SET_DATASETS",payload:{mappedDatasets:d,orderedDatasets:b}}),e.init().then(function(){$.Q.forEachDataset(function(t){if(t.hasDynamicGeoJSON){var r=function(t){var e,r,n,o=t.dynamicGeoJSON,a=t.mapProvider,i=t.onUpdate,u={features:new Map,fetchedBbox:null,currentController:null},s=function(){return J(u,{mapProvider:a,dynamicGeoJSON:o,onUpdate:i})},l=(e=s,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),c=function(){l()};return a.map.on("moveend",c),s(),{destroy:function(){var t,e;t=a.map,e=c,(t.off||t.un).call(t,"moveend",e),l.cancel(),u.currentController&&u.currentController.abort()},clear:function(){u.features.clear(),u.fetchedBbox=null,i(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){u.features.clear(),u.fetchedBbox=null,s()},getFeatureCount:function(){return u.features.size},reapply:function(){u.features.size>0&&i(o.id,z(u.features))}}}({dynamicGeoJSON:t.dynamicGeoJSON,mapProvider:o,onUpdate:function(t,r){return e.setData(t,r)}});c.set(t.id,r)}}),e.attachDynamicSources(c),u.emit("datasets:ready")});var m=function(){e.onMapSizeChange()};u.on(a.MAP_SIZE_CHANGE,m);var g=u.emitWhenRequested("datasets:registry",$.Q);return u.on("menu:changed",function(t){$.Q.invalidateKeyItemsOnMenuStateChange(t),e.applyGlobalVisibility()}),{remove:function(){u.off(a.MAP_SIZE_CHANGE,m),g(),c.forEach(function(t){return t.destroy()}),c.clear(),e.destroy()},refreshDataset:function(t){var e;null===(e=c.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=c.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=c.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}},tt=r(400);function et(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return rt(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(rt(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,rt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,rt(f,"constructor",l),rt(l,"constructor",s),s.displayName="GeneratorFunction",rt(l,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(et=function(){return{w:a,m:p}})()}function rt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}rt=function(t,e,r,n){function a(e,r){rt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},rt(t,e,r,n)}function nt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){nt(a,n,o,i,u,"next",t)}function u(t){nt(a,n,o,i,u,"throw",t)}i(void 0)})}}var at,it=function(){var t=ot(et().m(function t(e){var n,o,a,i,u,s,l;return et().w(function(t){for(;;)switch(t.n){case 0:l=e.name,t.n="MapLibreProvider"===l?1:"EsriProvider"===l?3:"OpenLayersProvider"===l?5:7;break;case 1:return t.n=2,r.e(563).then(r.bind(r,291));case 2:return n=t.v,o=n.default,t.a(2,o);case 3:return t.n=4,Promise.resolve().then(function(){var t=new Error("Cannot find module './esri/esriLayerAdapter.js'");throw t.code="MODULE_NOT_FOUND",t});case 4:return a=t.v,i=a.default,t.a(2,i);case 5:return t.n=6,r.e(809).then(r.bind(r,382));case 6:return u=t.v,s=u.default,t.a(2,s);case 7:throw new Error("No layer adapter available for map provider ".concat(e.name,". Please provide a compatible layer adapter."));case 8:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),ut={},st=function(){var t=ot(et().m(function t(e,r,n){var o,a,i,u,s=arguments;return et().w(function(t){for(;;)switch(t.n){case 0:return i=s.length>3&&void 0!==s[3]?s[3]:{},t.n=1,it(e);case 1:return u=t.v,at=new u(e,r,n,i),ut.removeDataset=at.removeDataset.bind(at),ut.setData=at.setData.bind(at),ut.applyStyle=at.applyStyle.bind(at),ut.applyDatasetVisibility=at.applyDatasetVisibility.bind(at),ut.applyGlobalVisibility=at.applyGlobalVisibility.bind(at),ut.applyDatasetOpacity=at.applyDatasetOpacity.bind(at),ut.applyGlobalOpacity=at.applyGlobalOpacity.bind(at),ut.addDataset=at.addDataset.bind(at),ut.applyFeatureFilter=at.applyFeatureFilter.bind(at),ut.onMapStyleChange=null===(o=at.onMapStyleChange)||void 0===o?void 0:o.bind(at),ut.onMapSizeChange=null===(a=at.onMapSizeChange)||void 0===a?void 0:a.bind(at),t.a(2,at)}},t)}));return function(e,r,n){return t.apply(this,arguments)}}();function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ct(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return ft(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(ft(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,ft(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,ft(f,"constructor",l),ft(l,"constructor",s),s.displayName="GeneratorFunction",ft(l,o,"GeneratorFunction"),ft(f),ft(f,o,"Generator"),ft(f,n,function(){return this}),ft(f,"toString",function(){return"[object Generator]"}),(ct=function(){return{w:a,m:p}})()}function ft(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}ft=function(t,e,r,n){function a(e,r){ft(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},ft(t,e,r,n)}function pt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var yt=function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_DATASET_VISIBILITY",payload:{datasetId:i,visible:e}}:{type:"SET_GLOBAL_VISIBILITY",payload:{visible:e}})},dt=r(287),bt=function(t){var e=t.menuGroupItem,r=t.onChange,n=$.Q.getDataset(e.id);if(!n)return null;var o=n.isSublayer?n.parentId:n.id,a=n.isSublayer?n.id:void 0,i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n.visible?"":" im-c-datasets-layers__item--checked");return(0,dt.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,dt.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,dt.jsx)("input",{className:"govuk-checkboxes__input",id:n.id,"data-dataset-id":o,"data-sublayer-id":a,name:"layers",type:"checkbox",value:n.id,checked:n.isLocallyVisible,onChange:r}),(0,dt.jsx)("label",{className:"im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",htmlFor:n.id,children:n.label})]})},n.id)},vt=function(t){var e=t.menuGroup,r=t.children;return e.groupLabel?(0,dt.jsx)("div",{className:"govuk-form-group im-c-datasets-layers-group",children:(0,dt.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,dt.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:(0,dt.jsx)("h3",{children:e.groupLabel})}),r]})},e.id):(0,dt.jsx)(dt.Fragment,{children:r})},ht={InitComponent:function(t){var e=t.pluginConfig,r=t.pluginState,n=t.mapState,o=t.mapProvider,a=t.services,i=r.dispatch,u=a.eventBus,s=a.symbolRegistry,l=a.patternRegistry,c=Boolean(null==o?void 0:o.isBaseMapReady());(0,I.useEffect)(function(){var t=!1!==e.hasMenu&&function(t){return t.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})}(e);t||(u.emitWhenReady(T.APP_REMOVE_PANEL,"datasetsLayers"),u.emitWhenReady(T.APP_TOGGLE_BUTTON_STATE,{id:"datasetsLayers",prop:"hidden",value:!0}))},[e.hasMenu]);var f=(0,I.useRef)(r);f.current=r;var p=(0,I.useRef)(null);return(0,I.useEffect)(function(){if(c&&!p.current){var t=function(){var t,r=(t=ct().m(function t(){var r;return ct().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,st(o,s,l);case 1:r=t.v,p.current=X({adapter:r,pluginConfig:e,pluginStateRef:f,mapStyle:n.mapStyle,mapProvider:o,events:T,dispatch:i,eventBus:u});case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){pt(a,n,o,i,u,"next",t)}function u(t){pt(a,n,o,i,u,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();t()}},[c]),(0,I.useEffect)(function(){$.Q.attach(r.mappedDatasets,r.orderedDatasets),u.emit("datasets:changed")},[r.mappedDatasets,r.orderedDatasets]),(0,I.useEffect)(function(){$.Q.attachMapStyle(n.mapStyle),null!=ut&&ut.onMapStyleChange&&Promise.resolve(ut.onMapStyleChange()).then(function(){u.emit(T.MAP_DATA_CHANGE)})},[n.mapStyle]),(0,I.useEffect)(function(){return(0,tt.A3)(r.globals)},[r.globals]),(0,I.useEffect)(function(){var t=r.actionsArray;t.length&&(t.forEach(function(t){var e,r=t.method,n=t.parameters;return ut[r].apply(ut,function(t){if(Array.isArray(t))return lt(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),i({type:"REMOVE_ADAPTER_ACTIONS",payload:t}))},[r.actionsArray]),(0,I.useEffect)(function(){return function(){p.current&&(p.current.remove(),p.current=null)}},[]),null},reducer:{initialState:{globals:{visible:!0,opacity:1,opacityMode:"dataset"},key:{items:[],hasGroups:!1},mappedDatasets:{},orderedDatasets:[],actionsArray:[],menu:[]},actions:j},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e=t.pluginState,r=e.menu,n=void 0===r?[]:r,o=function(t){var r=t.target,n=r.value,o=r.checked;yt({pluginState:e},o,{datasetId:n})},a=n.some(function(t){return t.groupLabel}),i="im-c-datasets-layers".concat(a?" im-c-datasets-layers--has-groups":"");return(0,dt.jsx)("div",{className:i,children:n.map(function(t){return(0,dt.jsxs)(vt,{menuGroup:t,children:[" ",t.items.map(function(t){return(0,dt.jsx)(bt,{menuGroupItem:t,onChange:o},t.id)})]},t.id)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){(0,t.pluginState.dispatch)({type:"ADD_DATASET",payload:{dataset:e,mapStyle:t.mapState.mapStyle}})},removeDataset:function(t,e){var r=t.pluginState.dispatch;ut.removeDataset(e),r({type:"REMOVE_DATASET",payload:{id:e}})},setDatasetVisibility:yt,setFeatureVisibility:function(t,e,r){var n=t.pluginState.dispatch,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).datasetId,a=void 0===o?null:o;if(a){var i=$.Q.getDataset(a);!i||i.idProperty||i.generateIds||m.v.warn('setFeatureVisibility: Dataset "'.concat(a,'" has no idProperty or generateIds configured. Features may not be matched correctly. Add idProperty to match by a feature property, or add generateIds: true to use auto-generated IDs.'))}n({type:e?"SHOW_FEATURES":"HIDE_FEATURES",payload:{datasetId:a,featureIds:r}})},setStyle:function(t,e){var r=t.pluginState.dispatch,n=t.mapState,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.datasetId,i=o.sublayerId;r({type:"SET_DATASET_STYLE",payload:{datasetId:a=i?"".concat(a,"-").concat(i):a,styleChanges:e,mapStyle:n.mapStyle}})},getStyle:function(t){t._pluginState;var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.datasetId,n=e.sublayerId;r=n?"".concat(r,"-").concat(n):r;var o=$.Q.getDataset(r);return o?o.style:(m.v.warn("getStyle: Dataset with id ".concat(r," not found")),null)},setOpacity:function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_OPACITY",payload:{datasetId:i,opacity:e}}:{type:"SET_GLOBAL_OPACITY",payload:{opacity:e}})},getOpacity:function(t){var e,r=t.pluginState.globals,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;if(i){var u,s=$.Q.getDataset(i);return s?null!==(u=s.opacity)&&void 0!==u?u:null:(m.v.warn("getOpacity: Dataset with id ".concat(i," not found")),null)}return null!==(e=r.opacity)&&void 0!==e?e:null},setData:function(t,e,r){t._pluginState;var n=r.datasetId,o=$.Q.getDataset(n);o?null!=o&&o.tiles?m.v.warn('setData called on vector tile dataset "'.concat(n,'" — has no effect')):ut.setData(n,e):m.v.warn("setData: Dataset with id ".concat(n," not found"))},setGlobals:function(t,e){var r=t.pluginState.dispatch,n=e.opacityMode,o={},a=!1;n&&(["dataset","global","multiply"].includes(n)?(a=!0,o.opacityMode=n):m.v.warn("Ignoring invalid opacityMode: ".concat(n,". Must be one of 'dataset', 'global' or 'multiply'."))),a?r({type:"SET_GLOBAL_STATE",payload:o}):m.v.warn("setGlobals: requires a valid value for opacityMode to be set")}}}},228(t,e,r){r.d(e,{j:()=>A});var n=r(262),o=r(447),a=r(852),i=(new Set,new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),function(t){return!!(null!=t&&t.symbol||null!=t&&t.symbolSvgContent)});function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y=f(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e.id,this.url=e.url,this.transformRequest=e.transformRequest,this.maxFeatures=e.maxFeatures,this.minZoom=e.minZoom,this.idProperty=e.idProperty,this.hiddenFeaturesIdExpression=["to-string",["get",this.idProperty]],this.sourceId="geojson-dynamic-".concat(this.id),this.source=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({type:"geojson",data:{type:"FeatureCollection",features:[]}},this.idProperty?{promoteId:this.idProperty}:{generateId:!0})}),d=r(400);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function v(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach(function(e){S(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function S(t,e,r){return(e=O(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,O(n.key),n)}}function O(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var A=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._datasetDefinition=e},(e=[{key:"id",get:function(){return this._datasetDefinition.id}},{key:"label",get:function(){return this._datasetDefinition.label}},{key:"hasSymbol",get:function(){return!this.hasSublayers&&i(this.style)}},{key:"hasPattern",get:function(){return!(this.hasSublayers||this.hasSymbol||(t=this.style,!t.fillPattern&&!t.fillPatternSvgContent));var t}},{key:"hasFill",get:function(){var t,e;return!this.hasSublayers&&!this.hasSymbol&&(this.hasPattern||(null===(t=this.style)||void 0===t?void 0:t.fill)&&"transparent"!==(null===(e=this.style)||void 0===e?void 0:e.fill))}},{key:"hasStroke",get:function(){var t;return!this.hasSublayers&&!this.hasSymbol&&Boolean(null===(t=this.style)||void 0===t?void 0:t.stroke)}},{key:"tiles",get:function(){return this._datasetDefinition.tiles}},{key:"geojson",get:function(){return this._datasetDefinition.geojson}},{key:"idProperty",get:function(){return this._datasetDefinition.idProperty}},{key:"generateIds",get:function(){return this._datasetDefinition.generateIds}},{key:"parentId",get:function(){return this._datasetDefinition.parentId}},{key:"minZoom",get:function(){var t;return this._datasetDefinition.minZoom||(null===(t=this.parent)||void 0===t?void 0:t.minZoom)}},{key:"maxZoom",get:function(){var t;return this._datasetDefinition.maxZoom||(null===(t=this.parent)||void 0===t?void 0:t.maxZoom)}},{key:"type",get:function(){var t;return this._datasetDefinition.type||(null===(t=this.parent)||void 0===t?void 0:t.type)}},{key:"showInKey",get:function(){var t,e,r=this._datasetDefinition.showInKey;return void 0!==r?r:null!==(t=null===(e=this.parent)||void 0===e?void 0:e.showInKey)&&void 0!==t&&t}},{key:"visibleWhen",get:function(){var t;return void 0===this._datasetDefinition.visibleWhen?null===(t=this.parent)||void 0===t?void 0:t.visibleWhen:this._datasetDefinition.visibleWhen}},{key:"groupLabel",get:function(){var t,e;return this._datasetDefinition.groupLabel||(null===(t=this.parent)||void 0===t?void 0:t.groupLabel)||(null===(e=this.parent)||void 0===e?void 0:e.label)}},{key:"groupId",get:function(){var t;return this._datasetDefinition.groupId||(null===(t=this.parent)||void 0===t?void 0:t.groupId)||(this.groupLabel?this.groupLabel.toLowerCase().replace(/\s+/g,"-"):null)}},{key:"opacity",get:function(){var t,e,r=null===(t=this.style)||void 0===t?void 0:t.opacity,n=null===(e=this.parent)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.opacity;return(0,d.ob)(r,n)}},{key:"hasDynamicGeoJSON",get:function(){return Boolean(this._datasetDefinition.dynamicGeoJSON)}},{key:"dynamicGeoJSON",get:function(){return new y(g(g({},this._datasetDefinition.dynamicGeoJSON),{},{id:this.id,minZoom:this.minZoom}))}},{key:"hiddenFeatures",get:function(){return this._datasetDefinition.hiddenFeatures}},{key:"hasHiddenFeatures",get:function(){var t,e;return Boolean((null===(t=this.hiddenFeatures)||void 0===t?void 0:t.length)>0||(null===(e=this.parent)||void 0===e?void 0:e.hasHiddenFeatures))}},{key:"filter",get:function(){return null}},{key:"isHiddenByInheritance",get:function(){var t;return this.isSublayer?!(null!==(t=this.parent)&&void 0!==t&&t.visible):!(0,d.uA)()}},{key:"isLocallyVisible",get:function(){return!!this.isVisible||this._datasetDefinition.visible}},{key:"visible",get:function(){var t;return this.isSublayer?this._datasetDefinition.visible&&(null===(t=this.parent)||void 0===t?void 0:t.visible):this._datasetDefinition.visible&&(0,d.uA)()}},{key:"esriStyleLayerId",get:function(){return this._datasetDefinition.esriStyleLayerId}},{key:"visibility",get:function(){var t=this.visible,e=this.visibleWhen;return t&&e?(0,o.DV)(e)?"visible":"none":t?"visible":"none"}},{key:"keyVisibility",get:function(){return this.showInKey&&"visible"===this.visibility}},{key:"symbolAnchor",get:function(){var t,e;return null!==(t=this.style)&&void 0!==t&&t.symbolAnchor?this.style.symbolAnchor:null===(e=this.parent)||void 0===e?void 0:e.symbolAnchor}},{key:"sourceLayer",get:function(){return this.isSublayer?this.parent.sourceLayer:this.tiles?this._datasetDefinition.sourceLayer:void 0}},{key:"isSublayer",get:function(){return Boolean(this._datasetDefinition.parentId)}},{key:"hasSublayers",get:function(){var t;return(null===(t=this._datasetDefinition.sublayerIds)||void 0===t?void 0:t.length)>0}},{key:"sublayerIds",get:function(){return this._datasetDefinition.sublayerIds}},{key:"sublayers",get:function(){var t=this.sublayerIds;return t?t.map(function(t){return n.Q.getDataset(t)}):[]}},{key:"parent",get:function(){if(this._datasetDefinition.parentId)return n.Q.getDataset(this._datasetDefinition.parentId)}},{key:"style",get:function(){var t,e=null===(t=this.parent)||void 0===t?void 0:t.style;return e?g(g(g({},e),{},{opacity:void 0},this._datasetDefinition.style),{},{symbolDescription:this.symbolDescription}):this._datasetDefinition.style||{}}},{key:"hasCustomVisualStyle",get:function(){return(0,a.p_)(this._datasetDefinition.style||{})}},{key:"symbolDescription",get:function(){var t,e;return null!==(t=this._datasetDefinition.style)&&void 0!==t&&t.symbolDescription?this._datasetDefinition.style.symbolDescription:this.hasCustomVisualStyle||null===(e=this.parent)||void 0===e?void 0:e.symbolDescription}},{key:"patternConfigs",get:function(){var t=this.hasPattern?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.patternConfigs}))):t}},{key:"symbolConfigs",get:function(){var t=this.hasSymbol?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.symbolConfigs}))):t}},{key:"keyDefinition",get:function(){return{id:this.id,type:"dataset",label:this.label,hasSymbol:this.hasSymbol,hasPattern:this.hasPattern,style:this.style,symbolDescription:this.symbolDescription}}}])&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},262(t,e,r){r.d(e,{Q:()=>b});var n=r(228);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.idToDefinitionMap=new Map,this.definitionToInstanceMap=new Map},(e=[{key:"add",value:function(t){this.idToDefinitionMap.set(t.id,t._datasetDefinition),this.definitionToInstanceMap.set(t._datasetDefinition,t)}},{key:"invalidateDataset",value:function(t){var e=this,r=this.idToDefinitionMap.get(t.id);[r.id].concat(function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((null==r?void 0:r.sublayerIds)||[])).forEach(function(t){var r=e.idToDefinitionMap.get(t);e.definitionToInstanceMap.delete(r),e.idToDefinitionMap.delete(t)})}},{key:"invalidateChangedDatasets",value:function(t){var e=this;t.forEach(function(t){var r=e.idToDefinitionMap.get(t.id);if(r&&r!==t){var n=e.definitionToInstanceMap.get(r);e.invalidateDataset(n.isSublayer&&n.parent?n.parent:n)}})}},{key:"getByDefinition",value:function(t){return this.definitionToInstanceMap.get(t)}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b={attach:function(t,e,r){this._datasets=t,this._orderedDatasets=e,this.attachMapStyle(r),this._invalidateChangedDatasets()},_definitionCache:new s,_invalidateCache:function(){this._definitionCache=new s},_invalidateChangedDatasets:function(){this._datasets?this._definitionCache.invalidateChangedDatasets(Object.values(this._datasets)):this._invalidateCache()},attachCreateDataset:function(t){this._createDataset=t},_createDataset:function(t){return function(t){return new n.j(t)}(t)},attachMapStyle:function(t){t&&(this._mapStyle=t)},get mapStyle(){return this._mapStyle},getDataset:function(t){var e=this.datasets[t];if(e){var r=this._definitionCache.getByDefinition(e);if(r)return r;var n=this._createDataset(e);return this._definitionCache.add(n),n.isSublayer&&this.getDataset(n.parentId),n}},forEach:function(t){var e=this;this._orderedDatasets.forEach(function(r){return t(e.getDataset(r))})},forEachDataset:function(t){var e=this;Object.values(this.datasets).filter(function(t){return!t.parentId}).forEach(function(r){return t(e.getDataset(r.id))})},topLevelDatasets:function(){var t=this;return Object.values(this.datasets).filter(function(t){return!t.parentId}).map(function(e){return t.getDataset(e.id)})},getPatternAndSymbolConfigs:function(){return this.topLevelDatasets().reduce(function(t,e){return y(y({},t),{},{patternConfigs:[].concat(c(t.patternConfigs),c(e.patternConfigs)),symbolConfigs:[].concat(c(t.symbolConfigs),c(e.symbolConfigs))})},{patternConfigs:[],symbolConfigs:[]})},_lastMenuState:{},invalidateKeyItemsOnMenuStateChange:function(t){t!==this._lastMenuState&&(this._lastMenuState=t,this._lastKeyItemsDatasets=null)},_lastKeyItems:{},keyItems:function(){if(this.datasets===this._lastKeyItemsDatasets)return this._lastKeyItems;this._lastKeyItemsDatasets=this.datasets;var t=[],e=new Map;this.forEach(function(r){if(r.keyVisibility)if(r.hasSublayers||r.groupId||r.groupLabel){var n=r.groupId,o=function(r,n){if(e.has(n))return e.get(n);var o={type:"group",id:n,groupLabel:r,keyDefinitions:[]};return e.set(n,o),t.push(o),o}(r.groupLabel||n||r.label,n);r.hasSublayers||o.keyDefinitions.push(r.keyDefinition)}else t.push({type:"flat",id:r.id,keyDefinition:r.keyDefinition})});var r=t.filter(function(t){var e;return"flat"===t.type||Boolean(null===(e=t.keyDefinitions)||void 0===e?void 0:e.length)}),n=r.some(function(t){return"group"===t.type});return this._lastKeyItems={items:r,hasGroups:n},this._lastKeyItems}};Object.defineProperty(b,"datasets",{get:function(){return b._datasets}})},400(t,e,r){r.d(e,{A3:()=>o,ob:()=>a,uA:()=>i});var n={},o=function(t){n=t},a=function(t,e){switch(n.opacityMode){case"global":return n.opacity;case"multiply":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.round(100*(t*e*n.opacity+Number.EPSILON))/100}(t,e);default:return function(t,e){return void 0===t?void 0===e?n.opacity:e:t}(t,e)}},i=function(){return n.visible}},447(t,e,r){r.d(e,{DV:()=>p,vf:()=>s});var n=r(262);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var u={},s=function(t){u=t},l=function(t){for(var e,r=(null===(e=u)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.menuState)||{},n=0,o=Object.entries(t);n<o.length;n++){var i=a(o[n],2),s=i[0],l=i[1],c=r[s];if(!l.includes(c))return!1}return!0},c=function(t){return(Array.isArray(t)?t:[t]).includes(f())},f=function(){return n.Q.mapStyle.id},p=function(t){if(null==t)return!0;if("boolean"==typeof t)return t;if("object"===o(t)){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=a(r[e],2),i=n[0],u=n[1];if("mapStyleId"===i&&!c(u))return!1;if("menu"===i&&!l(u))return!1}return!0}return!0}},619(t,e,r){r.d(e,{v:()=>o});var n="[interactive-map]",o={warn:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).warn.apply(t,[n].concat(r))},error:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).error.apply(t,[n].concat(r))}}}}]);
|
|
2
|
+
"use strict";(Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[]).push([[447],{852:function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{jE:function(){return d},Eg:function(){return y},V:function(){return l},p_:function(){return p}});var s,l={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visible:!0,style:{stroke:"#d4351c",strokeWidth:2,symbolDescription:"red outline"}},c=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription"].concat(function(t){if(Array.isArray(t))return u(t)}(s=["symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolSize","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(s)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],p=function(t){return f.some(function(e){return e in t})},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(t)?a({strokeWidth:l.style.strokeWidth},t):a(a({},l.style),t)},d=function(t){!0!==t.visible&&!1!==t.visible&&(t.visible="hidden"!==t.visibility);var e=a(a(a({},l),t),{},{style:a({},t.style)});return c.forEach(function(t){return delete e[t]}),e}},973:function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{manifest:function(){return ht}});var l=function(t){var e=t.datasets,r=[],n=(void 0===e?[]:e).filter(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))}),o=new Map;return n.forEach(function(t){var e;if(null!==(e=t.sublayers)&&void 0!==e&&e.length){var n=t.sublayers.filter(function(e){return t.showInMenu?!1!==e.showInMenu:e.showInMenu});if(!1===t.showInMenu&&!n.length)return;var a={id:t.id,groupLabel:t.label,visibleWhen:!0,type:"checkbox",items:n.map(function(e){return{id:"".concat(t.id,"-").concat(e.id),label:e.label}})};0===a.items.length&&(delete a.groupLabel,a.items.push({id:t.id,label:t.label})),r.push(a)}else if(t.groupLabel){var i=o.has(t.groupLabel)?o.get(t.groupLabel):{id:t.groupLabel,groupLabel:t.groupLabel,visibleWhen:!0,type:"checkbox",items:[]};o.has(t.groupLabel)||(o.set(t.groupLabel,i),r.push(i)),i.items.push({id:t.id,label:t.label})}else r.push({visibleWhen:!0,type:"checkbox",id:t.id,items:[{id:t.id,label:t.label}]})}),r},c=function(t,e){return t.reduce(function(t,r){var n=r.items.filter(function(t){return!e.includes(t.id)});return n.length&&t.push(a(a({},r),{},{items:n})),t},[])},f=r(852);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){b(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function b(t,e,r){return(e=function(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=function(t,e){var r,n=e.id,o=(0,f.jE)(e);e.parentId&&("showInKey"in e||delete o.showInKey,"showInMenu"in e||delete o.showInMenu),t[n]=o;var a=t.orderedDatasets;a.push(n);var i=null===(r=e.sublayers)||void 0===r?void 0:r.map(function(t){return function(t,e){var r="".concat(t,"-").concat(e.id),n=e.id;return"hidden"!==e.visibility&&(e.visibility="visible"),d(d({},e),{},{id:r,parentId:t,sublayerId:n})}(n,t)});if(null!=i&&i.length){var u=null==i?void 0:i.map(function(t){return t.id}),s=null==i?void 0:i.reduce(v,{orderedDatasets:a});return t[n].sublayerIds=u,delete t[n].sublayers,d(d(d({},t),s),{},{orderedDatasets:a})}return d(d({},t),{},{orderedDatasets:a})},h=function(t){var e=(t.datasets||[]).reduce(v,{orderedDatasets:[]}),r=e.orderedDatasets;return delete e.orderedDatasets,d(d({},t),{},{mappedDatasets:e,orderedDatasets:r})},m=r(619);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function S(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?D(Object(r),!0).forEach(function(e){_(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _(t,e,r){return(e=function(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var P=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"not found";return!!t.mappedDatasets[e]||(m.v.error("".concat(r,": Dataset with id '").concat(e,"' ").concat(n)),!1)},w=0,E=function(t,e,r){return w=r.actionsArray.length?w+1:0,A(A({},r),{},{actionsArray:[].concat(S(r.actionsArray),[{method:t,parameters:e,actionId:w}])})},j={SET_DATASETS:function(t,e){var r=e.mappedDatasets,n=e.orderedDatasets;return A(A({},t),{},{mappedDatasets:r,orderedDatasets:n})},ADD_DATASET:function(t,e){var r=e.dataset,n=e.mapStyle;if(t.mappedDatasets[r.id])return m.v.error("addDataset: Dataset with id '".concat(r.id,"' already exists")),t;var o=h({datasets:[r]}),a=o.mappedDatasets,i=o.orderedDatasets,s=function(t,e){var r,n=u(t.menu),o=l({datasets:[e]}),a=n.find(function(t){return t.groupLabel===o[0].groupLabel});return a?(r=a.items).push.apply(r,u(o[0].items)):n.push.apply(n,u(o)),n}(t,r);return E("addDataset",[r.id,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),a),orderedDatasets:[].concat(S(t.orderedDatasets),S(i)),menu:s}))},REMOVE_DATASET:function(t,e){var r,n=e.id;if(!P(t,n,"removeDataset"))return t;var o=A({},t.mappedDatasets),a=[n].concat(S((null===(r=o[n])||void 0===r?void 0:r.sublayerIds)||[]));a.forEach(function(t){return delete o[t]});var i=t.orderedDatasets.filter(function(t){return!a.includes(t)});return A(A({},t),{},{mappedDatasets:o,orderedDatasets:i,menu:c(t.menu,a)})},SET_DATASET_VISIBILITY:function(t,e){var r=e.datasetId,n=e.visible;return P(t,r,"setDatasetVisibility")?t.mappedDatasets[r].visible===n?t:E("applyDatasetVisibility",[r,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,A(A({},t.mappedDatasets[r]),{},{visible:n})))})):t},SET_GLOBAL_VISIBILITY:function(t,e){var r=e.visible;return E("applyGlobalVisibility",[r],A(A({},t),{},{globals:A(A({},t.globals),{},{visible:r})}))},SET_DATASET_STYLE:function(t,e){var r=e.datasetId,n=e.styleChanges,o=e.mapStyle;if(!P(t,r,"setDatasetStyle"))return t;var a=A(A({},t.mappedDatasets[r].style),n),i=A(A(A({},t.mappedDatasets[r]),n),{},{style:a});return E("applyStyle",[r,o],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,i))}))},SET_OPACITY:function(t,e){var r=e.datasetId,n=e.opacity;if(!P(t,r,"setOpacity"))return t;var o=A(A({},t.mappedDatasets[r].style),{},{opacity:n}),a=A(A({},t.mappedDatasets[r]),{},{style:o});return E("applyDatasetOpacity",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,a))}))},SET_GLOBAL_OPACITY:function(t,e){var r=e.opacity;return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),{},{opacity:r})}))},HIDE_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - hideFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=o.hiddenFeatures||[],i=Array.from(new Set([].concat(S(a),S(n))));return o.hiddenFeatures=i,E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},SHOW_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - showFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=(o.hiddenFeatures||[]).filter(function(t){return!n.includes(t)});return o.hiddenFeatures=a.length?a:[-1],E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},REMOVE_ADAPTER_ACTIONS:function(t,e){return null!=e&&e.length?A(A({},t),{},{actionsArray:t.actionsArray.filter(function(t){return!e.includes(t)})}):t},SET_GLOBAL_STATE:function(t,e){return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),e)}))},SET_MENU:function(t,e){var r=e.menu;return A(A({},t),{},{menu:r})}},I=r(738),T={APP_ADD_MARKER:"app:addmarker",APP_UPDATE_MARKER:"app:updatemarker",APP_REMOVE_MARKER:"app:removemarker",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_SET_APPLICATION_MODE:"app:setapplicationmode",APP_CLEAR_APPLICATION_MODE:"app:clearapplicationmode",APP_SHOW_HINT:"app:showhint",APP_DISMISS_HINT:"app:dismisshint",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_FULLSCREEN_CHANGE:"app:fullscreenchange",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_SPATIAL_LIST:"map:setspatiallist",MAP_SET_SPATIAL_LIST_SUPPRESSED:"map:setspatiallistsuppressed",MAP_SET_ACTIVE_ITEM:"map:setactiveitem",MAP_SELECT_ITEM:"map:selectitem",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function k(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return M(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(M(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,M(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,M(f,"constructor",l),M(l,"constructor",s),s.displayName="GeneratorFunction",M(l,o,"GeneratorFunction"),M(f),M(f,o,"Generator"),M(f,n,function(){return this}),M(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:a,m:p}})()}function M(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}M=function(t,e,r,n){function a(e,r){M(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},M(t,e,r,n)}function C(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var L=function(){var t,e=(t=k().m(function t(e,r,n,o){var a,i,u,s,l,c,f;return k().w(function(t){for(;;)switch(t.n){case 0:return a=n(e,r),u=(i="string"==typeof a?{url:a}:a).url,s=i.headers,l=void 0===s?{}:s,t.n=1,fetch(u,{headers:l,signal:o});case 1:if((c=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(c.status," ").concat(c.statusText));case 2:return t.n=3,c.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){C(a,n,o,i,u,"next",t)}function u(t){C(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var x=function(t){return t.getBounds()},F=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},N=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return G(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},R=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},B=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,a=function(t,i){var u;0===i?(u=t,e=Math.min(e,u[0]),r=Math.min(r,u[1]),n=Math.max(n,u[0]),o=Math.max(o,u[1])):t.forEach(function(t){return a(t,i-1)})};switch(t.type){case"Point":a(t.coordinates,0);break;case"LineString":case"MultiPoint":a(t.coordinates,1);break;case"Polygon":case"MultiLineString":a(t.coordinates,2);break;case"MultiPolygon":a(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var a=B(t);e=Math.min(e,a[0]),r=Math.min(r,a[1]),n=Math.max(n,a[2]),o=Math.max(o,a[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function V(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return U(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(U(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,U(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,U(f,"constructor",l),U(l,"constructor",s),s.displayName="GeneratorFunction",U(l,o,"GeneratorFunction"),U(f),U(f,o,"Generator"),U(f,n,function(){return this}),U(f,"toString",function(){return"[object Generator]"}),(V=function(){return{w:a,m:p}})()}function U(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}U=function(t,e,r,n){function a(e,r){U(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},U(t,e,r,n)}function W(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||K(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var z=function(t){return{type:"FeatureCollection",features:Array.from(t.values()).map(function(t){return t.feature})}},Q=function(t,e,r){if(r&&!(t.size<=1.2*r)){var n,o=r,a=[],i=[],u=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=K(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){i=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(i)throw o}}}}(t);try{for(u.s();!(n=u.n()).done;){var s=H(n.value,2),l=s[0],c=s[1];R(c.bbox,e)?a.push(l):i.push({id:l,lastSeenAt:c.lastSeenAt})}}catch(t){u.e(t)}finally{u.f()}i.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var f=t.size-o,p=0;p<f&&p<i.length;p++)t.delete(i[p].id);if(t.size>o)for(var y=t.size-o,d=a.map(function(e){return{id:e,lastSeenAt:t.get(e).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<y&&b<d.length;b++)t.delete(d[b].id)}},Y=function(t,e,r){var n=Date.now();e.features.forEach(function(e){var o=function(t,e){var r,n;return e&&null!==(r=null===(n=t.properties)||void 0===n?void 0:n[e])&&void 0!==r?r:t.id}(e,r);null!=o?t.set(o,{feature:e,bbox:B(e.geometry),lastSeenAt:n}):console.warn("Feature missing ID, skipping:",e)})},J=function(){var t,e=(t=V().m(function t(e,r){var n,o,a,i,u,s,l,c,f,p,y,d,b,v,h;return V().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=r.mapProvider,o=r.dynamicGeoJSON,a=r.onUpdate,i=o.url,u=o.idProperty,s=o.transformRequest,l=o.maxFeatures,c=o.minZoom,f=void 0===c?0:c,!((p=n.getZoom())<f)){t.n=1;break}return t.a(2);case 1:if(y=x(n),!e.fetchedBbox||!F(e.fetchedBbox,y)){t.n=2;break}return t.a(2);case 2:return e.currentController&&e.currentController.abort(),e.currentController=new AbortController,t.p=3,d={bbox:y,zoom:p},t.n=4,L(i,d,s,e.currentController.signal);case 4:b=t.v,Y(e.features,b,u),e.fetchedBbox=N(e.fetchedBbox,y),v=e.features.size,Q(e.features,y,l),e.features.size<v&&(e.fetchedBbox=y),a(o.id,z(e.features)),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(h=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),h);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){W(a,n,o,i,u,"next",t)}function u(t){W(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r){return e.apply(this,arguments)}}(),$=r(262),q=r(447),X=function(t){var e=t.adapter,r=t.pluginConfig,n=t.mapStyle,o=t.mapProvider,a=t.events,i=t.dispatch,u=t.eventBus,s=r.datasets,c=new Map;r.globals&&i({type:"SET_GLOBAL_STATE",payload:r.globals});var f=h({datasets:s}),p=f.mappedDatasets,y=f.orderedDatasets;e.createDataset&&$.Q.attachCreateDataset(e.createDataset),$.Q.attach(p,y,n);var d=l({datasets:s});u.requestOnce("menu:state",q.vf),i({type:"SET_MENU",payload:{menu:d}}),i({type:"SET_DATASETS",payload:{mappedDatasets:p,orderedDatasets:y}}),e.init().then(function(){$.Q.forEachDataset(function(t){if(t.hasDynamicGeoJSON){var r=function(t){var e,r,n,o=t.dynamicGeoJSON,a=t.mapProvider,i=t.onUpdate,u={features:new Map,fetchedBbox:null,currentController:null},s=function(){return J(u,{mapProvider:a,dynamicGeoJSON:o,onUpdate:i})},l=(e=s,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),c=function(){l()};return a.map.on("moveend",c),s(),{destroy:function(){var t,e;t=a.map,e=c,(t.off||t.un).call(t,"moveend",e),l.cancel(),u.currentController&&u.currentController.abort()},clear:function(){u.features.clear(),u.fetchedBbox=null,i(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){u.features.clear(),u.fetchedBbox=null,s()},getFeatureCount:function(){return u.features.size},reapply:function(){u.features.size>0&&i(o.id,z(u.features))}}}({dynamicGeoJSON:t.dynamicGeoJSON,mapProvider:o,onUpdate:function(t,r){return e.setData(t,r)}});c.set(t.id,r)}}),e.attachDynamicSources(c),u.emit("datasets:ready")});var b=function(){e.onMapSizeChange()};u.on(a.MAP_SIZE_CHANGE,b);var v=u.emitWhenRequested("datasets:registry",$.Q);return u.on("menu:changed",function(t){$.Q.invalidateKeyItemsOnMenuStateChange(t),e.applyGlobalVisibility()}),{remove:function(){u.off(a.MAP_SIZE_CHANGE,b),v(),c.forEach(function(t){return t.destroy()}),c.clear(),e.destroy()},refreshDataset:function(t){var e;null===(e=c.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=c.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=c.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}},tt=r(400);function et(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return rt(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(rt(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,rt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,rt(f,"constructor",l),rt(l,"constructor",s),s.displayName="GeneratorFunction",rt(l,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(et=function(){return{w:a,m:p}})()}function rt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}rt=function(t,e,r,n){function a(e,r){rt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},rt(t,e,r,n)}function nt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){nt(a,n,o,i,u,"next",t)}function u(t){nt(a,n,o,i,u,"throw",t)}i(void 0)})}}var at,it=function(){var t=ot(et().m(function t(e){var n,o,a,i,u,s,l;return et().w(function(t){for(;;)switch(t.n){case 0:l=e.name,t.n="MapLibreProvider"===l?1:"EsriProvider"===l?3:"OpenLayersProvider"===l?5:7;break;case 1:return t.n=2,r.e(563).then(r.bind(r,291));case 2:return n=t.v,o=n.default,t.a(2,o);case 3:return t.n=4,Promise.resolve().then(function(){var t=new Error("Cannot find module './esri/esriLayerAdapter.js'");throw t.code="MODULE_NOT_FOUND",t});case 4:return a=t.v,i=a.default,t.a(2,i);case 5:return t.n=6,r.e(809).then(r.bind(r,382));case 6:return u=t.v,s=u.default,t.a(2,s);case 7:throw new Error("No layer adapter available for map provider ".concat(e.name,". Please provide a compatible layer adapter."));case 8:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),ut={},st=function(){var t=ot(et().m(function t(e,r,n){var o,a,i,u,s=arguments;return et().w(function(t){for(;;)switch(t.n){case 0:return i=s.length>3&&void 0!==s[3]?s[3]:{},t.n=1,it(e);case 1:return u=t.v,at=new u(e,r,n,i),ut.removeDataset=at.removeDataset.bind(at),ut.setData=at.setData.bind(at),ut.applyStyle=at.applyStyle.bind(at),ut.applyDatasetVisibility=at.applyDatasetVisibility.bind(at),ut.applyGlobalVisibility=at.applyGlobalVisibility.bind(at),ut.applyDatasetOpacity=at.applyDatasetOpacity.bind(at),ut.applyGlobalOpacity=at.applyGlobalOpacity.bind(at),ut.addDataset=at.addDataset.bind(at),ut.applyFeatureFilter=at.applyFeatureFilter.bind(at),ut.onMapStyleChange=null===(o=at.onMapStyleChange)||void 0===o?void 0:o.bind(at),ut.onMapSizeChange=null===(a=at.onMapSizeChange)||void 0===a?void 0:a.bind(at),t.a(2,at)}},t)}));return function(e,r,n){return t.apply(this,arguments)}}();function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ct(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return ft(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(ft(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,ft(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,ft(f,"constructor",l),ft(l,"constructor",s),s.displayName="GeneratorFunction",ft(l,o,"GeneratorFunction"),ft(f),ft(f,o,"Generator"),ft(f,n,function(){return this}),ft(f,"toString",function(){return"[object Generator]"}),(ct=function(){return{w:a,m:p}})()}function ft(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}ft=function(t,e,r,n){function a(e,r){ft(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},ft(t,e,r,n)}function pt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var yt=function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_DATASET_VISIBILITY",payload:{datasetId:i,visible:e}}:{type:"SET_GLOBAL_VISIBILITY",payload:{visible:e}})},dt=r(287),bt=function(t){var e=t.menuGroupItem,r=t.onChange,n=$.Q.getDataset(e.id);if(!n)return null;var o=n.isSublayer?n.parentId:n.id,a=n.isSublayer?n.id:void 0,i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n.visible?"":" im-c-datasets-layers__item--checked");return(0,dt.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,dt.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,dt.jsx)("input",{className:"govuk-checkboxes__input",id:n.id,"data-dataset-id":o,"data-sublayer-id":a,name:"layers",type:"checkbox",value:n.id,checked:n.isLocallyVisible,onChange:r}),(0,dt.jsx)("label",{className:"im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",htmlFor:n.id,children:n.label})]})},n.id)},vt=function(t){var e=t.menuGroup,r=t.children;return e.groupLabel?(0,dt.jsx)("div",{className:"govuk-form-group im-c-datasets-layers-group",children:(0,dt.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,dt.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:(0,dt.jsx)("h3",{children:e.groupLabel})}),r]})},e.id):(0,dt.jsx)(dt.Fragment,{children:r})},ht={InitComponent:function(t){var e=t.pluginConfig,r=t.pluginState,n=t.mapState,o=t.mapProvider,a=t.services,i=r.dispatch,u=a.eventBus,s=a.symbolRegistry,l=a.patternRegistry,c=Boolean(null==o?void 0:o.isBaseMapReady());(0,I.useEffect)(function(){var t=!1!==e.hasMenu&&function(t){return t.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})}(e);t||(u.emitWhenReady(T.APP_REMOVE_PANEL,"datasetsLayers"),u.emitWhenReady(T.APP_TOGGLE_BUTTON_STATE,{id:"datasetsLayers",prop:"hidden",value:!0}))},[e.hasMenu]);var f=(0,I.useRef)(r);f.current=r;var p=(0,I.useRef)(null);return(0,I.useEffect)(function(){if(c&&!p.current){var t=function(){var t,r=(t=ct().m(function t(){var r;return ct().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,st(o,s,l);case 1:r=t.v,p.current=X({adapter:r,pluginConfig:e,pluginStateRef:f,mapStyle:n.mapStyle,mapProvider:o,events:T,dispatch:i,eventBus:u});case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){pt(a,n,o,i,u,"next",t)}function u(t){pt(a,n,o,i,u,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();t()}},[c]),(0,I.useEffect)(function(){$.Q.attach(r.mappedDatasets,r.orderedDatasets),u.emit("datasets:changed")},[r.mappedDatasets,r.orderedDatasets]),(0,I.useEffect)(function(){$.Q.attachMapStyle(n.mapStyle),null!=ut&&ut.onMapStyleChange&&Promise.resolve(ut.onMapStyleChange()).then(function(){u.emit(T.MAP_DATA_CHANGE)})},[n.mapStyle]),(0,I.useEffect)(function(){return(0,tt.A3)(r.globals)},[r.globals]),(0,I.useEffect)(function(){var t=r.actionsArray;t.length&&(t.forEach(function(t){var e,r=t.method,n=t.parameters;return ut[r].apply(ut,function(t){if(Array.isArray(t))return lt(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),i({type:"REMOVE_ADAPTER_ACTIONS",payload:t}))},[r.actionsArray]),(0,I.useEffect)(function(){return function(){p.current&&(p.current.remove(),p.current=null)}},[]),null},reducer:{initialState:{globals:{visible:!0,opacity:1,opacityMode:"dataset"},key:{items:[],hasGroups:!1},mappedDatasets:{},orderedDatasets:[],actionsArray:[],menu:[]},actions:j},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e=t.pluginState,r=e.menu,n=void 0===r?[]:r,o=function(t){var r=t.target,n=r.value,o=r.checked;yt({pluginState:e},o,{datasetId:n})},a=n.some(function(t){return t.groupLabel}),i="im-c-datasets-layers".concat(a?" im-c-datasets-layers--has-groups":"");return(0,dt.jsx)("div",{className:i,children:n.map(function(t){return(0,dt.jsxs)(vt,{menuGroup:t,children:[" ",t.items.map(function(t){return(0,dt.jsx)(bt,{menuGroupItem:t,onChange:o},t.id)})]},t.id)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){(0,t.pluginState.dispatch)({type:"ADD_DATASET",payload:{dataset:e,mapStyle:t.mapState.mapStyle}})},removeDataset:function(t,e){var r=t.pluginState.dispatch;ut.removeDataset(e),r({type:"REMOVE_DATASET",payload:{id:e}})},setDatasetVisibility:yt,setFeatureVisibility:function(t,e,r){var n=t.pluginState.dispatch,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).datasetId,a=void 0===o?null:o;if(a){var i=$.Q.getDataset(a);!i||i.idProperty||i.generateIds||m.v.warn('setFeatureVisibility: Dataset "'.concat(a,'" has no idProperty or generateIds configured. Features may not be matched correctly. Add idProperty to match by a feature property, or add generateIds: true to use auto-generated IDs.'))}n({type:e?"SHOW_FEATURES":"HIDE_FEATURES",payload:{datasetId:a,featureIds:r}})},setStyle:function(t,e){var r=t.pluginState.dispatch,n=t.mapState,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.datasetId,i=o.sublayerId;r({type:"SET_DATASET_STYLE",payload:{datasetId:a=i?"".concat(a,"-").concat(i):a,styleChanges:e,mapStyle:n.mapStyle}})},getStyle:function(t){t._pluginState;var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.datasetId,n=e.sublayerId;r=n?"".concat(r,"-").concat(n):r;var o=$.Q.getDataset(r);return o?o.style:(m.v.warn("getStyle: Dataset with id ".concat(r," not found")),null)},setOpacity:function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_OPACITY",payload:{datasetId:i,opacity:e}}:{type:"SET_GLOBAL_OPACITY",payload:{opacity:e}})},getOpacity:function(t){var e,r=t.pluginState.globals,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;if(i){var u,s=$.Q.getDataset(i);return s?null!==(u=s.opacity)&&void 0!==u?u:null:(m.v.warn("getOpacity: Dataset with id ".concat(i," not found")),null)}return null!==(e=r.opacity)&&void 0!==e?e:null},setData:function(t,e,r){t._pluginState;var n=r.datasetId,o=$.Q.getDataset(n);o?null!=o&&o.tiles?m.v.warn('setData called on vector tile dataset "'.concat(n,'" — has no effect')):ut.setData(n,e):m.v.warn("setData: Dataset with id ".concat(n," not found"))},setGlobals:function(t,e){var r=t.pluginState.dispatch,n=e.opacityMode,o={},a=!1;n&&(["dataset","global","multiply"].includes(n)?(a=!0,o.opacityMode=n):m.v.warn("Ignoring invalid opacityMode: ".concat(n,". Must be one of 'dataset', 'global' or 'multiply'."))),a?r({type:"SET_GLOBAL_STATE",payload:o}):m.v.warn("setGlobals: requires a valid value for opacityMode to be set")}}}},228:function(t,e,r){r.d(e,{j:function(){return A}});var n=r(262),o=r(447),a=r(852),i=(new Set,new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),function(t){return!!(null!=t&&t.symbol||null!=t&&t.symbolSvgContent)});function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y=f(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e.id,this.url=e.url,this.transformRequest=e.transformRequest,this.maxFeatures=e.maxFeatures,this.minZoom=e.minZoom,this.idProperty=e.idProperty,this.hiddenFeaturesIdExpression=["to-string",["get",this.idProperty]],this.sourceId="geojson-dynamic-".concat(this.id),this.source=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({type:"geojson",data:{type:"FeatureCollection",features:[]}},this.idProperty?{promoteId:this.idProperty}:{generateId:!0})}),d=r(400);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function v(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach(function(e){S(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function S(t,e,r){return(e=D(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,D(n.key),n)}}function D(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var A=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._datasetDefinition=e},(e=[{key:"id",get:function(){return this._datasetDefinition.id}},{key:"label",get:function(){return this._datasetDefinition.label}},{key:"hasSymbol",get:function(){return!this.hasSublayers&&i(this.style)}},{key:"hasPattern",get:function(){return!(this.hasSublayers||this.hasSymbol||(t=this.style,!t.fillPattern&&!t.fillPatternSvgContent));var t}},{key:"hasFill",get:function(){var t,e;return!this.hasSublayers&&!this.hasSymbol&&(this.hasPattern||(null===(t=this.style)||void 0===t?void 0:t.fill)&&"transparent"!==(null===(e=this.style)||void 0===e?void 0:e.fill))}},{key:"hasStroke",get:function(){var t;return!this.hasSublayers&&!this.hasSymbol&&Boolean(null===(t=this.style)||void 0===t?void 0:t.stroke)}},{key:"tiles",get:function(){return this._datasetDefinition.tiles}},{key:"geojson",get:function(){return this._datasetDefinition.geojson}},{key:"idProperty",get:function(){return this._datasetDefinition.idProperty}},{key:"generateIds",get:function(){return this._datasetDefinition.generateIds}},{key:"parentId",get:function(){return this._datasetDefinition.parentId}},{key:"minZoom",get:function(){var t;return this._datasetDefinition.minZoom||(null===(t=this.parent)||void 0===t?void 0:t.minZoom)}},{key:"maxZoom",get:function(){var t;return this._datasetDefinition.maxZoom||(null===(t=this.parent)||void 0===t?void 0:t.maxZoom)}},{key:"type",get:function(){var t;return this._datasetDefinition.type||(null===(t=this.parent)||void 0===t?void 0:t.type)}},{key:"showInKey",get:function(){var t,e,r=this._datasetDefinition.showInKey;return void 0!==r?r:null!==(t=null===(e=this.parent)||void 0===e?void 0:e.showInKey)&&void 0!==t&&t}},{key:"visibleWhen",get:function(){var t;return void 0===this._datasetDefinition.visibleWhen?null===(t=this.parent)||void 0===t?void 0:t.visibleWhen:this._datasetDefinition.visibleWhen}},{key:"groupLabel",get:function(){var t,e;return this._datasetDefinition.groupLabel||(null===(t=this.parent)||void 0===t?void 0:t.groupLabel)||(null===(e=this.parent)||void 0===e?void 0:e.label)}},{key:"groupId",get:function(){var t;return this._datasetDefinition.groupId||(null===(t=this.parent)||void 0===t?void 0:t.groupId)||(this.groupLabel?this.groupLabel.toLowerCase().replace(/\s+/g,"-"):null)}},{key:"opacity",get:function(){var t,e,r=null===(t=this.style)||void 0===t?void 0:t.opacity,n=null===(e=this.parent)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.opacity;return(0,d.ob)(r,n)}},{key:"hasDynamicGeoJSON",get:function(){return Boolean(this._datasetDefinition.dynamicGeoJSON)}},{key:"dynamicGeoJSON",get:function(){return new y(g(g({},this._datasetDefinition.dynamicGeoJSON),{},{id:this.id,minZoom:this.minZoom}))}},{key:"hiddenFeatures",get:function(){return this._datasetDefinition.hiddenFeatures}},{key:"hasHiddenFeatures",get:function(){var t,e;return Boolean((null===(t=this.hiddenFeatures)||void 0===t?void 0:t.length)>0||(null===(e=this.parent)||void 0===e?void 0:e.hasHiddenFeatures))}},{key:"filter",get:function(){return null}},{key:"isHiddenByInheritance",get:function(){var t;return this.isSublayer?!(null!==(t=this.parent)&&void 0!==t&&t.visible):!(0,d.uA)()}},{key:"isLocallyVisible",get:function(){return!!this.isVisible||this._datasetDefinition.visible}},{key:"visible",get:function(){var t;return this.isSublayer?this._datasetDefinition.visible&&(null===(t=this.parent)||void 0===t?void 0:t.visible):this._datasetDefinition.visible&&(0,d.uA)()}},{key:"esriStyleLayerId",get:function(){return this._datasetDefinition.esriStyleLayerId}},{key:"visibility",get:function(){var t=this.visible,e=this.visibleWhen;return t&&e?(0,o.DV)(e)?"visible":"none":t?"visible":"none"}},{key:"keyVisibility",get:function(){return this.showInKey&&"visible"===this.visibility}},{key:"symbolAnchor",get:function(){var t,e;return null!==(t=this.style)&&void 0!==t&&t.symbolAnchor?this.style.symbolAnchor:null===(e=this.parent)||void 0===e?void 0:e.symbolAnchor}},{key:"sourceLayer",get:function(){return this.isSublayer?this.parent.sourceLayer:this.tiles?this._datasetDefinition.sourceLayer:void 0}},{key:"isSublayer",get:function(){return Boolean(this._datasetDefinition.parentId)}},{key:"hasSublayers",get:function(){var t;return(null===(t=this._datasetDefinition.sublayerIds)||void 0===t?void 0:t.length)>0}},{key:"sublayerIds",get:function(){return this._datasetDefinition.sublayerIds}},{key:"sublayers",get:function(){var t=this.sublayerIds;return t?t.map(function(t){return n.Q.getDataset(t)}):[]}},{key:"parent",get:function(){if(this._datasetDefinition.parentId)return n.Q.getDataset(this._datasetDefinition.parentId)}},{key:"inheritedStyle",get:function(){var t=this._datasetDefinition.style||{},e=this.parent;return e?g(g({},e.inheritedStyle),{},{opacity:void 0},t):t}},{key:"style",get:function(){return g(g({},(0,a.Eg)(this.inheritedStyle)),{},{symbolDescription:this.symbolDescription})}},{key:"hasCustomVisualStyle",get:function(){return(0,a.p_)(this._datasetDefinition.style||{})}},{key:"symbolDescription",get:function(){var t;return null!==(t=this._datasetDefinition.style)&&void 0!==t&&t.symbolDescription?this._datasetDefinition.style.symbolDescription:this.hasCustomVisualStyle?void 0:this.parent?this.parent.symbolDescription:a.V.style.symbolDescription}},{key:"patternConfigs",get:function(){var t=this.hasPattern?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.patternConfigs}))):t}},{key:"symbolConfigs",get:function(){var t=this.hasSymbol?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.symbolConfigs}))):t}},{key:"keyDefinition",get:function(){return{id:this.id,type:"dataset",label:this.label,hasSymbol:this.hasSymbol,hasPattern:this.hasPattern,style:this.style,symbolDescription:this.symbolDescription}}}])&&O(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},262:function(t,e,r){r.d(e,{Q:function(){return b}});var n=r(228);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.idToDefinitionMap=new Map,this.definitionToInstanceMap=new Map},(e=[{key:"add",value:function(t){this.idToDefinitionMap.set(t.id,t._datasetDefinition),this.definitionToInstanceMap.set(t._datasetDefinition,t)}},{key:"invalidateDataset",value:function(t){var e=this,r=this.idToDefinitionMap.get(t.id);[r.id].concat(function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((null==r?void 0:r.sublayerIds)||[])).forEach(function(t){var r=e.idToDefinitionMap.get(t);e.definitionToInstanceMap.delete(r),e.idToDefinitionMap.delete(t)})}},{key:"invalidateChangedDatasets",value:function(t){var e=this;t.forEach(function(t){var r=e.idToDefinitionMap.get(t.id);if(r&&r!==t){var n=e.definitionToInstanceMap.get(r);e.invalidateDataset(n.isSublayer&&n.parent?n.parent:n)}})}},{key:"getByDefinition",value:function(t){return this.definitionToInstanceMap.get(t)}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b={attach:function(t,e,r){this._datasets=t,this._orderedDatasets=e,this.attachMapStyle(r),this._invalidateChangedDatasets()},_definitionCache:new s,_invalidateCache:function(){this._definitionCache=new s},_invalidateChangedDatasets:function(){this._datasets?this._definitionCache.invalidateChangedDatasets(Object.values(this._datasets)):this._invalidateCache()},attachCreateDataset:function(t){this._createDataset=t},_createDataset:function(t){return function(t){return new n.j(t)}(t)},attachMapStyle:function(t){t&&(this._mapStyle=t)},get mapStyle(){return this._mapStyle},getDataset:function(t){var e=this.datasets[t];if(e){var r=this._definitionCache.getByDefinition(e);if(r)return r;var n=this._createDataset(e);return this._definitionCache.add(n),n.isSublayer&&this.getDataset(n.parentId),n}},forEach:function(t){var e=this;this._orderedDatasets.forEach(function(r){return t(e.getDataset(r))})},forEachDataset:function(t){var e=this;Object.values(this.datasets).filter(function(t){return!t.parentId}).forEach(function(r){return t(e.getDataset(r.id))})},topLevelDatasets:function(){var t=this;return Object.values(this.datasets).filter(function(t){return!t.parentId}).map(function(e){return t.getDataset(e.id)})},getPatternAndSymbolConfigs:function(){return this.topLevelDatasets().reduce(function(t,e){return y(y({},t),{},{patternConfigs:[].concat(c(t.patternConfigs),c(e.patternConfigs)),symbolConfigs:[].concat(c(t.symbolConfigs),c(e.symbolConfigs))})},{patternConfigs:[],symbolConfigs:[]})},_lastMenuState:{},invalidateKeyItemsOnMenuStateChange:function(t){t!==this._lastMenuState&&(this._lastMenuState=t,this._lastKeyItemsDatasets=null)},_lastKeyItems:{},keyItems:function(){if(this.datasets===this._lastKeyItemsDatasets)return this._lastKeyItems;this._lastKeyItemsDatasets=this.datasets;var t=[],e=new Map;this.forEach(function(r){if(r.keyVisibility)if(r.hasSublayers||r.groupId||r.groupLabel){var n=r.groupId,o=function(r,n){if(e.has(n))return e.get(n);var o={type:"group",id:n,groupLabel:r,keyDefinitions:[]};return e.set(n,o),t.push(o),o}(r.groupLabel||n||r.label,n);r.hasSublayers||o.keyDefinitions.push(r.keyDefinition)}else t.push({type:"flat",id:r.id,keyDefinition:r.keyDefinition})});var r=t.filter(function(t){var e;return"flat"===t.type||Boolean(null===(e=t.keyDefinitions)||void 0===e?void 0:e.length)}),n=r.some(function(t){return"group"===t.type});return this._lastKeyItems={items:r,hasGroups:n},this._lastKeyItems}};Object.defineProperty(b,"datasets",{get:function(){return b._datasets}})},400:function(t,e,r){r.d(e,{A3:function(){return o},ob:function(){return a},uA:function(){return i}});var n={},o=function(t){n=t},a=function(t,e){switch(n.opacityMode){case"global":return n.opacity;case"multiply":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.round(100*(t*e*n.opacity+Number.EPSILON))/100}(t,e);default:return function(t,e){return void 0===t?void 0===e?n.opacity:e:t}(t,e)}},i=function(){return n.visible}},447:function(t,e,r){r.d(e,{DV:function(){return p},vf:function(){return s}});var n=r(262);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var u={},s=function(t){u=t},l=function(t){for(var e,r=(null===(e=u)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.menuState)||{},n=0,o=Object.entries(t);n<o.length;n++){var i=a(o[n],2),s=i[0],l=i[1],c=r[s];if(!l.includes(c))return!1}return!0},c=function(t){return(Array.isArray(t)?t:[t]).includes(f())},f=function(){return n.Q.mapStyle.id},p=function(t){if(null==t)return!0;if("boolean"==typeof t)return t;if("object"===o(t)){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=a(r[e],2),i=n[0],u=n[1];if("mapStyleId"===i&&!c(u))return!1;if("menu"===i&&!l(u))return!1}return!0}return!0}},619:function(t,e,r){r.d(e,{v:function(){return o}});var n="[interactive-map]",o={warn:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).warn.apply(t,[n].concat(r))},error:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).error.apply(t,[n].concat(r))}}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("defra",[],e):"object"==typeof exports?exports.defra=e():(t.defra=t.defra||{},t.defra.datasetsPlugin=e())}(Object("undefined"!=typeof self?self:this),function(){return function(){"use strict";var t,e,r={738:function(t){t.exports=preactCompat},287:function(t){t.exports=preactJsxRuntime}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.m=r,o.d=function(t,e){for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=function(t){return Promise.all(Object.keys(o.f).reduce(function(e,r){return o.f[r](t,e),e},[]))},o.u=function(t){return{447:"im-datasets-plugin",563:"im-datasets-ml-adapter",809:"im-datasets-ol-adapter"}[t]+".js"},o.miniCssF=function(t){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t={},e="defra.datasetsPlugin:",o.l=function(r,n,i,u){if(t[r])t[r].push(n);else{var a,c;if(void 0!==i)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var s=f[p];if(s.getAttribute("src")==r||s.getAttribute("data-webpack")==e+i){a=s;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+i),a.src=r),t[r]=[n];var l=function(e,n){a.onerror=a.onload=null,clearTimeout(d);var o=t[r];if(delete t[r],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(t){return t(n)}),e)return e(n)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),c&&document.head.appendChild(a)}},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}(),function(){var t={57:0};o.f.j=function(e,r){var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(function(r,o){n=t[e]=[r,o]});r.push(n[2]=i);var u=o.p+o.u(e),a=new Error;o.l(u,function(r){if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+u+")",a.name="ChunkLoadError",a.type=i,a.request=u,n[1](a)}},"chunk-"+e,e)}};var e=function(e,r){var n,i,u=r[0],a=r[1],c=r[2],f=0;if(u.some(function(e){return 0!==t[e]})){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);c&&c(o)}for(e&&e(r);f<u.length;f++)i=u[f],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},r=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}();var i={};function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function a(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof f?n:f,p=Object.create(a.prototype);return c(p,"_invoke",function(r,n,o){var i,a,c,f=0,p=o||[],s=!1,l={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,a=0,c=t,l.n=r,u}};function d(r,n){for(a=r,c=n,e=0;!s&&f&&!o&&e<p.length;e++){var o,i=p[e],d=l.p,b=i[2];r>3?(o=b===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(a=0,l.v=n,l.n=i[1]):d<b&&(o=r<3||i[0]>n||n>b)&&(i[4]=r,i[5]=n,l.n=b,a=0))}if(o||r>1)return u;throw s=!0,n}return function(o,p,b){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&d(p,b),a=p,c=b;(e=a<2?t:c)||!s;){i||(a?a<3?(a>1&&(l.n=-1),d(a,c)):l.n=c:l.v=c);try{if(f=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(s=l.n<0)?c:r.call(n,l))!==u)break}catch(e){i=t,a=1,c=e}finally{f=1}}return{value:e,done:s}}}(r,o,i),!0),p}var u={};function f(){}function p(){}function s(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),d=s.prototype=f.prototype=Object.create(l);function b(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,c(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return p.prototype=s,c(d,"constructor",s),c(s,"constructor",p),p.displayName="GeneratorFunction",c(s,o,"GeneratorFunction"),c(d),c(d,o,"Generator"),c(d,n,function(){return this}),c(d,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:b}})()}function c(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,e,r,n){function i(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},c(t,e,r,n)}function f(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function l(t,e,r){return(e=function(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(){var t,e,r=s(s({noKeyItemText:"No features displayed"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{id:"datasets",load:(t=a().m(function t(){var e;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o.e(447).then(o.bind(o,973));case 1:return e=t.v.manifest,t.a(2,e)}},t)}),e=function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){f(i,n,o,u,a,"next",t)}function a(t){f(i,n,o,u,a,"throw",t)}u(void 0)})},function(){return e.apply(this,arguments)})});return r}return o.d(i,{default:function(){return d}}),i.default}()});
|
|
@@ -55,14 +55,14 @@ export default class EsriLayerAdapter extends LayerAdapter {
|
|
|
55
55
|
this._applyStyleLayerPaintProperties(sublayer, mapLayer)
|
|
56
56
|
}
|
|
57
57
|
})
|
|
58
|
-
this.applyDatasetVisibility(registryDataset.id)
|
|
58
|
+
this.applyDatasetVisibility(registryDataset.id) // NOSONAR: Not changing for now as used in production
|
|
59
59
|
})
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// Add the visible datasets first - to speed up rendering
|
|
63
63
|
for (const registryDataset of topLevelDatasets) {
|
|
64
64
|
if (registryDataset.visibility === 'visible') {
|
|
65
|
-
await _add(registryDataset)
|
|
65
|
+
await _add(registryDataset) // NOSONAR: Await inside a for loop is fine, parent function is async
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
// Reorder layers after adding the initially visible datasets
|
|
@@ -70,7 +70,7 @@ export default class EsriLayerAdapter extends LayerAdapter {
|
|
|
70
70
|
// Add the non-visible datasets next
|
|
71
71
|
for (const registryDataset of topLevelDatasets) {
|
|
72
72
|
if (registryDataset.visibility !== 'visible') {
|
|
73
|
-
await _add(registryDataset)
|
|
73
|
+
await _add(registryDataset) // NOSONAR: Await inside a for loop is fine, parent function is async
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -179,9 +179,9 @@ export default class EsriLayerAdapter extends LayerAdapter {
|
|
|
179
179
|
const { parentId } = registryDataset
|
|
180
180
|
const vectorTileLayer = this._mapVisibilityLayers[parentId || datasetId]
|
|
181
181
|
this._reorderLayers()
|
|
182
|
-
this.applyDatasetOpacity(datasetId)
|
|
182
|
+
this.applyDatasetOpacity(datasetId) // NOSONAR: Not changing for now as used in production
|
|
183
183
|
this._applyStyleLayerPaintProperties(registryDataset, vectorTileLayer)
|
|
184
|
-
this.applyDatasetVisibility(datasetId)
|
|
184
|
+
this.applyDatasetVisibility(datasetId) // NOSONAR: Not changing for now as used in production
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
async removeDataset (datasetId) {
|
|
@@ -265,7 +265,7 @@ export default class EsriLayerAdapter extends LayerAdapter {
|
|
|
265
265
|
if (!esriStyleLayerId || !vectorTileLayer) {
|
|
266
266
|
return
|
|
267
267
|
}
|
|
268
|
-
this.ready.then(() => {
|
|
268
|
+
this.ready.then(() => { // NOSONAR: Not changing for now as used in production
|
|
269
269
|
vectorTileLayer.setStyleLayerVisibility(esriStyleLayerId, registryDataset.visibility)
|
|
270
270
|
})
|
|
271
271
|
}
|
|
@@ -11,7 +11,7 @@ describe('EsriDataset', () => {
|
|
|
11
11
|
datasetRegistry.attachCreateDataset(def => new EsriDataset(def))
|
|
12
12
|
datasetRegistry.mockExtend({
|
|
13
13
|
// applyLayerPaintProperties
|
|
14
|
-
'esri-bare': { id: 'esri-bare' },
|
|
14
|
+
'esri-bare': { id: 'esri-bare', style: { stroke: null } },
|
|
15
15
|
// esriGroupId — parent owns the id, child inherits it
|
|
16
16
|
'esri-group': { id: 'esri-group', esriGroupId: 'group-123', sublayerIds: ['esri-child'] },
|
|
17
17
|
'esri-child': { id: 'esri-child', parentId: 'esri-group' },
|
|
@@ -24,7 +24,7 @@ export const addStrokeLayer = (map, registryDataset, mapStyleId) => {
|
|
|
24
24
|
}
|
|
25
25
|
const paint = {
|
|
26
26
|
'line-color': getValueForStyle(registryDataset.style.stroke, mapStyleId),
|
|
27
|
-
'line-width': registryDataset.style.strokeWidth
|
|
27
|
+
'line-width': registryDataset.style.strokeWidth,
|
|
28
28
|
'line-opacity': registryDataset.opacity,
|
|
29
29
|
...(registryDataset.style.strokeDashArray ? { 'line-dasharray': registryDataset.style.strokeDashArray } : {})
|
|
30
30
|
}
|
|
@@ -47,11 +47,11 @@ describe('addFillLayer', () => {
|
|
|
47
47
|
// ─── addStrokeLayer ───────────────────────────────────────────────────────────
|
|
48
48
|
|
|
49
49
|
describe('addStrokeLayer', () => {
|
|
50
|
-
it(
|
|
50
|
+
it("uses the style's strokeWidth for line-width", () => {
|
|
51
51
|
const map = makeMap()
|
|
52
|
-
const ds = makeDataset({ hasStroke: true, strokeLayerId: 'test-ds-stroke', style: { stroke: '#000000' } })
|
|
52
|
+
const ds = makeDataset({ hasStroke: true, strokeLayerId: 'test-ds-stroke', style: { stroke: '#000000', strokeWidth: 3 } })
|
|
53
53
|
addStrokeLayer(map, ds, 'outdoor')
|
|
54
|
-
expect(ds.getStrokeSource).toHaveBeenCalledWith(expect.objectContaining({ 'line-width':
|
|
54
|
+
expect(ds.getStrokeSource).toHaveBeenCalledWith(expect.objectContaining({ 'line-width': 3 }))
|
|
55
55
|
})
|
|
56
56
|
|
|
57
57
|
it('includes line-dasharray in the paint when strokeDashArray is set', () => {
|
|
@@ -22,7 +22,7 @@ describe('MapLibreDataset', () => {
|
|
|
22
22
|
'ds-transparent-fill': { id: 'ds-transparent-fill', style: { fill: 'transparent' } },
|
|
23
23
|
// shared: no special properties — used by layerIds, sourceId, source, visibility,
|
|
24
24
|
// _hiddenFeaturesIdExpression, _hiddenFeaturesFilter, and filter tests
|
|
25
|
-
'ds-bare': { id: 'ds-bare' },
|
|
25
|
+
'ds-bare': { id: 'ds-bare', style: { stroke: null } },
|
|
26
26
|
'ds-no-id-prop': { id: 'ds-no-id-prop', geojson: 'https://example.com/data', transformRequest: () => {} },
|
|
27
27
|
'ds-no-transform': { id: 'ds-no-transform', geojson: 'https://example.com/data', idProperty: 'id' },
|
|
28
28
|
'ds-static-url': { id: 'ds-static-url', geojson: 'https://example.com/static.geojson' },
|
|
@@ -2,8 +2,6 @@ import Style from 'ol/style/Style.js'
|
|
|
2
2
|
import Stroke from 'ol/style/Stroke.js'
|
|
3
3
|
import { getValueForStyle } from '../../../../../src/utils/getValueForStyle.js'
|
|
4
4
|
|
|
5
|
-
const DEFAULT_STROKE_WIDTH = 1
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* The Canvas-only style for genuinely crisp fill patterns, at any pixelRatio.
|
|
9
7
|
*
|
|
@@ -24,7 +22,7 @@ const buildStroke = (registryDataset, mapStyleId) => {
|
|
|
24
22
|
}
|
|
25
23
|
return new Stroke({
|
|
26
24
|
color: getValueForStyle(registryDataset.style.stroke, mapStyleId),
|
|
27
|
-
width: registryDataset.style.strokeWidth
|
|
25
|
+
width: registryDataset.style.strokeWidth,
|
|
28
26
|
lineDash: registryDataset.style.strokeDashArray
|
|
29
27
|
})
|
|
30
28
|
}
|
|
@@ -74,18 +74,6 @@ describe('buildCanvasPatternStyle', () => {
|
|
|
74
74
|
expect(style.getStroke().getWidth()).toBe(3)
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
-
it('defaults the Stroke width to 1 when strokeWidth is not set', async () => {
|
|
78
|
-
const patternRegistry = makePatternRegistry()
|
|
79
|
-
await registerPattern({ fillPattern: 'dot' }, patternRegistry)
|
|
80
|
-
const registryDataset = {
|
|
81
|
-
style: { fillPattern: 'dot', stroke: '#ff0000' },
|
|
82
|
-
filter: null,
|
|
83
|
-
hasStroke: true
|
|
84
|
-
}
|
|
85
|
-
const styleFn = buildCanvasPatternStyle(registryDataset, styleContext(patternRegistry))
|
|
86
|
-
expect(styleFn(feature()).getStroke().getWidth()).toBe(1)
|
|
87
|
-
})
|
|
88
|
-
|
|
89
77
|
it('evaluates a filter correctly for a feature with no geometry', async () => {
|
|
90
78
|
const patternRegistry = makePatternRegistry()
|
|
91
79
|
await registerPattern({ fillPattern: 'dot' }, patternRegistry)
|
|
@@ -76,9 +76,9 @@ beforeEach(() => {
|
|
|
76
76
|
datasetRegistry.attachCreateDataset(adapter.createDataset)
|
|
77
77
|
datasetRegistry.mockExtend({
|
|
78
78
|
'ds-fill': { id: 'ds-fill', style: { fill: '#0000ff' }, geojson: { type: 'FeatureCollection', features: [point(1, [0, 0])] } },
|
|
79
|
-
'ds-bare': { id: 'ds-bare' },
|
|
79
|
+
'ds-bare': { id: 'ds-bare', style: { stroke: null } },
|
|
80
80
|
'ds-tiles': { id: 'ds-tiles', tiles: ['https://example.com/{z}/{x}/{y}'], style: { fill: '#0000ff' } },
|
|
81
|
-
'ds-tiles-bare': { id: 'ds-tiles-bare', tiles: ['https://example.com/{z}/{x}/{y}'] },
|
|
81
|
+
'ds-tiles-bare': { id: 'ds-tiles-bare', style: { stroke: null }, tiles: ['https://example.com/{z}/{x}/{y}'] },
|
|
82
82
|
'ds-dynamic': { id: 'ds-dynamic', style: { fill: '#0000ff' }, dynamicGeoJSON: { url: 'https://example.com', idProperty: 'ref' } },
|
|
83
83
|
'ds-parent': { id: 'ds-parent', sublayerIds: ['ds-child-a', 'ds-child-b'], geojson: { type: 'FeatureCollection', features: [point(1, [0, 0])] } },
|
|
84
84
|
'ds-child-a': { id: 'ds-child-a', parentId: 'ds-parent', style: { fill: '#ff0000' }, filter: ['==', ['get', 'cat'], 'a'] },
|
|
@@ -3,7 +3,6 @@ import { datasetRegistry } from '../../../registry/datasetRegistry.js'
|
|
|
3
3
|
import { getValueForStyle } from '../../../../../../src/utils/getValueForStyle.js'
|
|
4
4
|
|
|
5
5
|
const MAX_TILE_ZOOM = 22
|
|
6
|
-
const DEFAULT_STROKE_WIDTH = 1
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* OpenLayers implementation of the shared Dataset registry model.
|
|
@@ -162,7 +161,7 @@ export class OpenLayersDataset extends MapboxStyleDataset {
|
|
|
162
161
|
}
|
|
163
162
|
if (this.hasStroke) {
|
|
164
163
|
style['stroke-color'] = getValueForStyle(this.style.stroke, mapStyleId)
|
|
165
|
-
style['stroke-width'] = this.style.strokeWidth
|
|
164
|
+
style['stroke-width'] = this.style.strokeWidth
|
|
166
165
|
if (this.style.strokeDashArray) {
|
|
167
166
|
style['stroke-line-dash'] = this.style.strokeDashArray
|
|
168
167
|
}
|
|
@@ -40,7 +40,7 @@ describe('OpenLayersDataset', () => {
|
|
|
40
40
|
'ds-stroke-only': { id: 'ds-stroke-only', style: { stroke: 'red', strokeWidth: 2 } },
|
|
41
41
|
'ds-dashed-stroke': { id: 'ds-dashed-stroke', style: { stroke: 'red', strokeDashArray: [4, 2] } },
|
|
42
42
|
'ds-transparent-fill': { id: 'ds-transparent-fill', style: { fill: 'transparent' } },
|
|
43
|
-
'ds-bare': { id: 'ds-bare' },
|
|
43
|
+
'ds-bare': { id: 'ds-bare', style: { stroke: null } },
|
|
44
44
|
'ds-tiles': { id: 'ds-tiles', tiles: ['https://example.com/{z}/{x}/{y}'], minZoom: 5, maxZoom: 15 },
|
|
45
45
|
'ds-tiles-no-zoom': { id: 'ds-tiles-no-zoom', tiles: ['https://example.com/{z}/{x}/{y}'] },
|
|
46
46
|
'ds-static-geojson': { id: 'ds-static-geojson', geojson: { type: 'FeatureCollection', features: [] }, style: { fill: 'green' } },
|
|
@@ -203,14 +203,14 @@ describe('OpenLayersDataset', () => {
|
|
|
203
203
|
expect(datasetRegistry.getDataset('ds-fill-only').getFlatStyle(context())).toEqual({ 'fill-color': 'blue' })
|
|
204
204
|
})
|
|
205
205
|
|
|
206
|
-
it('returns stroke-color and stroke-width
|
|
206
|
+
it('returns stroke-color and stroke-width', () => {
|
|
207
207
|
expect(datasetRegistry.getDataset('ds-stroke-only').getFlatStyle(context())).toEqual({ 'stroke-color': 'red', 'stroke-width': 2 })
|
|
208
208
|
})
|
|
209
209
|
|
|
210
210
|
it('includes stroke-line-dash when strokeDashArray is set', () => {
|
|
211
211
|
expect(datasetRegistry.getDataset('ds-dashed-stroke').getFlatStyle(context())).toEqual({
|
|
212
212
|
'stroke-color': 'red',
|
|
213
|
-
'stroke-width':
|
|
213
|
+
'stroke-width': 2,
|
|
214
214
|
'stroke-line-dash': [4, 2]
|
|
215
215
|
})
|
|
216
216
|
})
|
|
@@ -174,7 +174,7 @@ export const createDynamicSource = ({ dynamicGeoJSON, mapProvider, onUpdate }) =
|
|
|
174
174
|
mapProvider.map.on('moveend', handleMoveEnd)
|
|
175
175
|
|
|
176
176
|
// Initial fetch
|
|
177
|
-
fetchData()
|
|
177
|
+
fetchData() // NOSONAR: Not changing for now as used in production
|
|
178
178
|
|
|
179
179
|
return {
|
|
180
180
|
/**
|
|
@@ -203,7 +203,7 @@ export const createDynamicSource = ({ dynamicGeoJSON, mapProvider, onUpdate }) =
|
|
|
203
203
|
refresh () {
|
|
204
204
|
state.features.clear()
|
|
205
205
|
state.fetchedBbox = null
|
|
206
|
-
fetchData()
|
|
206
|
+
fetchData() // NOSONAR: Not changing for now as used in production
|
|
207
207
|
},
|
|
208
208
|
|
|
209
209
|
/**
|