@defra/interactive-map 0.0.52-alpha → 0.0.54-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.
Files changed (194) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/esm/im-core.js +1 -1
  3. package/dist/esm/im-shell.js +1 -1
  4. package/dist/umd/im-core.js +1 -1
  5. package/dist/umd/index.js +1 -1
  6. package/docs/api/context.md +30 -12
  7. package/docs/api/marker-config.md +16 -8
  8. package/docs/api/symbol-config.md +24 -9
  9. package/docs/api/symbol-registry.md +49 -14
  10. package/docs/api.md +11 -3
  11. package/docs/plugins/datasets.md +6 -10
  12. package/docs/plugins/draw.md +2 -1
  13. package/docs/plugins/map-key.md +47 -4
  14. package/package.json +1 -1
  15. package/plugins/beta/map-styles/dist/esm/im-map-styles-plugin.js +1 -1
  16. package/plugins/beta/map-styles/dist/umd/im-map-styles-plugin.js +1 -1
  17. package/plugins/beta/map-styles/dist/umd/index.js +1 -1
  18. package/plugins/datasets/dist/esm/im-datasets-ml-adapter.js +1 -1
  19. package/plugins/datasets/dist/esm/im-datasets-ol-adapter.js +1 -1
  20. package/plugins/datasets/dist/esm/im-datasets-plugin.js +1 -1
  21. package/plugins/datasets/dist/esm/mapboxStyleLayerAdapter.js +1 -1
  22. package/plugins/datasets/dist/umd/im-datasets-ml-adapter.js +1 -1
  23. package/plugins/datasets/dist/umd/im-datasets-ol-adapter.js +1 -1
  24. package/plugins/datasets/dist/umd/im-datasets-plugin.js +1 -1
  25. package/plugins/datasets/src/adapters/esri/esriLayerAdapter.js +6 -6
  26. package/plugins/datasets/src/adapters/esri/registry/esriDataset.test.js +1 -1
  27. package/plugins/datasets/src/adapters/maplibre/layerBuilders.js +10 -10
  28. package/plugins/datasets/src/adapters/maplibre/layerBuilders.test.js +22 -6
  29. package/plugins/datasets/src/adapters/maplibre/maplibreLayerAdapter.js +9 -3
  30. package/plugins/datasets/src/adapters/maplibre/maplibreLayerAdapter.test.js +18 -3
  31. package/plugins/datasets/src/adapters/maplibre/registry/mapLibreDataset.js +3 -3
  32. package/plugins/datasets/src/adapters/maplibre/registry/mapLibreDataset.test.js +20 -27
  33. package/plugins/datasets/src/adapters/openlayers/canvasPatternStyle.js +16 -70
  34. package/plugins/datasets/src/adapters/openlayers/canvasPatternStyle.test.js +30 -115
  35. package/plugins/datasets/src/adapters/openlayers/layerBuilders.js +11 -13
  36. package/plugins/datasets/src/adapters/openlayers/layerBuilders.test.js +11 -3
  37. package/plugins/datasets/src/adapters/openlayers/openlayersLayerAdapter.js +48 -19
  38. package/plugins/datasets/src/adapters/openlayers/openlayersLayerAdapter.test.js +101 -13
  39. package/plugins/datasets/src/adapters/openlayers/registry/openLayersDataset.js +27 -28
  40. package/plugins/datasets/src/adapters/openlayers/registry/openLayersDataset.test.js +51 -32
  41. package/plugins/datasets/src/fetch/createDynamicSource.js +2 -2
  42. package/plugins/datasets/src/initialise/DatasetsInit.jsx +2 -2
  43. package/plugins/datasets/src/initialise/defaults.js +16 -27
  44. package/plugins/datasets/src/initialise/defaults.test.js +25 -57
  45. package/plugins/datasets/src/initialise/initialiseDatasets.js +1 -4
  46. package/plugins/datasets/src/reducers/__data__/demoDatasets.js +1 -3
  47. package/plugins/datasets/src/reducers/mappedDatasetsReducer.test.js +1 -1
  48. package/plugins/datasets/src/registry/dataset.js +23 -17
  49. package/plugins/datasets/src/registry/dataset.test.js +114 -11
  50. package/plugins/datasets/src/registry/mapboxStyleDataset.js +1 -1
  51. package/plugins/datasets/src/registry/mapboxStyleDataset.test.js +1 -1
  52. package/plugins/draw/dist/esm/im-draw-ml-adapter.js +1 -1
  53. package/plugins/draw/dist/esm/im-draw-ol-adapter.js +1 -1
  54. package/plugins/draw/dist/esm/im-draw-plugin.js +1 -1
  55. package/plugins/draw/dist/esm/index.js +1 -1
  56. package/plugins/draw/dist/esm/liveDrawChecks.js +1 -1
  57. package/plugins/draw/dist/umd/im-draw-ml-adapter.js +1 -1
  58. package/plugins/draw/dist/umd/im-draw-ol-adapter.js +1 -1
  59. package/plugins/draw/dist/umd/im-draw-plugin.js +1 -1
  60. package/plugins/draw/dist/umd/index.js +1 -1
  61. package/plugins/draw/src/DrawInit.jsx +7 -5
  62. package/plugins/draw/src/DrawInit.test.jsx +18 -2
  63. package/plugins/draw/src/adapters/maplibre/MaplibreDrawAdapter.js +11 -5
  64. package/plugins/draw/src/adapters/maplibre/MaplibreDrawAdapter.test.js +27 -11
  65. package/plugins/draw/src/adapters/maplibre/mapboxDraw.js +12 -9
  66. package/plugins/draw/src/adapters/maplibre/mapboxDraw.test.js +18 -0
  67. package/plugins/draw/src/adapters/maplibre/pointSymbolImages.js +81 -56
  68. package/plugins/draw/src/adapters/maplibre/pointSymbolImages.test.js +149 -80
  69. package/plugins/draw/src/adapters/openlayers/OLDrawAdapter.js +7 -6
  70. package/plugins/draw/src/adapters/openlayers/OLDrawAdapter.test.js +22 -25
  71. package/plugins/draw/src/adapters/openlayers/core/OLDrawManager.js +26 -8
  72. package/plugins/draw/src/adapters/openlayers/core/OLDrawManager.test.js +58 -16
  73. package/plugins/draw/src/adapters/openlayers/core/styles.js +33 -20
  74. package/plugins/draw/src/adapters/openlayers/core/styles.test.js +47 -21
  75. package/plugins/draw/src/adapters/openlayers/olDraw.js +16 -12
  76. package/plugins/draw/src/adapters/openlayers/olDraw.test.js +27 -32
  77. package/plugins/draw/src/adapters/openlayers/point/pointSymbolImages.js +44 -49
  78. package/plugins/draw/src/adapters/openlayers/point/pointSymbolImages.test.js +100 -119
  79. package/plugins/draw/src/defaults.js +2 -6
  80. package/plugins/draw/src/utils/stripInternalProperties.test.js +2 -1
  81. package/plugins/draw/src/utils/symbolKeys.js +3 -4
  82. package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
  83. package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
  84. package/plugins/interact/dist/umd/index.js +1 -1
  85. package/plugins/map-key/dist/css/index.css +1 -1
  86. package/plugins/map-key/dist/esm/im-map-key-plugin.js +1 -1
  87. package/plugins/map-key/dist/umd/im-map-key-plugin.js +1 -2
  88. package/plugins/map-key/dist/umd/index.js +1 -1
  89. package/plugins/map-key/src/components/Key/Key.jsx +8 -4
  90. package/plugins/map-key/src/components/Key/Key.module.scss +144 -53
  91. package/plugins/map-key/src/components/Key/KeyGroupItem.jsx +36 -3
  92. package/plugins/map-key/src/components/Key/KeyGroupItem.test.jsx +44 -2
  93. package/plugins/map-key/src/components/Key/KeyItem.jsx +2 -2
  94. package/plugins/map-key/src/components/Key/KeySvg.jsx +19 -18
  95. package/plugins/map-key/src/components/Key/KeySvg.test.jsx +25 -18
  96. package/plugins/map-key/src/components/Key/KeySvgPattern.jsx +1 -2
  97. package/plugins/map-key/src/components/Key/KeySvgPattern.test.jsx +3 -1
  98. package/plugins/map-key/src/components/Key/KeySvgRamp.jsx +35 -6
  99. package/plugins/map-key/src/components/Key/KeySvgRamp.test.jsx +56 -16
  100. package/plugins/map-key/src/components/Key/KeySvgSymbol.jsx +26 -12
  101. package/plugins/map-key/src/components/Key/KeySvgSymbol.test.jsx +24 -74
  102. package/plugins/map-key/src/components/Key/MapKey.jsx +3 -1
  103. package/plugins/map-key/src/components/Key/svgProperties.js +8 -2
  104. package/plugins/map-key/src/components/Key/useRampOrientation.js +61 -0
  105. package/plugins/map-key/src/components/Key/useRampOrientation.test.jsx +155 -0
  106. package/plugins/map-key/src/index.js +34 -0
  107. package/plugins/map-key/src/reducers/mergeKeyGroupItems.test.js +15 -0
  108. package/plugins/map-key/src/registry/index.js +0 -2
  109. package/plugins/map-key/src/registry/index.test.js +1 -9
  110. package/plugins/map-key/src/utils/groupStyles.js +5 -2
  111. package/plugins/menu/src/registry/index.js +0 -2
  112. package/plugins/menu/src/registry/index.test.js +1 -9
  113. package/plugins/search/dist/esm/im-search-plugin.js +1 -1
  114. package/plugins/search/dist/umd/im-search-plugin.js +1 -1
  115. package/plugins/search/dist/umd/index.js +1 -1
  116. package/plugins/search/src/Search.jsx +0 -1
  117. package/plugins/search/src/components/Form/Form.jsx +3 -3
  118. package/plugins/search/src/components/Suggestions/Suggestions.jsx +2 -0
  119. package/plugins/search/src/components/Suggestions/Suggestions.test.jsx +6 -0
  120. package/plugins/search/src/defaults.js +3 -0
  121. package/plugins/search/src/events/formHandlers.js +3 -9
  122. package/plugins/search/src/events/formHandlers.test.js +6 -9
  123. package/plugins/search/src/events/inputHandlers.js +8 -2
  124. package/plugins/search/src/events/inputHandlers.test.js +20 -0
  125. package/plugins/search/src/events/suggestionHandlers.js +3 -5
  126. package/plugins/search/src/events/suggestionHandlers.test.js +5 -8
  127. package/plugins/search/src/utils/showResult.js +9 -0
  128. package/plugins/search/src/utils/showResult.test.js +16 -0
  129. package/providers/beta/esri/dist/esm/im-esri-provider.js +1 -1
  130. package/providers/beta/openlayers/dist/esm/im-openlayers-provider.js +1 -1
  131. package/providers/beta/openlayers/dist/umd/im-openlayers-provider.js +1 -1
  132. package/providers/beta/openlayers/dist/umd/index.js +1 -1
  133. package/providers/beta/openlayers/src/openlayersProvider.js +102 -2
  134. package/providers/beta/openlayers/src/openlayersProvider.test.js +95 -0
  135. package/providers/beta/openlayers/src/utils/highlightFeatures.js +20 -25
  136. package/providers/beta/openlayers/src/utils/highlightFeatures.test.js +73 -38
  137. package/providers/beta/openlayers/src/utils/patternImages.js +61 -0
  138. package/providers/beta/openlayers/src/utils/patternImages.test.js +74 -0
  139. package/providers/beta/openlayers/src/utils/symbolImages.js +103 -95
  140. package/providers/beta/openlayers/src/utils/symbolImages.test.js +136 -85
  141. package/providers/mapProvider.js +53 -1
  142. package/providers/mapProvider.test.js +6 -0
  143. package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -1
  144. package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
  145. package/providers/maplibre/dist/umd/index.js +1 -1
  146. package/providers/maplibre/src/maplibreProvider.js +50 -17
  147. package/providers/maplibre/src/maplibreProvider.test.js +74 -20
  148. package/providers/maplibre/src/utils/highlightFeatures.js +19 -14
  149. package/providers/maplibre/src/utils/highlightFeatures.test.js +20 -14
  150. package/providers/maplibre/src/utils/patternImages.js +46 -29
  151. package/providers/maplibre/src/utils/patternImages.test.js +52 -4
  152. package/providers/maplibre/src/utils/symbolImages.js +80 -39
  153. package/providers/maplibre/src/utils/symbolImages.test.js +157 -54
  154. package/src/App/components/Hints/Hints.module.scss +1 -1
  155. package/src/App/components/Markers/Markers.jsx +16 -25
  156. package/src/App/components/Markers/Markers.test.jsx +34 -48
  157. package/src/App/components/Markers/SymbolLabelMarker.jsx +1 -1
  158. package/src/App/components/Markers/SymbolMarker.jsx +1 -1
  159. package/src/App/components/Viewport/Viewport.jsx +6 -4
  160. package/src/App/components/Viewport/Viewport.test.jsx +18 -1
  161. package/src/App/hooks/useMapAnnouncements.js +7 -2
  162. package/src/App/hooks/useMapAnnouncements.test.js +13 -2
  163. package/src/App/hooks/useModalPanelBehaviour.js +3 -1
  164. package/src/App/initialiseApp.js +1 -1
  165. package/src/App/store/ServiceProvider.jsx +12 -3
  166. package/src/App/store/ServiceProvider.test.jsx +39 -0
  167. package/src/InteractiveMap/InteractiveMap.js +3 -3
  168. package/src/config/appConfig.js +1 -5
  169. package/src/config/mapSizeScales.js +8 -0
  170. package/src/config/symbolConfig.js +101 -25
  171. package/src/services/mapFocus.js +64 -0
  172. package/src/services/mapFocus.test.js +76 -0
  173. package/src/services/patternRegistry.js +97 -76
  174. package/src/services/patternRegistry.test.js +19 -1
  175. package/src/services/symbolComposer.js +184 -0
  176. package/src/services/symbolComposer.test.js +132 -0
  177. package/src/services/symbolRegistry.js +326 -155
  178. package/src/services/symbolRegistry.test.js +334 -32
  179. package/src/types.js +11 -5
  180. package/src/utils/detectInterfaceType.js +16 -5
  181. package/src/utils/detectInterfaceType.test.js +32 -0
  182. package/src/utils/hashString.js +23 -0
  183. package/src/utils/hashString.test.js +29 -0
  184. package/src/utils/imageDataCache.js +43 -0
  185. package/src/utils/imageDataCache.test.js +38 -0
  186. package/src/utils/pathBounds.js +330 -0
  187. package/src/utils/pathBounds.test.js +145 -0
  188. package/src/utils/patternUtils.js +0 -8
  189. package/src/utils/patternUtils.test.js +0 -25
  190. package/src/utils/recentImageSets.js +35 -0
  191. package/src/utils/recentImageSets.test.js +46 -0
  192. package/src/utils/symbolUtils.js +26 -29
  193. package/src/utils/symbolUtils.test.js +27 -41
  194. package/plugins/map-key/dist/umd/im-map-key-plugin.js.LICENSE.txt +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see im-datasets-ml-adapter.js.LICENSE.txt */
2
- "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[563],{913(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){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,i(n.key),n)}}function i(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+""}r.d(e,{h:()=>m});var a=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"attachDynamicSources",value:function(t){this._dynamicSources=t}},{key:"dynamicSources",get:function(){return this._dynamicSources}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),u=r(262);function c(t){return c="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},c(t)}function s(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,s=Object.create(c.prototype);return l(s,"_invoke",function(r,n,o){var i,u,c,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,y.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,i=l[e],p=y.p,h=i[2];r>3?(o=h===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,y.v=n,y.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,y.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),u=l,c=h;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(y.n=-1),p(u,c)):y.n=c:y.v=c);try{if(s=2,i){if(u||(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,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=y.n<0)?c:r.call(n,y))!==a)break}catch(e){i=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function u(){}function c(){}function f(){}e=Object.getPrototypeOf;var y=[][n]?e(e([][n]())):(l(e={},n,function(){return this}),e),p=f.prototype=u.prototype=Object.create(y);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=f,l(p,"constructor",f),l(f,"constructor",c),c.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,n,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(s=function(){return{w:i,m:h}})()}function l(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}l=function(t,e,r,n){function i(e,r){l(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))},l(t,e,r,n)}function f(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function y(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 p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function h(t,e,r){return e=d(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,r||[],d(t).constructor):e.apply(t,r))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var m=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=h(this,e))._mapProvider=t,o._map=t.map,o._symbolRegistry=r,o._patternRegistry=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),r=e,n=[{key:"_pixelRatio",get:function(){return this._map.getPixelRatio()}},{key:"addDataset",value:(o=s().m(function t(e){var r;return s().w(function(t){for(;;)switch(t.n){case 0:if(r=u.Q.getDataset(e)){t.n=1;break}return t.a(2);case 1:return t.n=2,this._registerPatternsAndSymbols(r);case 2:this._addLayers(r);case 3:return t.a(2)}},t,this)}),i=function(){var t=this,e=arguments;return new Promise(function(r,n){var i=o.apply(t,e);function a(t){f(i,r,n,a,u,"next",t)}function u(t){f(i,r,n,a,u,"throw",t)}a(void 0)})},function(t){return i.apply(this,arguments)})},{key:"applyDatasetOpacity",value:function(t){var e=u.Q.getDataset(t);e&&this._applyRegistryDatasetOpacity(e)}},{key:"_applyRegistryDatasetOpacity",value:function(t){var e=this;t.getLayersWithOpacity().forEach(function(t){var r=t.layerIds,n=t.opacity;r.forEach(function(t){return e._setLayerOpacity(t,n)})})}},{key:"applyGlobalOpacity",value:function(){var t=this;u.Q.forEachDataset(function(e){return t._applyRegistryDatasetOpacity(e)})}},{key:"applyDatasetVisibility",value:function(t){var e=u.Q.getDataset(t);e&&this._applyRegistryDatasetVisibility(e)}},{key:"_applyRegistryDatasetVisibility",value:function(t){var e=this;t.getLayersWithVisibility().forEach(function(t){var r=t.layerIds,n=t.visibility;r.forEach(function(t){return e._setLayerVisibility(t,n)})})}},{key:"applyGlobalVisibility",value:function(){var t=this;u.Q.forEachDataset(function(e){return t._applyRegistryDatasetVisibility(e)})}}],n&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(a)},496(t,e,r){r.r(e),r.d(e,{default:()=>C});var n=r(247),o=r(121);function i(t){return i="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},i(t)}function a(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 u(t,e,r){return(e=function(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c=function(t,e,r,i,s,l){var f,y=e.sourceId,p=e.source;p&&!t.getSource(y)&&t.addSource(y,p);var h=r.id;return function(t,e,r,n,i){var a=e.hasSymbol,u=e.symbolLayerId;if(a&&n&&u&&!t.getLayer(u)){var c=n.getSymbolDef(e.style);if(c){var s=n.getSymbolImageId(e.style,r,!1,i);if(s){var l=(0,o.Op)(e.style,c);t.addLayer(e.getSymbolSource(s,l,c))}}}}(t,e,r,i,l),function(t,e,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=e.hasFill,u=e.fillLayerId;if(a&&u&&!t.getLayer(u)){var c=o.getPatternImageId(e.style,r,i),s=c?{"fill-pattern":c,"fill-opacity":e.opacity}:{"fill-color":(0,n.o)(e.style.fill,r),"fill-opacity":e.opacity};t.addLayer(e.getFillSource(s))}}(t,e,h,s,l),function(t,e,r){var o=e.hasStroke,i=e.strokeLayerId;if(o&&!t.getLayer(i)){var c=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(e){u(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({"line-color":(0,n.o)(e.style.stroke,r),"line-width":e.style.strokeWidth||1,"line-opacity":e.opacity},e.style.strokeDashArray?{"line-dasharray":e.style.strokeDashArray}:{}),s=e.getStrokeSource(c);t.addLayer(s)}}(t,e,h),null!==(f=e.sublayers)&&void 0!==f&&f.length?(e.sublayers.forEach(function(e){c(t,e,r,i,s,l)}),y):e.isSublayer?void 0:y},s=r(417);function l(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 f=function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,r)||function(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}(e,r)||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.")}()),o=n[0],i=n[1],a=function(t){return t<=.25?"left":t>=.75?"right":""}(o),u=function(t){return t<=.25?"top":t>=.75?"bottom":""}(i);return u+(a&&u?"-":"")+a||"center"},y=r(619);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 h(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 b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(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,m(n.key),n)}}function m(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+""}function g(t,e,r){return e=O(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,S()?Reflect.construct(e,r||[],O(t).constructor):e.apply(t,r))}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(S=function(){return!!t})()}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}var w=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(e,t),r=e,(n=[{key:"fillLayerId",get:function(){return this.hasSublayers||this.hasSymbol?null:this.hasFill?this.id:null}},{key:"strokeLayerId",get:function(){return this.hasSublayers||this.hasSymbol?null:this.hasStroke?this.hasFill?"".concat(this.id,"-stroke"):this.id:null}},{key:"symbolLayerId",get:function(){return this.hasSublayers?null:this.hasSymbol?this.id:null}},{key:"leafLayerIds",get:function(){return[this.symbolLayerId,this.fillLayerId,this.strokeLayerId].filter(Boolean)}},{key:"_geojsonIdStrategy",value:function(){var t;return this.idProperty?{promoteId:this.idProperty}:this.generateIds?{generateId:!0}:(null!==(t=this.geojson)&&void 0!==t&&null!==(t=t.features)&&void 0!==t&&t.some(function(t){return"string"==typeof t.id})&&y.v.warn('Dataset "'.concat(this.id,'" has GeoJSON features with string native IDs. MapLibre only surfaces integer native feature IDs through queryRenderedFeatures. Use idProperty to promote a string property instead.')),{})}},{key:"source",get:function(){if(this.hasDynamicGeoJSON)return this.dynamicGeoJSON.source;if(this.tiles){var t={type:"vector",tiles:this.tiles,minzoom:this.minZoom||0,maxzoom:this.maxZoom||22};return this.idProperty&&this.sourceLayer&&(t.promoteId=d({},this.sourceLayer,this.idProperty)),t}return this.geojson?b({type:"geojson",data:this.geojson},this._geojsonIdStrategy()):null}},{key:"getSymbolSource",value:function(t,e,r){return b({id:this.symbolLayerId,type:"symbol",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:{visibility:this.visibility,"icon-image":t,"icon-anchor":f(e||(null==r?void 0:r.anchor)||[.5,.5]),"icon-allow-overlap":!0}},this.filter?{filter:this.filter}:{})}},{key:"getFillSource",value:function(t){return b({id:this.fillLayerId,type:"fill",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:{visibility:this.visibility},paint:t},this.filter?{filter:this.filter}:{})}},{key:"getStrokeSource",value:function(t){return b({id:this.strokeLayerId,type:"line",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:{visibility:this.visibility},paint:t},this.filter?{filter:this.filter}:{})}}])&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.f),j=r(262);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 L(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,s=Object.create(c.prototype);return k(s,"_invoke",function(r,n,o){var i,u,c,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,y.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,i=l[e],p=y.p,h=i[2];r>3?(o=h===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,y.v=n,y.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,y.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),u=l,c=h;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(y.n=-1),p(u,c)):y.n=c:y.v=c);try{if(s=2,i){if(u||(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,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=y.n<0)?c:r.call(n,y))!==a)break}catch(e){i=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(k(e={},n,function(){return this}),e),f=s.prototype=u.prototype=Object.create(l);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,k(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=s,k(f,"constructor",s),k(s,"constructor",c),c.displayName="GeneratorFunction",k(s,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(L=function(){return{w:i,m:y}})()}function k(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}k=function(t,e,r,n){function i(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:(i("next",0),i("throw",1),i("return",2))},k(t,e,r,n)}function I(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function E(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){I(i,n,o,a,u,"next",t)}function u(t){I(i,n,o,a,u,"throw",t)}a(void 0)})}}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,T(n.key),n)}}function T(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+""}function F(t,e,r){return e=x(e),function(t,e){if(e&&("object"==P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,R()?Reflect.construct(e,r||[],x(t).constructor):e.apply(t,r))}function R(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(R=function(){return!!t})()}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}var C=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=F(this,e,[t,r,n]))._datasetSourceMap=new Map,window._datasetSourceMap=o._datasetSourceMap,o._symbolLayerIds=new Set,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(e,t),r=e,n=[{key:"createDataset",value:function(t){return new w(t)}},{key:"init",value:(s=E(L().m(function t(){var e,r,n,o=this;return L().w(function(t){for(;;)switch(t.n){case 0:return e=j.Q.getPatternAndSymbolConfigs(),r=e.patternConfigs,n=e.symbolConfigs,t.n=1,this.addPatternsAndSymbolsToMap(r,n);case 1:return this._symbolLayerIds.clear(),j.Q.forEachDataset(function(t){return o._addLayers(t)}),t.n=2,new Promise(function(t){return o._map.once("idle",t)});case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"removeLayer",value:function(t){this._map.getLayer(t)&&this._map.removeLayer(t),this._symbolLayerIds.delete(t)}},{key:"addPatternsAndSymbolsToMap",value:(u=E(L().m(function t(e,r){var n,o;return L().w(function(t){for(;;)if(0===t.n)return n=j.Q.mapStyle,o=n.id,t.a(2,Promise.all([this._mapProvider.addPatternsToMap(e,o,this._patternRegistry),this._mapProvider.addSymbolsToMap(r,n,this._symbolRegistry)]))},t,this)})),function(t,e){return u.apply(this,arguments)})},{key:"destroy",value:function(){var t=this,e=new Set;j.Q.forEachDataset(function(r){var n=r.sourceId;t._getLayersUsingSource(n).forEach(function(e){return t.removeLayer(e)}),!e.has(n)&&t._map.getSource(n)&&(t._map.removeSource(n),e.add(n))}),this._datasetSourceMap.clear()}},{key:"onMapStyleChange",value:(a=E(L().m(function t(){var e,r,n,o=this;return L().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){return o._map.once("idle",t)});case 1:return e=j.Q.getPatternAndSymbolConfigs(),r=e.patternConfigs,n=e.symbolConfigs,t.n=2,this.addPatternsAndSymbolsToMap(r,n);case 2:this._symbolLayerIds.clear(),j.Q.forEachDataset(function(t){o._addLayers(t),o._applyFeatureFilter(t)}),this.dynamicSources.forEach(function(t){return t.reapply()});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"onMapSizeChange",value:(i=E(L().m(function t(){var e,r,n,o,i=this;return L().w(function(t){for(;;)switch(t.n){case 0:return e=j.Q.mapStyle,r=j.Q.getPatternAndSymbolConfigs(),n=r.patternConfigs,o=r.symbolConfigs,t.n=1,this.addPatternsAndSymbolsToMap(n,o);case 1:j.Q.forEach(function(t){var r=t.fillLayerId,n=t.symbolLayerId;if(n&&i._symbolLayerIds.has(n)&&i._map.getLayer(n)){var o=i._symbolRegistry.getSymbolImageId(t.style,e,!1,i._pixelRatio);o&&i._map.setLayoutProperty(n,"icon-image",o)}else if(r&&i._map.getLayer(r)){var a=i._patternRegistry.getPatternImageId(t.style,e.id,i._pixelRatio);a&&i._map.setPaintProperty(r,"fill-pattern",a)}});case 2:return t.a(2)}},t,this)})),function(){return i.apply(this,arguments)})},{key:"_registerPatternsAndSymbols",value:function(t){return this.addPatternsAndSymbolsToMap(t.patternConfigs,t.symbolConfigs)}},{key:"removeDataset",value:function(t){var e=this,r=j.Q.getDataset(t);if(r){var n=r.sourceId;r.layerIds.forEach(function(t){return e.removeLayer(t)}),!j.Q.topLevelDatasets().some(function(e){return e.id!==t&&e.sourceId===n})&&this._map.getSource(n)&&this._map.removeSource(n),this._datasetSourceMap.delete(t)}}},{key:"applyFeatureFilter",value:function(t){var e=j.Q.getDataset(t);e&&this._applyFeatureFilter(e)}},{key:"applyStyle",value:(o=E(L().m(function t(e){var r,n=this;return L().w(function(t){for(;;)switch(t.n){case 0:return(r=j.Q.getDataset(e)).layerIds.forEach(function(t){return n.removeLayer(t)}),t.n=1,this._registerPatternsAndSymbols(r);case 1:this._addLayers(r);case 2:return t.a(2)}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"setData",value:function(t,e){var r=this._datasetSourceMap.get(t);if(r){var n=this._map.getSource(r);n&&"function"==typeof n.setData&&n.setData(e)}}},{key:"_addLayers",value:function(t){var e=j.Q.mapStyle,r=c(this._map,t,e,this._symbolRegistry,this._patternRegistry,this._pixelRatio);this._datasetSourceMap.set(t.id,r),this._maintainSymbolOrdering(t)}},{key:"_getFirstSymbolLayerId",value:function(){var t,e=this,r=this._map.getStyle();if(null==r||!r.layers)return null;var n=r.layers.find(function(t){return e._symbolLayerIds.has(t.id)});return null!==(t=null==n?void 0:n.id)&&void 0!==t?t:null}},{key:"_maintainSymbolOrdering",value:function(t){var e=this,r=(t=t.isSublayer?t.parent:t).layerIds.filter(function(t){return t&&e._map.getLayer(t)});r.forEach(function(t){var r;"symbol"===(null===(r=e._map.getLayer(t))||void 0===r?void 0:r.type)?e._symbolLayerIds.add(t):e._symbolLayerIds.delete(t)});var n=this._getFirstSymbolLayerId();n&&r.forEach(function(t){e._symbolLayerIds.has(t)||e._map.moveLayer(t,n)})}},{key:"_setLayerVisibility",value:function(t,e){this._map.getLayer(t)&&this._map.setLayoutProperty(t,"visibility",e)}},{key:"_applyFeatureFilter",value:function(t){var e=this;t.getLayersWithFilters().forEach(function(t){var r=t.layerIds,n=t.filter;r.forEach(function(t){e._map.getLayer(t)&&e._map.setFilter(t,n)})})}},{key:"_setLayerOpacity",value:function(t,e){var r=this._map.getLayer(t);if(r){var n={line:"line-opacity",symbol:"icon-opacity"}[r.type]||"fill-opacity";this._map.setPaintProperty(t,n,e)}}},{key:"_getLayersUsingSource",value:function(t){var e=this._map.getStyle();return null!=e&&e.layers?e.layers.filter(function(e){return e.source===t}).map(function(t){return t.id}):[]}}],n&&D(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a,u,s}(r(913).h)},417(t,e,r){r.d(e,{f:()=>p});var n=r(954),o=r(449);function i(t){return i="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},i(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 u(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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,r){return e=f(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],f(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),r=e,n=[{key:"_hiddenFeaturesIdExpression",get:function(){return this.hasDynamicGeoJSON?this.dynamicGeoJSON.hiddenFeaturesIdExpression:this.idProperty?["to-string",["get",this.idProperty]]:["to-string",["id"]]}},{key:"_hiddenFeaturesFilter",get:function(){var t,e=null===(t=this.hiddenFeatures)||void 0===t?void 0:t.filter(function(t){return-1!==t});return null!=e&&e.length?["!",["in",this._hiddenFeaturesIdExpression,["literal",e.map(String)]]]:null}},{key:"filter",get:function(){var t,e=["all"];null!==(t=this.parent)&&void 0!==t&&t.filter&&e.push(this.parent.filter),this._datasetDefinition.filter&&e.push(this._datasetDefinition.filter);var r=this._hiddenFeaturesFilter;return r&&e.push(r),1===e.length?null:e.length>2?e:e[1]}},{key:"leafLayerIds",get:function(){return[]}},{key:"layerIds",get:function(){return this.hasSublayers?this.sublayers.flatMap(function(t){return t.layerIds}).filter(Boolean):this.leafLayerIds}},{key:"getLayersWithValue",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];if(!1===o||this[o]){var u=this.leafLayerIds;if(u.length){var s=this[t];i.push((e={layerIds:u},n=s,(r=c(r=t))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e))}}return this.hasSublayers&&this.sublayers.forEach(function(e){if(!1===o||e[o]){var r=function(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,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||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,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.")}()}(e.getLayersWithValue(t),1)[0];r&&i.push(r)}}),i}},{key:"getLayersWithVisibility",value:function(){return this.getLayersWithValue("visibility")}},{key:"getLayersWithOpacity",value:function(){return this.getLayersWithValue("opacity")}},{key:"getLayersWithFilters",value:function(){return this.getLayersWithValue("filter","hasHiddenFeatures")}},{key:"sourceId",get:function(){if(this.isSublayer)return this.parent.sourceId;if(this.hasDynamicGeoJSON)return this.dynamicGeoJSON.sourceId;if(this.tiles){var t=Array.isArray(this.tiles)?this.tiles.join(","):this.tiles;return"tiles-".concat((0,o.YZ)(t))}return this.geojson?"string"==typeof this.geojson?"geojson-".concat((0,o.YZ)(this.geojson)):"geojson-".concat(this.id):"source-".concat(this.id)}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.j)},247(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)}r.d(e,{o:()=>o});var o=function(t,e){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===n(t)){if(e&&t[e])return t[e];var r=Object.values(t)[0];return null!=r?r:null}return null}},121(t,e,r){r.d(e,{Op:()=>a,n8:()=>i,sR:()=>o});var n=new Set(["symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"]),o=function(t){if(!function(t){return!(!t.symbol&&!t.symbolSvgContent)}(t))return{};var e={};return n.forEach(function(r){if(null!=t[r]){var n=r.charAt(6).toLowerCase()+r.slice(7);e[n]=t[r]}}),e},i=function(t,e){var r;return t.symbolViewBox?t.symbolViewBox:null!==(r=null==e?void 0:e.viewBox)&&void 0!==r?r:"0 0 38 38"},a=function(t,e){var r;return t.symbolAnchor?t.symbolAnchor:null!==(r=null==e?void 0:e.anchor)&&void 0!==r?r:[.5,.5]}}}]);
2
+ "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[563],{913(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){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,i(n.key),n)}}function i(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+""}r.d(e,{h:()=>v});var a=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"attachDynamicSources",value:function(t){this._dynamicSources=t}},{key:"dynamicSources",get:function(){return this._dynamicSources}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),u=r(262);function c(t){return c="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},c(t)}function s(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,s=Object.create(c.prototype);return l(s,"_invoke",function(r,n,o){var i,u,c,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,y.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,i=l[e],p=y.p,h=i[2];r>3?(o=h===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,y.v=n,y.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,y.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),u=l,c=h;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(y.n=-1),p(u,c)):y.n=c:y.v=c);try{if(s=2,i){if(u||(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,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=y.n<0)?c:r.call(n,y))!==a)break}catch(e){i=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function u(){}function c(){}function f(){}e=Object.getPrototypeOf;var y=[][n]?e(e([][n]())):(l(e={},n,function(){return this}),e),p=f.prototype=u.prototype=Object.create(y);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=f,l(p,"constructor",f),l(f,"constructor",c),c.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,n,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(s=function(){return{w:i,m:h}})()}function l(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}l=function(t,e,r,n){function i(e,r){l(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))},l(t,e,r,n)}function f(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function y(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 p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function h(t,e,r){return e=d(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,r||[],d(t).constructor):e.apply(t,r))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}var v=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=h(this,e))._mapProvider=t,o._map=t.map,o._symbolRegistry=r,o._patternRegistry=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),r=e,n=[{key:"_pixelRatio",get:function(){return this._map.getPixelRatio()}},{key:"addDataset",value:(o=s().m(function t(e){var r;return s().w(function(t){for(;;)switch(t.n){case 0:if(r=u.Q.getDataset(e)){t.n=1;break}return t.a(2);case 1:return t.n=2,this._registerPatternsAndSymbols(r);case 2:this._addLayers(r);case 3:return t.a(2)}},t,this)}),i=function(){var t=this,e=arguments;return new Promise(function(r,n){var i=o.apply(t,e);function a(t){f(i,r,n,a,u,"next",t)}function u(t){f(i,r,n,a,u,"throw",t)}a(void 0)})},function(t){return i.apply(this,arguments)})},{key:"applyDatasetOpacity",value:function(t){var e=u.Q.getDataset(t);e&&this._applyRegistryDatasetOpacity(e)}},{key:"_applyRegistryDatasetOpacity",value:function(t){var e=this;t.getLayersWithOpacity().forEach(function(t){var r=t.layerIds,n=t.opacity;r.forEach(function(t){return e._setLayerOpacity(t,n)})})}},{key:"applyGlobalOpacity",value:function(){var t=this;u.Q.forEachDataset(function(e){return t._applyRegistryDatasetOpacity(e)})}},{key:"applyDatasetVisibility",value:function(t){var e=u.Q.getDataset(t);e&&this._applyRegistryDatasetVisibility(e)}},{key:"_applyRegistryDatasetVisibility",value:function(t){var e=this;t.getLayersWithVisibility().forEach(function(t){var r=t.layerIds,n=t.visibility;r.forEach(function(t){return e._setLayerVisibility(t,n)})})}},{key:"applyGlobalVisibility",value:function(){var t=this;u.Q.forEachDataset(function(e){return t._applyRegistryDatasetVisibility(e)})}}],n&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(a)},291(t,e,r){r.r(e),r.d(e,{default:()=>R});var n=r(247);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 i(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,e,r){return(e=function(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+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=function(t,e,r,o,c,s){var l,f=t.map,y=e.sourceId,p=e.source;p&&!f.getSource(y)&&f.addSource(y,p);var h=r.id;return function(t,e,r,n,o){var i=t.map,a=e.hasSymbol,u=e.symbolLayerId;if(a&&n&&u&&!i.getLayer(u)){var c=n.getSymbolDef(e.style);if(c){var s=n.getSymbolImageId(e.style,r,"normal",o);s&&i.addLayer(e.getSymbolSource(s,t.getSymbolIconLayout(c)))}}}(t,e,r,o,s),function(t,e,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=e.hasFill,u=e.fillLayerId;if(a&&u&&!t.getLayer(u)){var c=o.getPatternImageId(e.style,r,i),s=c?{"fill-pattern":c,"fill-opacity":e.opacity}:{"fill-color":(0,n.o)(e.style.fill,r),"fill-opacity":e.opacity};t.addLayer(e.getFillSource(s))}}(f,e,h,c,s),function(t,e,r){var o=e.hasStroke,u=e.strokeLayerId;if(o&&!t.getLayer(u)){var c=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({"line-color":(0,n.o)(e.style.stroke,r),"line-width":e.style.strokeWidth,"line-opacity":e.opacity},e.style.strokeDashArray?{"line-dasharray":e.style.strokeDashArray}:{}),s=e.getStrokeSource(c);t.addLayer(s)}}(f,e,h),null!==(l=e.sublayers)&&void 0!==l&&l.length?(e.sublayers.forEach(function(e){u(t,e,r,o,c,s)}),y):e.isSublayer?void 0:y},c=r(416),s=r(619);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 f(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?f(Object(r),!0).forEach(function(e){p(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function p(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(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,b(n.key),n)}}function b(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+""}function d(t,e,r){return e=v(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,r||[],v(t).constructor):e.apply(t,r))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}var S=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(e,t),r=e,(n=[{key:"fillLayerId",get:function(){return this.hasSublayers||this.hasSymbol?null:this.hasFill?this.id:null}},{key:"strokeLayerId",get:function(){return this.hasSublayers||this.hasSymbol?null:this.hasStroke?this.hasFill?"".concat(this.id,"-stroke"):this.id:null}},{key:"symbolLayerId",get:function(){return this.hasSublayers?null:this.hasSymbol?this.id:null}},{key:"leafLayerIds",get:function(){return[this.symbolLayerId,this.fillLayerId,this.strokeLayerId].filter(Boolean)}},{key:"_geojsonIdStrategy",value:function(){var t;return this.idProperty?{promoteId:this.idProperty}:this.generateIds?{generateId:!0}:(null!==(t=this.geojson)&&void 0!==t&&null!==(t=t.features)&&void 0!==t&&t.some(function(t){return"string"==typeof t.id})&&s.v.warn('Dataset "'.concat(this.id,'" has GeoJSON features with string native IDs. MapLibre only surfaces integer native feature IDs through queryRenderedFeatures. Use idProperty to promote a string property instead.')),{})}},{key:"source",get:function(){if(this.hasDynamicGeoJSON)return this.dynamicGeoJSON.source;if(this.tiles){var t={type:"vector",tiles:this.tiles,minzoom:this.minZoom||0,maxzoom:this.maxZoom||22};return this.idProperty&&this.sourceLayer&&(t.promoteId=p({},this.sourceLayer,this.idProperty)),t}return this.geojson?y({type:"geojson",data:this.geojson},this._geojsonIdStrategy()):null}},{key:"getSymbolSource",value:function(t,e){return y({id:this.symbolLayerId,type:"symbol",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:y(y({visibility:this.visibility,"icon-image":t},e),{},{"icon-allow-overlap":!0})},this.filter?{filter:this.filter}:{})}},{key:"getFillSource",value:function(t){return y({id:this.fillLayerId,type:"fill",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:{visibility:this.visibility},paint:t},this.filter?{filter:this.filter}:{})}},{key:"getStrokeSource",value:function(t){return y({id:this.strokeLayerId,type:"line",source:this.sourceId,"source-layer":this.sourceLayer,minzoom:this.minZoom,maxzoom:this.maxZoom,layout:{visibility:this.visibility},paint:t},this.filter?{filter:this.filter}:{})}}])&&h(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.f),O=r(262);function _(t){return _="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},_(t)}function w(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,s=Object.create(c.prototype);return j(s,"_invoke",function(r,n,o){var i,u,c,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,y.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,i=l[e],p=y.p,h=i[2];r>3?(o=h===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,y.v=n,y.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,y.n=h,u=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),u=l,c=h;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(y.n=-1),p(u,c)):y.n=c:y.v=c);try{if(s=2,i){if(u||(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,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=y.n<0)?c:r.call(n,y))!==a)break}catch(e){i=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(r,o,i),!0),s}var a={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(j(e={},n,function(){return this}),e),f=s.prototype=u.prototype=Object.create(l);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,j(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=s,j(f,"constructor",s),j(s,"constructor",c),c.displayName="GeneratorFunction",j(s,o,"GeneratorFunction"),j(f),j(f,o,"Generator"),j(f,n,function(){return this}),j(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:y}})()}function j(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}j=function(t,e,r,n){function i(e,r){j(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))},j(t,e,r,n)}function P(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function L(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){P(i,n,o,a,u,"next",t)}function u(t){P(i,n,o,a,u,"throw",t)}a(void 0)})}}function k(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,I(n.key),n)}}function I(t){var e=function(t){if("object"!=_(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_(e)?e:e+""}function E(t,e,r){return e=T(e),function(t,e){if(e&&("object"==_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,D()?Reflect.construct(e,r||[],T(t).constructor):e.apply(t,r))}function D(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(D=function(){return!!t})()}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}function F(t,e){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},F(t,e)}var R=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=E(this,e,[t,r,n]))._datasetSourceMap=new Map,window._datasetSourceMap=o._datasetSourceMap,o._symbolLayerIds=new Set,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}(e,t),r=e,n=[{key:"createDataset",value:function(t){return new S(t)}},{key:"init",value:(s=L(w().m(function t(){var e,r,n,o=this;return w().w(function(t){for(;;)switch(t.n){case 0:return e=O.Q.getPatternAndSymbolConfigs(),r=e.patternConfigs,n=e.symbolConfigs,t.n=1,this.addPatternsAndSymbolsToMap(r,n);case 1:return this._symbolLayerIds.clear(),O.Q.forEachDataset(function(t){return o._addLayers(t)}),t.n=2,new Promise(function(t){return o._map.once("idle",t)});case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"removeLayer",value:function(t){this._map.getLayer(t)&&this._map.removeLayer(t),this._symbolLayerIds.delete(t)}},{key:"addPatternsAndSymbolsToMap",value:(c=L(w().m(function t(e,r){var n,o;return w().w(function(t){for(;;)if(0===t.n)return n=O.Q.mapStyle,o=n.id,t.a(2,Promise.all([this._mapProvider.addPatternsToMap(e,o,this._patternRegistry),this._mapProvider.addSymbolsToMap(r,n,this._symbolRegistry)]))},t,this)})),function(t,e){return c.apply(this,arguments)})},{key:"destroy",value:function(){var t=this,e=new Set;O.Q.forEachDataset(function(r){var n=r.sourceId;t._getLayersUsingSource(n).forEach(function(e){return t.removeLayer(e)}),!e.has(n)&&t._map.getSource(n)&&(t._map.removeSource(n),e.add(n))}),this._datasetSourceMap.clear()}},{key:"onMapStyleChange",value:(a=L(w().m(function t(){var e,r,n,o=this;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){return o._map.once("idle",t)});case 1:return e=O.Q.getPatternAndSymbolConfigs(),r=e.patternConfigs,n=e.symbolConfigs,t.n=2,this.addPatternsAndSymbolsToMap(r,n);case 2:this._symbolLayerIds.clear(),O.Q.forEachDataset(function(t){o._addLayers(t),o._applyFeatureFilter(t)}),this.dynamicSources.forEach(function(t){return t.reapply()});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"onMapSizeChange",value:(i=L(w().m(function t(){var e,r,n,o,i,a=this;return w().w(function(t){for(;;)switch(t.n){case 0:return e=O.Q.mapStyle,r=this._pixelRatio,n=O.Q.getPatternAndSymbolConfigs(),o=n.patternConfigs,i=n.symbolConfigs,t.n=1,this.addPatternsAndSymbolsToMap(o,i);case 1:if(this._pixelRatio===r){t.n=2;break}return t.a(2);case 2:O.Q.forEach(function(t){var n=t.fillLayerId,o=t.symbolLayerId;if(o&&a._symbolLayerIds.has(o)&&a._map.getLayer(o)){var i=a._symbolRegistry.getSymbolImageId(t.style,e,"normal",r);i&&a._map.setLayoutProperty(o,"icon-image",i)}else if(n&&a._map.getLayer(n)){var u=a._patternRegistry.getPatternImageId(t.style,e.id,r);u&&a._map.setPaintProperty(n,"fill-pattern",u)}});case 3:return t.a(2)}},t,this)})),function(){return i.apply(this,arguments)})},{key:"_registerPatternsAndSymbols",value:function(t){return this.addPatternsAndSymbolsToMap(t.patternConfigs,t.symbolConfigs)}},{key:"removeDataset",value:function(t){var e=this,r=O.Q.getDataset(t);if(r){var n=r.sourceId;r.layerIds.forEach(function(t){return e.removeLayer(t)}),!O.Q.topLevelDatasets().some(function(e){return e.id!==t&&e.sourceId===n})&&this._map.getSource(n)&&this._map.removeSource(n),this._datasetSourceMap.delete(t)}}},{key:"applyFeatureFilter",value:function(t){var e=O.Q.getDataset(t);e&&this._applyFeatureFilter(e)}},{key:"applyStyle",value:(o=L(w().m(function t(e){var r,n=this;return w().w(function(t){for(;;)switch(t.n){case 0:return(r=O.Q.getDataset(e)).layerIds.forEach(function(t){return n.removeLayer(t)}),t.n=1,this._registerPatternsAndSymbols(r);case 1:this._addLayers(r);case 2:return t.a(2)}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"setData",value:function(t,e){var r=this._datasetSourceMap.get(t);if(r){var n=this._map.getSource(r);n&&"function"==typeof n.setData&&n.setData(e)}}},{key:"_addLayers",value:function(t){var e=O.Q.mapStyle,r=u(this._mapProvider,t,e,this._symbolRegistry,this._patternRegistry,this._pixelRatio);this._datasetSourceMap.set(t.id,r),this._maintainSymbolOrdering(t)}},{key:"_getFirstSymbolLayerId",value:function(){var t,e=this,r=this._map.getStyle();if(null==r||!r.layers)return null;var n=r.layers.find(function(t){return e._symbolLayerIds.has(t.id)});return null!==(t=null==n?void 0:n.id)&&void 0!==t?t:null}},{key:"_maintainSymbolOrdering",value:function(t){var e=this,r=(t=t.isSublayer?t.parent:t).layerIds.filter(function(t){return t&&e._map.getLayer(t)});r.forEach(function(t){var r;"symbol"===(null===(r=e._map.getLayer(t))||void 0===r?void 0:r.type)?e._symbolLayerIds.add(t):e._symbolLayerIds.delete(t)});var n=this._getFirstSymbolLayerId();n&&r.forEach(function(t){e._symbolLayerIds.has(t)||e._map.moveLayer(t,n)})}},{key:"_setLayerVisibility",value:function(t,e){this._map.getLayer(t)&&this._map.setLayoutProperty(t,"visibility",e)}},{key:"_applyFeatureFilter",value:function(t){var e=this;t.getLayersWithFilters().forEach(function(t){var r=t.layerIds,n=t.filter;r.forEach(function(t){e._map.getLayer(t)&&e._map.setFilter(t,n)})})}},{key:"_setLayerOpacity",value:function(t,e){var r=this._map.getLayer(t);if(r){var n={line:"line-opacity",symbol:"icon-opacity"}[r.type]||"fill-opacity";this._map.setPaintProperty(t,n,e)}}},{key:"_getLayersUsingSource",value:function(t){var e=this._map.getStyle();return null!=e&&e.layers?e.layers.filter(function(e){return e.source===t}).map(function(t){return t.id}):[]}}],n&&k(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a,c,s}(r(913).h)},416(t,e,r){r.d(e,{f:()=>h});var n=r(228);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}var i=function(t){var e,r=0,n=2166136261,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=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))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(i.s();!(e=i.n()).done;){var a=e.value.codePointAt(0);r=Math.imul(r,31)+a,n=Math.imul(n^a,16777619)}}catch(t){i.e(t)}finally{i.f()}return(r>>>0).toString(36)+(n>>>0).toString(36)};function a(t){return a="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},a(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}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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function l(t,e,r){return e=y(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),r=e,n=[{key:"_hiddenFeaturesIdExpression",get:function(){return this.hasDynamicGeoJSON?this.dynamicGeoJSON.hiddenFeaturesIdExpression:this.idProperty?["to-string",["get",this.idProperty]]:["to-string",["id"]]}},{key:"_hiddenFeaturesFilter",get:function(){var t,e=null===(t=this.hiddenFeatures)||void 0===t?void 0:t.filter(function(t){return-1!==t});return null!=e&&e.length?["!",["in",this._hiddenFeaturesIdExpression,["literal",e.map(String)]]]:null}},{key:"filter",get:function(){var t,e=["all"];null!==(t=this.parent)&&void 0!==t&&t.filter&&e.push(this.parent.filter),this._datasetDefinition.filter&&e.push(this._datasetDefinition.filter);var r=this._hiddenFeaturesFilter;return r&&e.push(r),1===e.length?null:e.length>2?e:e[1]}},{key:"leafLayerIds",get:function(){return[]}},{key:"layerIds",get:function(){return this.hasSublayers?this.sublayers.flatMap(function(t){return t.layerIds}).filter(Boolean):this.leafLayerIds}},{key:"getLayersWithValue",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];if(!1===o||this[o]){var a=this.leafLayerIds;if(a.length){var c=this[t];i.push((e={layerIds:a},n=c,(r=s(r=t))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e))}}return this.hasSublayers&&this.sublayers.forEach(function(e){if(!1===o||e[o]){var r=function(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,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||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}}(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.")}()}(e.getLayersWithValue(t),1)[0];r&&i.push(r)}}),i}},{key:"getLayersWithVisibility",value:function(){return this.getLayersWithValue("visibility")}},{key:"getLayersWithOpacity",value:function(){return this.getLayersWithValue("opacity")}},{key:"getLayersWithFilters",value:function(){return this.getLayersWithValue("filter","hasHiddenFeatures")}},{key:"sourceId",get:function(){if(this.isSublayer)return this.parent.sourceId;if(this.hasDynamicGeoJSON)return this.dynamicGeoJSON.sourceId;if(this.tiles){var t=Array.isArray(this.tiles)?this.tiles.join(","):this.tiles;return"tiles-".concat(i(t))}return this.geojson?"string"==typeof this.geojson?"geojson-".concat(i(this.geojson)):"geojson-".concat(this.id):"source-".concat(this.id)}}],n&&c(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.j)},247(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)}r.d(e,{o:()=>o});var o=function(t,e){if(!t)return null;if("string"==typeof t)return t.trim();if("object"===n(t)){if(e&&t[e])return t[e];var r=Object.values(t)[0];return null!=r?r:null}return null}}}]);