@defra/interactive-map 0.0.7-alpha → 0.0.9-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 (86) hide show
  1. package/assets/templates/map.njk +2 -2
  2. package/dist/esm/im-core.js +1 -2
  3. package/dist/esm/im-shell.js +1 -0
  4. package/dist/esm/index.js +1 -2
  5. package/dist/umd/im-core.js +1 -1
  6. package/dist/umd/index.js +1 -1
  7. package/docs/api/button-definition.md +104 -3
  8. package/docs/api.md +21 -1
  9. package/docs/getting-started.md +78 -8
  10. package/package.json +31 -24
  11. package/plugins/beta/datasets/dist/css/index.css +50 -1
  12. package/plugins/beta/datasets/dist/esm/im-datasets-plugin.js +1 -2
  13. package/plugins/beta/datasets/dist/esm/index.js +1 -2
  14. package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -2
  15. package/plugins/beta/draw-es/dist/esm/index.js +1 -2
  16. package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -1
  17. package/plugins/beta/draw-ml/dist/esm/index.js +1 -2
  18. package/plugins/beta/frame/dist/css/index.css +11 -1
  19. package/plugins/beta/frame/dist/esm/im-frame-plugin.js +1 -1
  20. package/plugins/beta/frame/dist/esm/index.js +1 -2
  21. package/plugins/beta/map-styles/dist/css/index.css +79 -1
  22. package/plugins/beta/map-styles/dist/esm/im-map-styles-plugin.js +1 -1
  23. package/plugins/beta/map-styles/dist/esm/index.js +1 -2
  24. package/plugins/beta/scale-bar/dist/esm/im-scale-bar-plugin.js +1 -1
  25. package/plugins/beta/scale-bar/dist/esm/index.js +1 -2
  26. package/plugins/beta/use-location/dist/esm/im-use-location-plugin.js +1 -1
  27. package/plugins/beta/use-location/dist/esm/index.js +1 -2
  28. package/plugins/beta/use-location/dist/umd/index.js +1 -1
  29. package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
  30. package/plugins/interact/dist/esm/index.js +1 -2
  31. package/plugins/search/dist/esm/im-search-plugin.js +1 -2
  32. package/plugins/search/dist/esm/index.js +1 -2
  33. package/plugins/search/src/components/Suggestions/Suggestions.module.scss +1 -1
  34. package/plugins/search/src/search.scss +1 -1
  35. package/providers/beta/esri/dist/css/index.css +30 -0
  36. package/providers/beta/esri/dist/esm/im-esri-provider.js +1 -2
  37. package/providers/beta/esri/dist/esm/index.js +1 -2
  38. package/providers/beta/open-names/dist/esm/im-reverse-geocode.js +1 -2
  39. package/providers/beta/open-names/dist/esm/index.js +1 -2
  40. package/providers/beta/open-names/src/utils/mapToLocationModel.test.js +61 -0
  41. package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -2
  42. package/providers/maplibre/dist/esm/index.js +1 -2
  43. package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
  44. package/providers/maplibre/src/appEvents.test.js +44 -0
  45. package/providers/maplibre/src/index.test.js +60 -0
  46. package/providers/maplibre/src/mapEvents.test.js +115 -0
  47. package/providers/maplibre/src/maplibreProvider.test.js +205 -0
  48. package/providers/maplibre/src/utils/calculateLinearTextSize.test.js +31 -0
  49. package/providers/maplibre/src/utils/detectWebgl.test.js +63 -0
  50. package/providers/maplibre/src/utils/highlightFeatures.test.js +126 -0
  51. package/providers/maplibre/src/utils/labels.js +1 -3
  52. package/providers/maplibre/src/utils/labels.test.js +231 -0
  53. package/providers/maplibre/src/utils/maplibreFixes.test.js +66 -0
  54. package/providers/maplibre/src/utils/queryFeatures.test.js +60 -0
  55. package/providers/maplibre/src/utils/spatial.js +5 -4
  56. package/providers/maplibre/src/utils/spatial.test.js +96 -0
  57. package/rollup.esm.mjs +288 -0
  58. package/src/App/store/appActionsMap.js +1 -1
  59. package/src/InteractiveMap/InteractiveMap.js +3 -2
  60. package/webpack.dev.mjs +9 -1
  61. package/webpack.prod.mjs +8 -1
  62. package/webpack.umd.mjs +1 -3
  63. package/dist/esm/im-core.js.LICENSE.txt +0 -1
  64. package/dist/esm/index.js.LICENSE.txt +0 -1
  65. package/plugins/beta/datasets/dist/esm/im-datasets-plugin.js.LICENSE.txt +0 -1
  66. package/plugins/beta/datasets/dist/esm/index.js.LICENSE.txt +0 -1
  67. package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js.LICENSE.txt +0 -1
  68. package/plugins/beta/draw-es/dist/esm/index.js.LICENSE.txt +0 -1
  69. package/plugins/beta/draw-ml/dist/esm/index.js.LICENSE.txt +0 -1
  70. package/plugins/beta/frame/dist/esm/index.js.LICENSE.txt +0 -1
  71. package/plugins/beta/map-styles/dist/esm/index.js.LICENSE.txt +0 -1
  72. package/plugins/beta/scale-bar/dist/esm/index.js.LICENSE.txt +0 -1
  73. package/plugins/beta/use-location/dist/esm/index.js.LICENSE.txt +0 -1
  74. package/plugins/interact/dist/esm/index.js.LICENSE.txt +0 -1
  75. package/plugins/search/dist/esm/im-search-plugin.js.LICENSE.txt +0 -1
  76. package/plugins/search/dist/esm/index.js.LICENSE.txt +0 -1
  77. package/providers/beta/esri/dist/css/im-esri-provider.css +0 -1
  78. package/providers/beta/esri/dist/esm/im-esri-provider.js.LICENSE.txt +0 -1
  79. package/providers/beta/esri/dist/esm/index.js.LICENSE.txt +0 -1
  80. package/providers/beta/open-names/dist/esm/im-reverse-geocode.js.LICENSE.txt +0 -1
  81. package/providers/beta/open-names/dist/esm/index.js.LICENSE.txt +0 -1
  82. package/providers/maplibre/dist/esm/im-maplibre-framework.js +0 -2
  83. package/providers/maplibre/dist/esm/im-maplibre-framework.js.LICENSE.txt +0 -4
  84. package/providers/maplibre/dist/esm/im-maplibre-provider.js.LICENSE.txt +0 -1
  85. package/providers/maplibre/dist/esm/index.js.LICENSE.txt +0 -1
  86. package/webpack.esm.mjs +0 -153
@@ -1,2 +1 @@
1
- /*! For license information please see im-core.js.LICENSE.txt */
2
- export const __webpack_esm_id__="im-core";export const __webpack_esm_ids__=["im-core"];export const __webpack_esm_modules__={"./src/App/initialiseApp.js"(e,t,n){n.d(t,{initialiseApp:()=>ju}),n.r(t);var r,o,i,u,a,l,c,f,s,p,d,y,m={},v=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_=Array.isArray;function h(e,t){for(var n in t)e[n]=t[n];return e}function g(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O(e,t,n){var o,i,u,a={};for(u in t)"key"==u?o=t[u]:"ref"==u?i=t[u]:a[u]=t[u];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(u in e.defaultProps)void 0===a[u]&&(a[u]=e.defaultProps[u]);return S(e,a,o,i,null)}function S(e,t,n,r,u){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==u?++i:u,__i:-1,__u:0};return null==u&&null!=o.vnode&&o.vnode(a),a}function P(e){return e.children}function w(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?E(e):null}function j(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return j(e)}}function A(e){(!e.__d&&(e.__d=!0)&&u.push(e)&&!T.__r++||a!=o.debounceRendering)&&((a=o.debounceRendering)||l)(T)}function T(){for(var e,t,n,r,i,a,l,f=1;u.length;)u.length>f&&u.sort(c),e=u.shift(),f=u.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,a=[],l=[],t.__P&&((n=h({},r)).__v=r.__v+1,o.vnode&&o.vnode(n),L(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,a,null==i?E(r):i,!!(32&r.__u),l),n.__v=r.__v,n.__.__k[n.__i]=n,H(a,n,l),r.__e=r.__=null,n.__e!=i&&j(n)));T.__r=0}function k(e,t,n,r,o,i,u,a,l,c,f){var s,p,d,y,b,_,h,g=r&&r.__k||v,O=t.length;for(l=I(n,t,g,l,O),s=0;s<O;s++)null!=(d=n.__k[s])&&(p=-1==d.__i?m:g[d.__i]||m,d.__i=s,_=L(e,d,p,o,i,u,a,l,c,f),y=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&F(p.ref,null,d),f.push(d.ref,d.__c||y,d)),null==b&&null!=y&&(b=y),(h=!!(4&d.__u))||p.__k===d.__k?l=R(d,l,e,h):"function"==typeof d.type&&void 0!==_?l=_:y&&(l=y.nextSibling),d.__u&=-7);return n.__e=b,l}function I(e,t,n,r,o){var i,u,a,l,c,f=n.length,s=f,p=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(u=t[i])&&"boolean"!=typeof u&&"function"!=typeof u?("string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?u=e.__k[i]=S(null,u,null,null,null):_(u)?u=e.__k[i]=S(P,{children:u},null,null,null):void 0===u.constructor&&u.__b>0?u=e.__k[i]=S(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):e.__k[i]=u,l=i+p,u.__=e,u.__b=e.__b+1,a=null,-1!=(c=u.__i=D(u,n,l,s))&&(s--,(a=n[c])&&(a.__u|=2)),null==a||null==a.__v?(-1==c&&(o>f?p--:o<f&&p++),"function"!=typeof u.type&&(u.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,u.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<f;i++)null!=(a=n[i])&&!(2&a.__u)&&(a.__e==r&&(r=E(a)),q(a,a));return r}function R(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=R(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=E(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function C(e,t){return t=t||[],null==e||"boolean"==typeof e||(_(e)?e.some(function(e){C(e,t)}):t.push(e)),t}function D(e,t,n,r){var o,i,u,a=e.key,l=e.type,c=t[n],f=null!=c&&!(2&c.__u);if(null===c&&null==a||f&&a==c.key&&l==c.type)return n;if(r>(f?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(c=t[u=o>=0?o--:i++])&&!(2&c.__u)&&a==c.key&&l==c.type)return u;return-1}function M(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||b.test(t)?n:n+"px"}function N(e,t,n,r,o){var i,u;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||M(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||M(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(f,"$1")),u=t.toLowerCase(),t=u in e||"onFocusOut"==t||"onFocusIn"==t?u.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=s,e.addEventListener(t,i?d:p,i)):e.removeEventListener(t,i?d:p,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function x(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=s++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function L(e,t,n,r,i,u,a,l,c,f){var s,p,d,y,m,v,b,O,S,E,j,A,T,I,R,C,D,M=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),u=[l=t.__e=n.__e]),(s=o.__b)&&s(t);e:if("function"==typeof M)try{if(O=t.props,S="prototype"in M&&M.prototype.render,E=(s=M.contextType)&&r[s.__c],j=s?E?E.props.value:s.__:r,n.__c?b=(p=t.__c=n.__c).__=p.__E:(S?t.__c=p=new M(O,j):(t.__c=p=new w(O,j),p.constructor=M,p.render=W),E&&E.sub(p),p.state||(p.state={}),p.__n=r,d=p.__d=!0,p.__h=[],p._sb=[]),S&&null==p.__s&&(p.__s=p.state),S&&null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=h({},p.__s)),h(p.__s,M.getDerivedStateFromProps(O,p.__s))),y=p.props,m=p.state,p.__v=t,d)S&&null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),S&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(S&&null==M.getDerivedStateFromProps&&O!==y&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(O,j),t.__v==n.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(O,p.__s,j)){for(t.__v!=n.__v&&(p.props=O,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),A=0;A<p._sb.length;A++)p.__h.push(p._sb[A]);p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(O,p.__s,j),S&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(y,m,v)})}if(p.context=j,p.props=O,p.__P=e,p.__e=!1,T=o.__r,I=0,S){for(p.state=p.__s,p.__d=!1,T&&T(t),s=p.render(p.props,p.state,p.context),R=0;R<p._sb.length;R++)p.__h.push(p._sb[R]);p._sb=[]}else do{p.__d=!1,T&&T(t),s=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++I<25);p.state=p.__s,null!=p.getChildContext&&(r=h(h({},r),p.getChildContext())),S&&!d&&null!=p.getSnapshotBeforeUpdate&&(v=p.getSnapshotBeforeUpdate(y,m)),C=s,null!=s&&s.type===P&&null==s.key&&(C=U(s.props.children)),l=k(e,_(C)?C:[C],t,n,r,i,u,a,l,c,f),p.base=t.__e,t.__u&=-161,p.__h.length&&a.push(p),b&&(p.__E=p.__=null)}catch(e){if(t.__v=null,c||null!=u)if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;u[u.indexOf(l)]=null,t.__e=l}else{for(D=u.length;D--;)g(u[D]);B(t)}else t.__e=n.__e,t.__k=n.__k,e.then||B(t);o.__e(e,t,n)}else null==u&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=z(n.__e,t,n,r,i,u,a,c,f);return(s=o.diffed)&&s(t),128&t.__u?void 0:l}function B(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(B)}function H(e,t,n){for(var r=0;r<n.length;r++)F(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){o.__e(e,t.__v)}})}function U(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:_(e)?e.map(U):h({},e)}function z(e,t,n,i,u,a,l,c,f){var s,p,d,y,v,b,h,O=n.props||m,S=t.props,P=t.type;if("svg"==P?u="http://www.w3.org/2000/svg":"math"==P?u="http://www.w3.org/1998/Math/MathML":u||(u="http://www.w3.org/1999/xhtml"),null!=a)for(s=0;s<a.length;s++)if((v=a[s])&&"setAttribute"in v==!!P&&(P?v.localName==P:3==v.nodeType)){e=v,a[s]=null;break}if(null==e){if(null==P)return document.createTextNode(S);e=document.createElementNS(u,P,S.is&&S),c&&(o.__m&&o.__m(t,a),c=!1),a=null}if(null==P)O===S||c&&e.data==S||(e.data=S);else{if(a=a&&r.call(e.childNodes),!c&&null!=a)for(O={},s=0;s<e.attributes.length;s++)O[(v=e.attributes[s]).name]=v.value;for(s in O)if(v=O[s],"children"==s);else if("dangerouslySetInnerHTML"==s)d=v;else if(!(s in S)){if("value"==s&&"defaultValue"in S||"checked"==s&&"defaultChecked"in S)continue;N(e,s,null,v,u)}for(s in S)v=S[s],"children"==s?y=v:"dangerouslySetInnerHTML"==s?p=v:"value"==s?b=v:"checked"==s?h=v:c&&"function"!=typeof v||O[s]===v||N(e,s,v,O[s],u);if(p)c||d&&(p.__html==d.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(d&&(e.innerHTML=""),k("template"==t.type?e.content:e,_(y)?y:[y],t,n,i,"foreignObject"==P?"http://www.w3.org/1999/xhtml":u,a,l,a?a[0]:n.__k&&E(n,0),c,f),null!=a)for(s=a.length;s--;)g(a[s]);c||(s="value","progress"==P&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[s]||"progress"==P&&!b||"option"==P&&b!=O[s])&&N(e,s,b,O[s],u),s="checked",null!=h&&h!=e[s]&&N(e,s,h,O[s],u))}return e}function F(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function q(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||F(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&q(r[i],t,n||"function"!=typeof e.type);n||g(e.__e),e.__c=e.__=e.__e=void 0}function W(e,t,n){return this.constructor(e,n)}function V(e,t,n){var i,u,a,l;t==document&&(t=document.documentElement),o.__&&o.__(e,t),u=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],L(t,e=(!i&&n||t).__k=O(P,null,[e]),u||m,m,t.namespaceURI,!i&&n?[n]:u?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:u?u.__e:t.firstChild,i,l),H(a,e,l)}function G(e,t){V(e,t,G)}function Z(e,t,n){var o,i,u,a,l=h({},e.props);for(u in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==u?o=t[u]:"ref"==u?i=t[u]:l[u]=void 0===t[u]&&null!=a?a[u]:t[u];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),S(e.type,l,o||e.key,i||e.ref,null)}function $(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,A(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+y++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=v.slice,o={__e:function(e,t,n,r){for(var o,i,u;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),u=o.__d),u)return o.__E=o}catch(t){e=t}throw e}},i=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},w.prototype.render=P,u=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,f=/(PointerCapture)$|Capture$/i,s=0,p=x(!1),d=x(!0),y=0;var K,Y,X,J,Q=0,ee=[],te=o,ne=te.__b,re=te.__r,oe=te.diffed,ie=te.__c,ue=te.unmount,ae=te.__;function le(e,t){te.__h&&te.__h(Y,e,Q||t),Q=0;var n=Y.__H||(Y.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ce(e){return Q=1,fe(je,e)}function fe(e,t,n){var r=le(K++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):je(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var u=r.__c.props!==e;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(u=!0)}}),i&&i.call(this,e,t,n)||u};Y.__f=!0;var i=Y.shouldComponentUpdate,u=Y.componentWillUpdate;Y.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}u&&u.call(this,e,t,n)},Y.shouldComponentUpdate=o}return r.__N||r.__}function se(e,t){var n=le(K++,3);!te.__s&&Ee(n.__H,t)&&(n.__=e,n.u=t,Y.__H.__h.push(n))}function pe(e,t){var n=le(K++,4);!te.__s&&Ee(n.__H,t)&&(n.__=e,n.u=t,Y.__h.push(n))}function de(e){return Q=5,me(function(){return{current:e}},[])}function ye(e,t,n){Q=6,pe(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function me(e,t){var n=le(K++,7);return Ee(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ve(e,t){return Q=8,me(function(){return e},t)}function be(e){var t=Y.context[e.__c],n=le(K++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Y)),t.props.value):e.__}function _e(e,t){te.useDebugValue&&te.useDebugValue(t?t(e):e)}function he(){var e=le(K++,11);if(!e.__){for(var t=Y.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ge(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Pe),e.__H.__h.forEach(we),e.__H.__h=[]}catch(t){e.__H.__h=[],te.__e(t,e.__v)}}te.__b=function(e){Y=null,ne&&ne(e)},te.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ae&&ae(e,t)},te.__r=function(e){re&&re(e),K=0;var t=(Y=e.__c).__H;t&&(X===Y?(t.__h=[],Y.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Pe),t.__h.forEach(we),t.__h=[],K=0)),X=Y},te.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ee.push(t)&&J===te.requestAnimationFrame||((J=te.requestAnimationFrame)||Se)(ge)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),X=Y=null},te.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Pe),e.__h=e.__h.filter(function(e){return!e.__||we(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],te.__e(n,e.__v)}}),ie&&ie(e,t)},te.unmount=function(e){ue&&ue(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Pe(e)}catch(e){t=e}}),n.__H=void 0,t&&te.__e(t,n.__v))};var Oe="function"==typeof requestAnimationFrame;function Se(e){var t,n=function(){clearTimeout(r),Oe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Oe&&(t=requestAnimationFrame(n))}function Pe(e){var t=Y,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Y=t}function we(e){var t=Y;e.__c=e.__(),Y=t}function Ee(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function je(e,t){return"function"==typeof t?t(e):t}function Ae(e,t){for(var n in t)e[n]=t[n];return e}function Te(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ke(e,t){var n=t(),r=ce({t:{__:n,u:t}}),o=r[0].t,i=r[1];return pe(function(){o.__=n,o.u=t,Ie(o)&&i({t:o})},[e,n,t]),se(function(){return Ie(o)&&i({t:o}),e(function(){Ie(o)&&i({t:o})})},[e]),n}function Ie(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Re(e){e()}function Ce(e){return e}function De(){return[!1,Re]}var Me=pe;function Ne(e,t){this.props=e,this.context=t}(Ne.prototype=new w).isPureReactComponent=!0,Ne.prototype.shouldComponentUpdate=function(e,t){return Te(this.props,e)||Te(this.state,t)};var xe=o.__b;o.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var Le="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Be=function(e,t){return null==e?null:C(C(e).map(t))},He={map:Be,forEach:Be,count:function(e){return e?C(e).length:0},only:function(e){var t=C(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:C},Ue=o.__e;o.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ue(e,t,n,r)};var ze=o.unmount;function Fe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Ae({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Fe(e,t,n)})),e}function qe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return qe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function We(){this.__u=0,this.o=null,this.__b=null}function Ve(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ge(){this.i=null,this.l=null}o.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ze&&ze(e)},(We.prototype=new w).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Ve(r.__v),i=!1,u=function(){i||r.__z||(i=!0,n.__R=null,o?o(l):l())};n.__R=u;var a=n.__P;n.__P=null;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=qe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=a,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(u,u)},We.prototype.componentWillUnmount=function(){this.o=[]},We.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Fe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&O(P,null,e.fallback);return o&&(o.__u&=-33),[O(P,null,t.__a?null:e.children),o]};var Ze=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function $e(e){return this.getChildContext=function(){return e.context},e.children}function Ke(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){V(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}V(O($e,{context:t.context},e.__v),t.v)}function Ye(e,t){var n=O(Ke,{__v:e,h:t});return n.containerInfo=t,n}(Ge.prototype=new w).__a=function(e){var t=this,n=Ve(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ze(t,e,r)):o()};n?n(i):i()}},Ge.prototype.render=function(e){this.i=null,this.l=new Map;var t=C(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ge.prototype.componentDidUpdate=Ge.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ze(e,n,t)})};var Xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Je=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Qe=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,et=/[A-Z0-9]/g,tt="undefined"!=typeof document,nt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function rt(e,t,n){return null==t.__k&&(t.textContent=""),V(e,t),"function"==typeof n&&n(),e?e.__c:null}w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ot=o.event;function it(){}function ut(){return this.cancelBubble}function at(){return this.defaultPrevented}o.event=function(e){return ot&&(e=ot(e)),e.persist=it,e.isPropagationStopped=ut,e.isDefaultPrevented=at,e.nativeEvent=e};var lt,ct={enumerable:!1,configurable:!0,get:function(){return this.class}},ft=o.vnode;o.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var u=t[i];if(!("value"===i&&"defaultValue"in t&&null==u||tt&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":"translate"===a&&"no"===u?u=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||nt(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Qe.test(i)&&(i=a):a=i="oninput":o&&Je.test(i)?i=i.replace(et,"-$&").toLowerCase():null===u&&(u=void 0),"oninput"===a&&r[i=a]&&(i="oninputCapture"),r[i]=u}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=C(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=C(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ct)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Xe,ft&&ft(e)};var st=o.__r;o.__r=function(e){st&&st(e),lt=e.__c};var pt=o.diffed;o.diffed=function(e){pt&&pt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),lt=null};var dt={ReactCurrentDispatcher:{current:{readContext:function(e){return lt.__n[e.__c].props.value},useCallback:ve,useContext:be,useDebugValue:_e,useDeferredValue:Ce,useEffect:se,useId:he,useImperativeHandle:ye,useInsertionEffect:Me,useLayoutEffect:pe,useMemo:me,useReducer:fe,useRef:de,useState:ce,useSyncExternalStore:ke,useTransition:De}}};function yt(e){return!!e&&e.$$typeof===Xe}function mt(e){return yt(e)?Z.apply(null,arguments):e}function vt(e){return!!e.__k&&(V(null,e),!0)}var bt={useState:ce,useId:he,useReducer:fe,useEffect:se,useLayoutEffect:pe,useInsertionEffect:Me,useTransition:De,useDeferredValue:Ce,useSyncExternalStore:ke,startTransition:Re,useRef:de,useImperativeHandle:ye,useMemo:me,useCallback:ve,useContext:be,useDebugValue:_e,version:"18.3.1",Children:He,render:rt,hydrate:function(e,t,n){return G(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:vt,createPortal:Ye,createElement:O,createContext:$,createFactory:function(e){return O.bind(null,e)},cloneElement:mt,createRef:function(){return{current:null}},Fragment:P,isValidElement:yt,isElement:yt,isFragment:function(e){return yt(e)&&e.type===P},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:w,PureComponent:Ne,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Te(this.props,e)}function r(t){return this.shouldComponentUpdate=n,O(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r},forwardRef:function(e){function t(t){var n=Ae({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Le,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:P,Suspense:We,SuspenseList:Ge,lazy:function(e){var t,n,r,o=null;function i(i){if(t||(t=e()).then(function(e){e&&(o=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return o?O(o,i):null}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:dt};function _t(e){return{render:function(t){rt(t,e)},unmount:function(){vt(e)}}}var ht=n("./src/config/events.js"),gt=$(null);function Ot(){return be(gt)}var St=[{id:"showKeyboardHelp",group:"General",title:"Show keyboard help",command:"<kbd>Alt</kbd> + <kbd>K</kbd>",enabled:!0},{id:"selectControl",group:"General",title:"Select a map control",command:"<kbd>Tab</kbd> or <kbd>Shift</kbd> + <kbd>Tab</kbd>",enabled:!0},{id:"moveLarge",group:"Navigation",title:"Move in large steps",command:"<kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!0},{id:"nudgeMap",group:"Navigation",title:"Nudge map",command:"<kbd>Shift</kbd> + <kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!1},{id:"zoomLarge",group:"Navigation",title:"Zoom in large steps",command:"<kbd>+</kbd> or <kbd>-</kbd>",enabled:!0},{id:"nudgeZoom",group:"Navigation",title:"Nudge zoom",command:"<kbd>Shift</kbd> + <kbd>+</kbd> or <kbd>-</kbd>",enabled:!1},{id:"highlightLabelAtCenter",group:"Labels",title:"Highlight label at centre",command:"<kbd>Alt</kbd> + <kbd>Enter</kbd>",enabled:!1,requiredConfig:["readMapText"]},{id:"highlightNextLabel",group:"Labels",title:"Highlight nearby label",command:"<kbd>Alt</kbd> + <kbd>→</kbd>, <kbd>←</kbd>, <kbd>↑</kbd> or <kbd>↓</kbd>",enabled:!1,requiredConfig:["readMapText"]}];function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wt=[],Et=new Set,jt=new Set,At=function(){jt=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])},Tt=0;function kt(e,t,n,r,i,u){t||(t={});var a,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?a=t[l]:c[l]=t[l];var f={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Tt,__i:-1,__u:0,__source:i,__self:u};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return o.vnode&&o.vnode(f),f}function It(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Array.isArray;var Rt=function(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=St.filter(function(t){return!!jt.has(t.id)&&(!t.requiredConfig||t.requiredConfig.every(function(t){return e[t]}))});return[].concat(function(e){return function(e){if(Array.isArray(e))return Pt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(e,t):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.")}()}(t),wt)}(Ot()).reduce(function(e,t){return e[t.group]=e[t.group]||[],e[t.group].push(t),e},{});return kt("div",{className:"im-c-keyboard-help",children:Object.entries(e).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return It(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?It(e,t):void 0}}(e,t)||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,2),n=t[0];return kt("div",{className:"im-c-keyboard-help__group",children:kt("dl",{className:"im-c-keyboard-help__list",children:t[1].map(function(e){return kt("div",{className:"im-c-keyboard-help__item",children:[kt("dt",{className:"im-c-keyboard-help__title",children:e.title}),kt("dd",{className:"im-c-keyboard-help__description",dangerouslySetInnerHTML:{__html:e.command}})]},e.id)})})},n)})})};function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach(function(t){Nt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nt(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt={slot:"middle",initiallyOpen:!1,dismissable:!0,modal:!0},Lt={slot:"right-top",showLabel:!1},Bt={slot:"top-left",showLabel:!1},Ht={buttons:[{id:"exit",label:"Exit",iconId:"close",onClick:function(e,t){return t.services.closeApp()},excludeWhen:function(e){var t=e.appConfig,n=e.appState;return!t.hasExitButton||!(n.isFullscreen&&new URL(window.location.href).searchParams.has(t.mapViewParamKey))},mobile:Bt,tablet:Bt,desktop:Bt},{id:"fullscreen",label:function(){return"".concat(document.fullscreenElement?"Exit":"Enter"," fullscreen")},iconId:function(){return document.fullscreenElement?"minimise":"maximise"},onClick:function(e,t){var n=t.appState.layoutRefs.appContainerRef.current;document.fullscreenElement?document.exitFullscreen():n.requestFullscreen()},excludeWhen:function(e){var t=e.appState;return!e.appConfig.enableFullscreen||t.isFullscreen},mobile:Lt,tablet:Lt,desktop:Lt},{id:"zoomIn",group:"zoom",label:"Zoom in",iconId:"plus",onClick:function(e,t){var n=t.mapProvider,r=t.appConfig;return n.zoomIn(r.zoomDelta)},excludeWhen:function(e){var t=e.appState;return!e.appConfig.enableZoomControls||"touch"===t.interfaceType},enableWhen:function(e){return!e.mapState.isAtMaxZoom},mobile:Lt,tablet:Lt,desktop:Lt},{id:"zoomOut",group:"zoom",label:"Zoom out",iconId:"minus",onClick:function(e,t){var n=t.mapProvider,r=t.appConfig;return n.zoomOut(r.zoomDelta)},excludeWhen:function(e){var t=e.appState;return!e.appConfig.enableZoomControls||"touch"===t.interfaceType},enableWhen:function(e){return!e.mapState.isAtMinZoom},mobile:Lt,tablet:Lt,desktop:Lt}],panels:[{id:"keyboardHelp",label:"Keyboard shortcuts",mobile:Mt({},xt),tablet:Mt(Mt({},xt),{},{width:"500px"}),desktop:Mt(Mt({},xt),{},{width:"500px"}),render:function(){return kt(Rt,{})}}],icons:[{id:"maximise",svgContent:'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>'},{id:"minimise",svgContent:'<path d="m14 10 7-7"/><path d="M20 10h-6V4"/><path d="m3 21 7-7"/><path d="M4 14h6v6"/>'},{id:"plus",svgContent:'<path d="M5 12h14"/><path d="M12 5v14"/>'},{id:"minus",svgContent:'<path d="M5 12h14"/>'}]},Ut={slot:"right-top",showLabel:!1},zt={label:"Button",mobile:Ut,tablet:Ut,desktop:Ut},Ft={showLabel:!0,label:"Panel",mobile:{slot:"bottom",initiallyOpen:!0,dismissable:!0,modal:!1},tablet:{slot:"inset",initiallyOpen:!0,dismissable:!0,modal:!1},desktop:{slot:"inset",initiallyOpen:!0,dismissable:!0,modal:!1},render:null,html:null},qt={label:"Control",mobile:{slot:"bottom"},tablet:{slot:"inset"},desktop:{slot:"inset"}},Wt={small:1,medium:1.5,large:2},Vt=[{shape:"pin",backgroundPath:"M31 16.001c0 7.489-8.308 15.289-11.098 17.698-.533.4-1.271.4-1.803 0C15.309 31.29 7 23.49 7 16.001c0-6.583 5.417-12 12-12s12 5.417 12 12z",graphicPath:"M19 11.001c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.241 5-5-2.24-5-5-5z"}];function Gt(e){return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gt(e)}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $t(e,t,n){return(t=function(e){var t=function(e){if("object"!=Gt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kt=function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach(function(t){$t(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);for(var r in t)"object"!==Gt(t[r])||Array.isArray(t[r])||null===t[r]?n[r]=t[r]:n[r]=Kt(e[r]||{},t[r]);return n};function Yt(e){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(e)}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach(function(t){en(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function en(e,t,n){return(t=function(e){var t=function(e){if("object"!=Yt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tn=function(e,t){return Qt(Qt({},e),t)},nn=function(e,t,n){var r=Kt(zt,n);return Qt(Qt({},e),{},en({},t,r))};function rn(){var e={};return{registerButton:function(t){e=tn(e,t)},addButton:function(t,n){return e=nn(e,t,n),t},getButtonConfig:function(t){return function(e,t){return t?Object.fromEntries(Object.entries(e).filter(function(e){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xt(e,t):void 0}}(e,t)||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,2);return n[0],n[1].pluginId===t})):e}(e,t)},clear:function(){e={}}}}function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach(function(t){ln(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ln(e,t,n){return(t=cn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e){var t=function(e){if("object"!=on(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==on(t)?t:t+""}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sn=function(e,t){var n=Object.fromEntries(Object.entries(t).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(e,t):void 0}}(e,t)||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,2);return[t[0],an({showLabel:!0},t[1])]}));return an(an({},e),n)},pn=function(e,t,n){var r=Kt(Ft,n);return an(an({},e),{},ln({},t,an(an({},r),{},{html:r.html,render:r.render})))},dn=function(e,t){e[t];var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,[t].map(cn));return n};function yn(e){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yn(e)}function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach(function(t){bn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bn(e,t,n){return(t=function(e){var t=function(e){if("object"!=yn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _n=function(e,t){return vn(vn({},e),t)},hn=function(e,t,n){var r=Kt(qt,n);return vn(vn({},e),{},bn({},t,vn({id:t},r)))};function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach(function(t){Pn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pn(e,t,n){return(t=function(e){var t=function(e){if("object"!=gn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wn={close:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'},En=function(){return wn};function jn(e){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jn(e)}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach(function(t){kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kn(e,t,n){return(t=function(e){var t=function(e){if("object"!=jn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In=function(e){return Array.isArray(e)?e:[e]};function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach(function(t){Mn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mn(e,t,n){return(t=function(e){var t=function(e){if("object"!=Rn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]);var n=new Map(e.map(function(e){return[e.id,e]}));return t.forEach(function(e){null!=e&&e.id&&(n.has(e.id)?n.set(e.id,Dn(Dn({},n.get(e.id)),e)):n.set(e.id,e))}),Array.from(n.values())},r=Dn(Dn({},e),t);return(e.buttons||t.buttons)&&(r.buttons=n(e.buttons,t.buttons)),(e.panels||t.panels)&&(r.panels=n(e.panels,t.panels)),(e.controls||t.controls)&&(r.controls=n(e.controls,t.controls)),(e.icons||t.icons)&&(r.icons=n(e.icons,t.icons)),r}function xn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return Object.keys(e).forEach(function(o){var i,u=e[o][t];null!==(i=null==u?void 0:u.initiallyOpen)&&void 0!==i&&i&&(r[o]=n[o]||{props:{}})}),r}var Ln=n("./src/utils/getIsFullscreen.js");function Bn(e){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bn(e)}function Hn(e){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(e)}function Un(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach(function(t){qn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qn(e,t,n){return(t=Wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(e){var t=function(e){if("object"!=Hn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hn(t)?t:t+""}function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gn(e,t,n,r){var o,i=e.panelConfig||e.panelRegistry.getPanelConfig(),u=null===(o=i[t])||void 0===o?void 0:o[n],a=!!u.exclusive&&!u.modal,l=!!u.modal,c=Object.fromEntries(Object.entries(e.openPanels).filter(function(e){var t,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vn(e,t):void 0}}(e,t)||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,1)[0];return!(null!==(t=i[r])&&void 0!==t&&null!==(t=t[n])&&void 0!==t&&t.exclusive)}));return Fn(Fn(Fn({},a?{}:c),l?e.openPanels:{}),{},qn({},t,{props:r}))}var Zn={SET_BREAKPOINT:function(e,t){var n,r=t.behaviour,o=t.hybridWidth,i=t.maxMobileWidth,u=Object.keys(e.openPanels).at(-1),a="hybrid"===r?e.isFullscreen:(0,Ln.g)({behaviour:r,hybridWidth:o,maxMobileWidth:i});return Fn(Fn({},e),{},{breakpoint:t.breakpoint,isFullscreen:a,previousOpenPanels:e.openPanels,openPanels:u?Gn(e,u,t.breakpoint,(null===(n=e.openPanels[u])||void 0===n?void 0:n.props)||{}):{}})},SET_MEDIA:function(e,t){return Fn(Fn({},e),t)},SET_HYBRID_FULLSCREEN:function(e,t){return Fn(Fn({},e),{},{isFullscreen:t})},SET_INTERFACE_TYPE:function(e,t){return e.interfaceType===t?e:Fn(Fn({},e),{},{interfaceType:t})},SET_MODE:function(e,t){var n=e.panelConfig||e.panelRegistry.getPanelConfig();return Fn(Fn({},e),{},{mode:t,previousMode:e.mode,openPanels:xn(n,e.breakpoint,e.openPanels)})},SET_SAFE_ZONE_INSET:function(e,t){var n=t.safeZoneInset,r=t.syncMapPadding,o=void 0===r||r;return function(e,t){if(e===t)return!0;if(!e||!t||"object"!==Bn(e)||"object"!==Bn(t))return!1;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(n){return Object.is(e[n],t[n])})}(e.safeZoneInset,n)?e:Fn(Fn({},e),{},{safeZoneInset:n,syncMapPadding:o,isLayoutReady:!0})},REVERT_MODE:function(e){var t=e.panelConfig||e.panelRegistry.getPanelConfig();return Fn(Fn({},e),{},{mode:e.previousMode,previousMode:e.mode,openPanels:xn(t,e.breakpoint,e.openPanels)})},OPEN_PANEL:function(e,t){var n=t.panelId,r=t.props,o=void 0===r?{}:r;return Fn(Fn({},e),{},{previousOpenPanels:e.openPanels,openPanels:Gn(e,n,e.breakpoint,o)})},CLOSE_PANEL:function(e,t){var n=e.openPanels,r=(n[t],Un(n,[t].map(Wn)));return Fn(Fn({},e),{},{previousOpenPanels:e.openPanels,openPanels:r})},CLOSE_ALL_PANELS:function(e){return Fn(Fn({},e),{},{previousOpenPanels:e.openPanels,openPanels:{}})},RESTORE_PREVIOUS_PANELS:function(e){return Fn(Fn({},e),{},{openPanels:e.previousOpenPanels||{},previousOpenPanels:e.openPanels})},TOGGLE_HAS_EXCLUSIVE_CONTROL:function(e,t){return Fn(Fn({},e),{},{hasExclusiveControl:t})},TOGGLE_BUTTON_DISABLED:function(e,t){var n=t.id,r=t.isDisabled,o=new Set(e.disabledButtons);return r?o.add(n):o.delete(n),Fn(Fn({},e),{},{disabledButtons:o})},TOGGLE_BUTTON_HIDDEN:function(e,t){var n=t.id,r=t.isHidden,o=new Set(e.hiddenButtons);return r?o.add(n):o.delete(n),Fn(Fn({},e),{},{hiddenButtons:o})},TOGGLE_BUTTON_PRESSED:function(e,t){var n=t.id,r=t.isPressed,o=new Set(e.pressedButtons);return r?o.add(n):o.delete(n),Fn(Fn({},e),{},{pressedButtons:o})},TOGGLE_BUTTON_EXPANDED:function(e,t){var n=t.id,r=t.isExpanded,o=new Set(e.expandedButtons);return r?o.add(n):o.delete(n),Fn(Fn({},e),{},{expandedButtons:o})},REGISTER_BUTTON:function(e,t){return Fn(Fn({},e),{},{buttonConfig:tn(e.buttonConfig,t)})},ADD_BUTTON:function(e,t){var n,r=t.id,o=t.config,i=nn(e.buttonConfig,r,o),u=new Set(e.hiddenButtons);o.isHidden&&u.add(r);var a=new Set(e.disabledButtons);o.isDisabled&&a.add(r);var l=new Set(e.pressedButtons);o.isPressed&&l.add(r);var c=new Set(e.expandedButtons);return o.isExpanded&&c.add(r),null!==(n=e.buttonRegistry)&&void 0!==n&&n.addButton&&e.buttonRegistry.addButton(r,o),Fn(Fn({},e),{},{buttonConfig:i,hiddenButtons:u,disabledButtons:a,pressedButtons:l,expandedButtons:c})},REGISTER_PANEL:function(e,t){return Fn(Fn({},e),{},{panelConfig:sn(e.panelConfig,t)})},ADD_PANEL:function(e,t){var n,r=t.id,o=t.config,i=pn(e.panelConfig,r,o),u=i[r];null!==(n=e.panelRegistry)&&void 0!==n&&n.addPanel&&e.panelRegistry.addPanel(r,o);var a=null==u?void 0:u[e.breakpoint],l=null==a?void 0:a.initiallyOpen;return Fn(Fn({},e),{},{panelConfig:i,openPanels:l?Gn(Fn(Fn({},e),{},{panelConfig:i}),r,e.breakpoint,{}):e.openPanels})},REMOVE_PANEL:function(e,t){var n,r=t,o=e.openPanels,i=(o[r],Un(o,[r].map(Wn)));return null!==(n=e.panelRegistry)&&void 0!==n&&n.removePanel&&e.panelRegistry.removePanel(r),Fn(Fn({},e),{},{panelConfig:dn(e.panelConfig,r),openPanels:i})},REGISTER_CONTROL:function(e,t){return Fn(Fn({},e),{},{controlConfig:_n(e.controlConfig,t)})},ADD_CONTROL:function(e,t){var n,r=t.id,o=t.config,i=hn(e.controlConfig,r,o);return null!==(n=e.controlRegistry)&&void 0!==n&&n.addControl&&e.controlRegistry.addControl(r,o),Fn(Fn({},e),{},{controlConfig:i})}};function $n(){return{preferredColorScheme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches}}var Kn=function(e,t){var n=t.type,r=t.payload,o=Zn[n];return o?o(e,r):e};var Yn=n("./src/utils/detectInterfaceType.js");function Xn(e){return Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xn(e)}function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach(function(t){er(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function er(e,t,n){return(t=function(e){var t=function(e){if("object"!=Xn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nr=$(null),rr=function(e){var t=e.options,n=e.children,r=t.pluginRegistry,o=t.buttonRegistry,i=t.panelRegistry,u=t.controlRegistry,a=t.eventBus,l=t.breakpointDetector,c={appContainerRef:de(null),sideRef:de(null),mainRef:de(null),topRef:de(null),topLeftColRef:de(null),topRightColRef:de(null),insetRef:de(null),rightRef:de(null),middleRef:de(null),bottomRef:de(null),footerRef:de(null),actionsRef:de(null),bannerRef:de(null),modalRef:de(null),viewportRef:de(null)},f=de({}),s=fe(Kn,function(e){var t=e.initialBreakpoint,n=e.initialInterfaceType,r=e.appColorScheme,o=e.autoColorScheme,i=e.pluginRegistry,u=e.buttonRegistry,a=e.panelRegistry,l=e.controlRegistry,c=e.mode,f=$n(),s=f.preferredColorScheme,p=f.prefersReducedMotion,d=(0,Ln.g)(e),y=xn(a.getPanelConfig(),t);return{isLayoutReady:!1,breakpoint:t,interfaceType:n,preferredColorScheme:o?s:r,prefersReducedMotion:p,isFullscreen:d,mode:c||null,previousMode:null,safeZoneInset:null,disabledButtons:new Set,hiddenButtons:new Set,pressedButtons:new Set,expandedButtons:new Set,hasExclusiveControl:!1,openPanels:y,previousOpenPanels:{},syncMapPadding:!0,pluginRegistry:i,buttonRegistry:u,panelRegistry:a,controlRegistry:l,buttonConfig:u.getButtonConfig(),panelConfig:a.getPanelConfig(),controlConfig:l.getControlConfig()}}(t)),p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(e,t):void 0}}(e,t)||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.")}()}(s,2),d=p[0],y=p[1],m=ve(function(e){var n=d.panelConfig||t.panelRegistry.getPanelConfig(),r=d;y(e),function(e,t,n,r){var o=e.type,i=e.payload;if("CLOSE_PANEL"===o&&queueMicrotask(function(){r.emit(ht.q.APP_PANEL_CLOSED,{panelId:i})}),"CLOSE_ALL_PANELS"===o&&queueMicrotask(function(){Object.keys(t.openPanels).forEach(function(e){r.emit(ht.q.APP_PANEL_CLOSED,{panelId:e})})}),"OPEN_PANEL"===o){var u=i.panelId,a=i.props,l=function(e,t,n,r){var o,i=null===(o=r[e])||void 0===o?void 0:o[n],u=!(null==i||!i.exclusive||null!=i&&i.modal),a=!(null==i||!i.modal),l=[];if(a)return l;var c=Object.keys(t);return u?c.forEach(function(e){var t,o=null===(t=r[e])||void 0===t?void 0:t[n];null!=o&&o.exclusive||l.push(e)}):c.forEach(function(e){var t,o=null===(t=r[e])||void 0===t?void 0:t[n];null==o||!o.exclusive||null!=o&&o.modal||l.push(e)}),l}(u,t.openPanels,t.breakpoint,n);queueMicrotask(function(){l.forEach(function(e){r.emit(ht.q.APP_PANEL_CLOSED,{panelId:e})}),r.emit(ht.q.APP_PANEL_OPENED,{panelId:u,props:a})})}}(e,r,n,a)},[d,t,a]);!function(e,t){var n=t.appColorScheme,r=t.autoColorScheme,o=t.behaviour,i=t.hybridWidth,u=t.maxMobileWidth;se(function(){var t=[window.matchMedia("(prefers-color-scheme: dark)"),window.matchMedia("(prefers-reduced-motion: reduce)")];function a(){var t=$n(),o=t.preferredColorScheme,i=t.prefersReducedMotion;e({type:"SET_MEDIA",payload:{preferredColorScheme:r?o:n,prefersReducedMotion:i}})}t.forEach(function(e){return e.addEventListener("change",a)});var l=null,c=null;if("hybrid"===o){var f=null!=i?i:u;l=window.matchMedia("(max-width: ".concat(f,"px)")),c=function(t){e({type:"SET_HYBRID_FULLSCREEN",payload:t.matches})},l.addEventListener("change",c)}return function(){t.forEach(function(e){return e.removeEventListener("change",a)}),l&&c&&l.removeEventListener("change",c)}},[e,o,i,u])}(y,t);var v=function(e){m({type:"SET_MODE",payload:e})},b=function(){m({type:"REVERT_MODE"})};se(function(){a.on(ht.q.APP_SET_MODE,v),a.on(ht.q.APP_REVERT_MODE,b);var e=l.subscribe(function(e){m({type:"SET_BREAKPOINT",payload:{behaviour:t.behaviour,breakpoint:e,hybridWidth:t.hybridWidth,maxMobileWidth:t.maxMobileWidth}})}),n=(0,Yn.Ey)(function(e){m({type:"SET_INTERFACE_TYPE",payload:e})});return function(){a.off(ht.q.APP_SET_MODE,v),a.off(ht.q.APP_REVERT_MODE,b),e(),n()}},[]);var _=me(function(){return Qn(Qn({},d),{},{dispatch:m,layoutRefs:c,buttonRefs:f,pluginRegistry:r,buttonRegistry:o,panelRegistry:i,controlRegistry:u})},[d,m]);return kt(gt.Provider,{value:t,children:kt(nr.Provider,{value:_,children:n})})};function or(e){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(e)}function ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(n),!0).forEach(function(t){ar(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ar(e,t,n){return(t=function(e){var t=function(e){if("object"!=or(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==or(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lr=function(e,t){return ur(ur({},e),t)},cr={SET_MAP_READY:function(e,t){return ur(ur({},e),{},{isMapReady:!0,mapProvider:t})},MAP_MOVE:lr,MAP_MOVE_END:lr,MAP_FIRST_IDLE:lr,SET_MAP_STYLE:function(e,t){return ur(ur({},e),{},{mapStyle:t})},SET_MAP_SIZE:function(e,t){return ur(ur({},e),{},{mapSize:t})},UPDATE_CROSS_HAIR:function(e,t){return ur(ur({},e),{},{crossHair:ur(ur({},e.crossHair),t)})},UPSERT_LOCATION_MARKER:function(e,t){var n=new Map(e.markers.items.map(function(e){return[e.id,e]}));n.set(t.id,t);var r=Array.from(n.values());return ur(ur({},e),{},{markers:ur(ur({},e.markers),{},{items:r})})},REMOVE_LOCATION_MARKER:function(e,t){var n=e.markers.items.filter(function(e){return e.id!==t});return ur(ur({},e),{},{markers:ur(ur({},e.markers),{},{items:n})})}},fr=function(e,t){var n=t.type,r=t.payload,o=cr[n];return o?o(e,r):e};function sr(e){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(e)}function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach(function(t){yr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yr(e,t,n){return(t=function(e){var t=function(e){if("object"!=sr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var vr=$(null),br=function(e){var t,n,r,o,i,u,a,l,c,f=e.options,s=e.children,p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mr(e,t):void 0}}(e,t)||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.")}()}(fe(fr,(n=(t=f).center,r=t.zoom,o=t.bounds,i=t.extent,u=t.mapStyle,a=t.mapSize,l=t.markers,{isMapReady:!1,mapProvider:null,mapStyle:null!=(c=t.pluginRegistry.registeredPlugins)&&c.find(function(e){var t;return null===(t=e.config)||void 0===t?void 0:t.handlesMapStyle})?null:u,mapSize:a,center:n,zoom:r,bounds:o||i,resolution:null,isAtMaxZoom:null,isAtMinZoom:null,crossHair:{isVisible:!1,isPinnedToMap:!1,state:"active"},markers:{items:l||[]}})),2),d=p[0],y=p[1],m=function(e){y({type:"SET_MAP_READY",payload:e})},v=function(e){var t=localStorage.getItem("".concat(f.id,":mapStyleId")),n=e.find(function(e){return e.id===t})||e[0],r=localStorage.getItem("".concat(f.id,":mapSize"))||f.mapSize;y({type:"SET_MAP_STYLE",payload:n}),y({type:"SET_MAP_SIZE",payload:r})},b=function(e){y({type:"SET_MAP_STYLE",payload:e})},_=function(e){y({type:"SET_MAP_SIZE",payload:e})},h=f.eventBus;se(function(){return h.on(ht.q.MAP_READY,m),h.on(ht.q.MAP_INIT_MAP_STYLES,v),h.on(ht.q.MAP_SET_STYLE,b),h.on(ht.q.MAP_SET_SIZE,_),function(){h.off(ht.q.MAP_READY,m),h.off(ht.q.MAP_INIT_MAP_STYLES,v),h.off(ht.q.MAP_SET_STYLE,b),h.off(ht.q.MAP_SET_SIZE,_)}},[]),se(function(){d.mapStyle&&d.mapSize&&(localStorage.setItem("".concat(f.id,":mapStyleId"),d.mapStyle.id),localStorage.setItem("".concat(f.id,":mapSize"),d.mapSize))},[d.mapStyle,d.mapSize]);var g=me(function(){return dr(dr({},d),{},{dispatch:y})},[d]);return kt(vr.Provider,{value:g,children:s})};var _r=n("./src/services/reverseGeocode.js"),hr=$(null),gr=function(e){var t=e.eventBus,n=e.children,r=Ot(),o=r.id,i=r.handleExitClick,u=de(null),a=me(function(){return function(e){var t=!1,n=function(t){null!=e&&e.current&&t&&(e.current.textContent="",setTimeout(function(){e.current&&(e.current.textContent=t)},100))},r=function(e){var t=null,n=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];clearTimeout(t),t=setTimeout(function(){e.apply(void 0,r)},500)};return n.cancel=function(){t&&(clearTimeout(t),t=null)},n}(n);return function(e){if(e)return"plugin"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core")?(t=!0,void n(e)):void(t?t=!1:r(e))}}(u)},[]),l=me(function(){return{announce:a,reverseGeocode:function(e,t){return(0,_r.R)(e,t)},events:ht.q,eventBus:t,mapStatusRef:u,closeApp:function(){return function(e,t,n){var r;n.emit(ht.q.MAP_EXIT,{mapId:e}),null!==(r=history.state)&&void 0!==r&&r.isBack?history.back():t()}(o,i,t)}}},[a]);return kt(hr.Provider,{value:l,children:n})},Or=n("./src/InteractiveMap/domStateManager.js");function Sr(e){return Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sr(e)}function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(n),!0).forEach(function(t){jr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Sr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ar=$(null),Tr=function(e){var t=e.children,n=Ot().pluginRegistry,r={},o={},i=de({});n.registeredPlugins.forEach(function(e){var t=e.reducer;if(t){var n=t.initialState,u=t.actions;r[e.id]=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=null==e?void 0:e[null==n?void 0:n.type];return r?r(t,n.payload):t}}(u),o[e.id]=n}i.current[e.id]||(i.current[e.id]={})});var u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}(e,t)||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.")}()}(fe(function(e,t){var n=t.pluginId;return n&&r[n]?Er(Er({},e),{},jr({},n,r[n](e[n],t))):e},o),2),a=u[0],l=u[1],c=function(e,t){return i.current[e]||(i.current[e]={}),i.current[e][t]||(i.current[e][t]=bt.createRef()),i.current[e][t]},f=me(function(){return{state:a,dispatch:l,refs:i,getPluginRef:c}},[a,l]);return kt(Ar.Provider,{value:f,children:t})},kr=function(e){var t=be(Ar);if(!t)throw new Error("usePlugin must be used within PluginProvider");var n=t.state,r=t.dispatch,o=t.refs,i=t.getPluginRef;return o.current[e]||(o.current[e]={}),Er(Er({},n[e]),{},{dispatch:function(t){return r(Er(Er({},t),{},{pluginId:e}))},refs:o.current[e],useRef:function(t){return i(e,t)}})};function Ir(){return be(nr)}function Rr(){return be(vr)}function Cr(){return be(hr)}function Dr(e){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dr(e)}function Mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(n),!0).forEach(function(t){xr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Dr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Br=new Map;function Hr(e,t){var n=t.pluginId,r=t.pluginConfig,o=e;return Br.has(o)||Br.set(o,function(t){var o=Ot(),i=Ir(),u=Rr(),a=Cr(),l=kr(n);return kt(e,Nr(Nr({},t),{},{pluginConfig:r,pluginState:l,appConfig:o,appState:i,mapState:u,services:a,mapProvider:o.mapProvider,iconRegistry:En(),buttonConfig:Object.fromEntries(Object.entries(i.buttonConfig).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lr(e,t):void 0}}(e,t)||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,2);return t[0],t[1].pluginId===n}))}))}),Br.get(o)}function Ur(e){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(e)}function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach(function(t){qr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ur(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ur(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wr(e){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wr(e)}function Vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(n),!0).forEach(function(t){Zr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Wr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(e)}function Kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kr(Object(n),!0).forEach(function(t){Xr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xr(e,t,n){return(t=function(e){var t=function(e){if("object"!=$r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(){var e=Ot(),t=Ir(),n=Rr(),r=Cr(),o=be(Ar),i={appConfig:e,appState:t,mapState:n,services:r,mapProvider:null==e?void 0:e.mapProvider,iconRegistry:En()};function u(t,n){var r,u;if(n){var a,l,c=e.pluginRegistry.registeredPlugins.find(function(e){return e.id===n});r=c?Yr({pluginId:c.id},c.config):{},u=Yr(Yr({},null!==(a=null==o||null===(l=o.state)||void 0===l?void 0:l[n])&&void 0!==a?a:{}),{},{dispatch:null==o?void 0:o.dispatch})}var f=Yr(Yr({},i),{},{pluginConfig:r,pluginState:u});return"function"==typeof t?t(f):t}return u.ctx=i,u}function Qr(e){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qr(e)}function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function to(e,t,n){return(t=function(e){var t=function(e){if("object"!=Qr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e){var t=Ir(),n=Ot().pluginRegistry,r=be(Ar);pe(function(){if(null!=t&&t.dispatch&&r){var o=t.dispatch;n.registeredPlugins.forEach(function(n){var r,i,u=(null!==(r=null==n||null===(i=n.manifest)||void 0===i?void 0:i.buttons)&&void 0!==r?r:[]).flatMap(function(e){var t;return[e].concat(function(e){return function(e){if(Array.isArray(e))return eo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eo(e,t):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.")}()}(null!==(t=e.menuItems)&&void 0!==t?t:[]))});u.forEach(function(r){return function(e){var t=e.btn,n=e.pluginId,r=e.appState,o=e.dispatch,i=e.evaluateProp;[{prop:"enableWhen",state:r.disabledButtons,action:"TOGGLE_BUTTON_DISABLED",invert:!0,key:"isDisabled"},{prop:"hiddenWhen",state:r.hiddenButtons,action:"TOGGLE_BUTTON_HIDDEN",key:"isHidden"},{prop:"pressedWhen",state:r.pressedButtons,action:"TOGGLE_BUTTON_PRESSED",key:"isPressed"},{prop:"expandedWhen",state:r.expandedButtons,action:"TOGGLE_BUTTON_EXPANDED",key:"isExpanded"}].forEach(function(e){var r=e.prop,u=e.state,a=e.action,l=e.key,c=e.invert;if("function"==typeof t[r])try{var f=i(t[r],n),s=c?!f:f;u.has(t.id)!==s&&o({type:a,payload:to({id:t.id},l,s)})}catch(e){console.warn("".concat(r," error for button ").concat(t.id,":"),e)}})}({btn:r,pluginId:n.id,appState:t,dispatch:o,evaluateProp:e})})})}},[t,r,e])}var ro=["api"];function oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var io=function(e){var t,n,r=e.plugin,o=e.mode,i=function(e){var t=de(null),n=Ot(),r=Ir(),o=Rr(),i=Cr(),u=kr(e);return se(function(){t.current={appConfig:n,appState:r,mapState:o,services:i,mapProvider:n.mapProvider,pluginState:u}}),t}(r.id);se(function(){r.api&&r._originalPlugin&&Object.entries(r.api).forEach(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oo(e,t):void 0}}(e,t)||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,2),n=t[0],o=t[1];r._originalPlugin[n]=function(e,t){var n=t.pluginId,r=t.pluginConfig,o=t.stateRef;return function(){var t=o.current;if(!t)throw new Error('Plugin API "'.concat(n,'" called before state is initialized'));for(var i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];return e.apply(void 0,[Fr(Fr({},t),{},{pluginConfig:r,pluginId:n})].concat(u))}}(o,{pluginId:r.id,pluginConfig:(null==r?void 0:r.config)||{},stateRef:i})})},[r,i]);var u=r.InitComponent,a=(null==r?void 0:r.config)||{},l=(a.api,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(a,ro)),c=r.config||{},f=c.includeModes,s=c.excludeModes,p=null===(t=null==f?void 0:f.includes(o))||void 0===t||t,d=null!==(n=null==s?void 0:s.includes(o))&&void 0!==n&&n;return p&&!d&&u?kt(Hr(u,{pluginId:r.id,pluginConfig:l}),{}):null},uo=function(){var e,t,n,r,o,i,u,a,l,c=Ir().mode,f=Ot().pluginRegistry;e=Ir(),t=e.dispatch,n=e.hiddenButtons,r=e.disabledButtons,o=e.pressedButtons,i=e.expandedButtons,u=Cr().eventBus,a=de(t),l=de({hiddenButtons:n,disabledButtons:r,pressedButtons:o,expandedButtons:i}),a.current=t,l.current={hiddenButtons:n,disabledButtons:r,pressedButtons:o,expandedButtons:i},se(function(){var e=function(e){var t=e.id,n=e.config;a.current({type:"ADD_BUTTON",payload:{id:t,config:n}}),Array.isArray(n.menuItems)&&n.menuItems.forEach(function(e){a.current({type:"ADD_BUTTON",payload:{id:e.id,config:Gr(Gr({},e),{},{isMenuItem:!0})}})})},t=function(e){var t=e.id,n=e.prop,r=e.value,o=l.current,i=o.hiddenButtons,u=o.disabledButtons,c=o.pressedButtons,f=o.expandedButtons;switch(n){case"hidden":var s="boolean"==typeof r?r:!i.has(t);a.current({type:"TOGGLE_BUTTON_HIDDEN",payload:{id:t,isHidden:s}});break;case"disabled":var p="boolean"==typeof r?r:!u.has(t);a.current({type:"TOGGLE_BUTTON_DISABLED",payload:{id:t,isDisabled:p}});break;case"pressed":var d="boolean"==typeof r?r:!c.has(t);a.current({type:"TOGGLE_BUTTON_PRESSED",payload:{id:t,isPressed:d}});break;case"expanded":var y="boolean"==typeof r?r:!f.has(t);a.current({type:"TOGGLE_BUTTON_EXPANDED",payload:{id:t,isExpanded:y}})}},n=function(e){var t=e.id,n=e.config;return a.current({type:"ADD_PANEL",payload:{id:t,config:n}})},r=function(e){return a.current({type:"REMOVE_PANEL",payload:e})},o=function(e){return a.current({type:"OPEN_PANEL",payload:{panelId:e}})},i=function(e){return a.current({type:"CLOSE_PANEL",payload:e})},c=function(e){var t=e.id,n=e.config;return a.current({type:"ADD_CONTROL",payload:{id:t,config:n}})};return u.on(ht.q.APP_ADD_BUTTON,e),u.on(ht.q.APP_TOGGLE_BUTTON_STATE,t),u.on(ht.q.APP_ADD_PANEL,n),u.on(ht.q.APP_REMOVE_PANEL,r),u.on(ht.q.APP_SHOW_PANEL,o),u.on(ht.q.APP_HIDE_PANEL,i),u.on(ht.q.APP_ADD_CONTROL,c),function(){u.off(ht.q.APP_ADD_BUTTON,e),u.off(ht.q.APP_TOGGLE_BUTTON_STATE,t),u.off(ht.q.APP_ADD_PANEL,n),u.off(ht.q.APP_REMOVE_PANEL,r),u.off(ht.q.APP_SHOW_PANEL,o),u.off(ht.q.APP_HIDE_PANEL,i),u.off(ht.q.APP_ADD_CONTROL,c)}},[u]);var s=Jr();return no(s),kt(P,{children:f.registeredPlugins.map(function(e,t){return kt(io,{plugin:e,mode:c,evaluateProp:s},"init-".concat(e.id,"-").concat(t))})})};function ao(e){return function(e){if(Array.isArray(e))return fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||co(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.")}()}function lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||co(e,t)||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 co(e,t){if(e){if("string"==typeof e)return fo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,t):void 0}}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function so(e){return so="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},so(e)}function po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?po(Object(n),!0).forEach(function(t){mo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):po(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mo(e,t,n){return(t=function(e){var t=function(e){if("object"!=so(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=so(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==so(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bo=function(e){var t=[e.mainRef,e.insetRef,e.rightRef,e.actionsRef,e.footerRef];if(!t.some(function(e){return!e.current})){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vo(e,t):void 0}}(e,t)||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.")}()}(t.map(function(e){return e.current}),5),r=n[0],o=n[1],i=n[2],u=n[3],a=n[4],l=document.documentElement,c=Number.parseInt(getComputedStyle(l).getPropertyValue("--divider-gap"),10),f=u.offsetTop-o.offsetTop-c,s=o.offsetLeft+i.offsetWidth+c,p=r.offsetWidth-2*s,d=o.offsetWidth-s+o.offsetLeft,y=p-d>f-o.offsetHeight,m=o.offsetTop+(!y&&o.offsetHeight>0?o.offsetHeight+c:0),v=y?o.offsetWidth+o.offsetLeft+c:s,b=r.offsetHeight-u.offsetTop,_=r.offsetHeight-a.offsetTop,h=d<p/2&&o.offsetHeight<f/2;return{top:h?o.offsetTop:m,right:s,left:r.offsetLeft+(h?s:Math.max(v,s)),bottom:Math.max(b,_)+c}}};function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ho=function(e,t){return Object.entries(e).reduce(function(e,n){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_o(e,t):void 0}}(e,t)||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.")}()}(n,2),o=r[0],i=r[1];return e[o]=Math.round(i/t),e},{})};function go(e){return go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},go(e)}function Oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function So(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oo(Object(n),!0).forEach(function(t){Po(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Po(e,t,n){return(t=function(e){var t=function(e){if("object"!=go(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=go(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==go(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wo=function(e){var t=e.mapContainerRef,n=Ot(),r=n.id,o=n.mapProvider,i=Ir(),u=i.safeZoneInset,a=i.breakpoint,l=i.isLayoutReady,c=i.syncMapPadding,f=Rr(),s=f.isMapReady,p=f.mapStyle,d=f.mapSize,y=f.center,m=f.zoom,v=f.bounds,b=de(!1),_=function(e){var t=e.id,n=e.center,r=e.zoom,o=e.bounds,i=function(e,t){var n=new URLSearchParams(t),r=n.get("".concat(e,":center")),o=n.get("".concat(e,":zoom"));if(!r||!o)return null;var i=lo(r.split(",").map(Number),2);return{center:[i[0],i[1]],zoom:Number(o)}}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search);return i?{center:i.center,zoom:i.zoom}:o?{bounds:o}:{center:n,zoom:r}}({id:r,center:y,zoom:m,bounds:v});return se(function(){if(u&&l&&p&&d&&!b.current)return requestAnimationFrame(function(){o.initMap(So(So({},n),{},{pixelRatio:window.devicePixelRatio*Wt[d],container:t.current,padding:u,center:_.center,zoom:_.zoom,bounds:_.bounds,mapStyle:p}))}),b.current=!0,function(){}},[u,l,p,d]),function(){var e=Ot().mapProvider,t=Rr().dispatch,n=Cr().eventBus,r=de(null),o=de(!1);se(function(){if(e){var i=function(e){t({type:"MAP_MOVE",payload:e})},u=function(e){t({type:"MAP_MOVE_END",payload:e}),n.emit(ht.q.MAP_STATE_UPDATED,{previous:r.current,current:e}),r.current=e},a=function(n){o.current||(r.current={center:e.getCenter(),zoom:e.getZoom()},o.current=!0),t({type:"MAP_FIRST_IDLE",payload:n})};return n.on(ht.q.MAP_MOVE,i),n.on(ht.q.MAP_MOVE_END,u),n.on(ht.q.MAP_FIRST_IDLE,a),function(){n.off(ht.q.MAP_MOVE,i),n.off(ht.q.MAP_MOVE_END,u),n.off(ht.q.MAP_FIRST_IDLE,a)}}},[e,t])}(),function(){var e=Ot().id,t=Cr().eventBus;se(function(){if(e){var n=function(t){var n=t.current;!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.href,r=new URL(n||"http://localhost"),o=ao(new URLSearchParams(r.search)).map(function(e){var t=lo(e,2),n=t[0],r=t[1];return"".concat(n,"=").concat(r)}),i=[];t.center&&i.push("".concat(e,":center=").concat(t.center[0],",").concat(t.center[1])),null!=t.zoom&&i.push("".concat(e,":zoom=").concat(t.zoom));var u=o.filter(function(e){return!i.some(function(t){return t.split("=")[0]===e.split("=")[0]})}),a=r.hash||"",l="".concat(r.origin).concat(r.pathname,"?").concat([].concat(ao(u),i).join("&")).concat(a);window.history.replaceState(window.history.state,"",l)}(e,{center:n.center,zoom:n.zoom})};return t.on(ht.q.MAP_STATE_UPDATED,n),function(){return t.off(ht.q.MAP_STATE_UPDATED,n)}}},[e])}(),function(){var e=Ot().mapProvider,t=Cr(),n=t.eventBus,r=t.announce;se(function(){var t=function(t){var n=t.previous,o=t.current;if(null!=n&&n.center&&null!=o&&o.center){var i=function(e,t,n){var r,o,i,u=e.zoom!==t.zoom,a=e.center[0]!==t.center[0]||e.center[1]!==t.center[1],l=n.getAreaDimensions();return a&&!u?function(e){var t=e.direction;return"Map moved ".concat(t,".")}({direction:n.getCardinalMove(e.center,t.center),areaDimensions:l}):!a&&u?function(e){var t=e.from,n=e.to,r=e.areaDimensions,o=e.isAtMaxZoom,i=e.isAtMinZoom;return"Map zoomed ".concat(n>t?"in":"out").concat(o?" (Maximum zoom)":"").concat(i?" (Minimum zoom)":"",". New area approximately ").concat(r,".")}(yo(yo({},t),{},{from:e.zoom,to:t.zoom,areaDimensions:l})):a||u?function(e){var t=e.areaDimensions,n=e.isAtMaxZoom,r=e.isAtMinZoom;return"New area approximately ".concat(t).concat(n?" (Maximum zoom)":"").concat(r?" (Minimum zoom)":"",".")}(yo(yo({},t),{},{areaDimensions:l})):(o=(r=yo({},t)).isAtMaxZoom,i=r.isAtMinZoom,"No change, ".concat(o?"maximum zoom reached":"").concat(i?"minimum zoom reached":"","."))}(n,o,e);i&&r(i,"core")}};return n.on(ht.q.MAP_STATE_UPDATED,t),function(){n.off(ht.q.MAP_STATE_UPDATED,t)}},[e,r])}(),function(){var e=Ot().mapProvider,t=Ir(),n=t.dispatch,r=t.layoutRefs,o=Rr().mapSize,i=de(o);i.current=o;var u=function(){var t=bo(r),o=ho(t,Wt[i.current]);"function"==typeof n&&n({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t,syncMapPadding:!1}}),"function"==typeof e.setPadding&&e.setPadding(o)};se(function(){if(e){var t=e.fitToBounds;e.fitToBounds=function(n){if(n)return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||u(),t.call(e,n)};var n=e.setView;return e.setView=function(t){var r=t.center,o=t.zoom;if(r)return u(),n.call(e,{center:r,zoom:o})},function(){e.fitToBounds=t,e.setView=n}}},[e,n,r,o])}(),se(function(){s&&c&&o.setPadding(ho(u,Wt[d]))},[s,d,a,u]),null},Eo={keydown:{ArrowUp:"panUp",ArrowDown:"panDown",ArrowLeft:"panLeft",ArrowRight:"panRight","+":"zoomIn","=":"zoomIn","-":"zoomOut",_:"zoomOut"},keyup:{"Alt+k":"showKeyboardControls","Alt+K":"showKeyboardControls","Alt+ArrowRight":"highlightNextLabel","Alt+ArrowLeft":"highlightNextLabel","Alt+ArrowUp":"highlightNextLabel","Alt+ArrowDown":"highlightNextLabel","Alt+Enter":"highlightLabelAtCenter","Alt+i":"getInfo","Alt+I":"getInfo",Escape:"clearSelection"}};function jo(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof a?r:a,c=Object.create(l.prototype);return Ao(c,"_invoke",function(n,r,o){var i,a,l,c=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,l=e,p.n=n,u}};function d(n,r){for(a=n,l=r,t=0;!s&&c&&!o&&t<f.length;t++){var o,i=f[t],d=p.p,y=i[2];n>3?(o=y===r)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(a=0,p.v=r,p.n=i[1]):d<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,p.n=y,a=0))}if(o||n>1)return u;throw s=!0,r}return function(o,f,y){if(c>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,y),a=f,l=y;(t=a<2?e:l)||!s;){i||(a?a<3?(a>1&&(p.n=-1),d(a,l)):p.n=l:p.v=l);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(s=p.n<0)?l:n.call(r,p))!==u)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:s}}}(n,o,i),!0),c}var u={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(Ao(t={},r,function(){return this}),t),s=c.prototype=a.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ao(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return l.prototype=c,Ao(s,"constructor",c),Ao(c,"constructor",l),l.displayName="GeneratorFunction",Ao(c,o,"GeneratorFunction"),Ao(s),Ao(s,o,"Generator"),Ao(s,r,function(){return this}),Ao(s,"toString",function(){return"[object Generator]"}),(jo=function(){return{w:i,m:p}})()}function Ao(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ao=function(e,t,n,r){function i(t,n){Ao(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Ao(e,t,n,r)}function To(e,t,n,r,o,i,u){try{var a=e[i](u),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function ko(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Io(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Io(e,t):void 0}}(e,t)||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 Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ro=function(){return kt("div",{ref:Cr().mapStatusRef,role:"status",className:"im-c-viewport__status","aria-live":"polite","aria-atomic":"true","aria-label":"Map updates"})},Co={active:"M5.035 20H1v-2h4.035C5.525 11.069 11.069 5.525 18 5.035V1h2v4.035c6.931.49 12.475 6.034 12.965 12.965H37v2h-4.035c-.49 6.931-6.034 12.475-12.965 12.965V37h-2v-4.035C11.069 32.475 5.525 26.931 5.035 20zM19 7c-6.581.005-11.995 5.419-12 12 .005 6.581 5.419 11.995 12 12 6.581-.005 11.995-5.419 12-12-.005-6.581-5.419-11.995-12-12zm0 10a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2z",inactive:"M5.035 20H1v-2h4.035a13.98 13.98 0 0 1 .246-1.8l1.96.399C7.083 17.375 7 18.178 7 19s.083 1.625.241 2.401l-1.96.399a13.98 13.98 0 0 1-.246-1.8zM20 5.035a13.98 13.98 0 0 1 1.8.246l-.399 1.96C20.625 7.083 19.822 7 19 7s-1.625.083-2.401.241l-.399-1.96a13.98 13.98 0 0 1 1.8-.246V1h2v4.035zm-2 27.93a13.98 13.98 0 0 1-1.8-.246l.399-1.96c.776.158 1.579.241 2.401.241s1.625-.083 2.401-.241l.399 1.96a13.98 13.98 0 0 1-1.8.246V37h-2v-4.035zM32.965 20a13.98 13.98 0 0 1-.246 1.8l-1.96-.399c.158-.776.241-1.579.241-2.401s-.083-1.625-.241-2.401l1.96-.399a13.98 13.98 0 0 1 .246 1.8H37v2h-4.035zM19 17a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2zm3.8-9.385l.634-1.897c1.789.598 3.438 1.553 4.848 2.805l-1.327 1.496c-1.196-1.06-2.605-1.886-4.155-2.404zm5.181 3.43l1.496-1.327c1.252 1.41 2.207 3.059 2.805 4.848l-1.897.634c-.518-1.55-1.344-2.959-2.404-4.155zM30.385 22.8l1.897.634c-.598 1.789-1.553 3.438-2.805 4.848l-1.496-1.327c1.06-1.196 1.886-2.605 2.404-4.155zm-3.43 5.181l1.327 1.496c-1.41 1.252-3.059 2.207-4.848 2.805l-.634-1.897c1.55-.518 2.959-1.344 4.155-2.404zM15.2 30.385l-.634 1.897c-1.789-.598-3.438-1.553-4.848-2.805l1.327-1.496c1.196 1.06 2.605 1.886 4.155 2.404zm-5.181-3.43l-1.496 1.327c-1.252-1.41-2.207-3.059-2.805-4.848l1.897-.634c.518 1.55 1.344 2.959 2.404 4.155zM7.615 15.2l-1.897-.634c.598-1.789 1.553-3.438 2.805-4.848l1.496 1.327c-1.06 1.196-1.886 2.605-2.404 4.155zm3.43-5.181L9.718 8.523c1.41-1.252 3.059-2.207 4.848-2.805l.634 1.897c-1.55.518-2.959 1.344-4.155 2.404z"},Do=function(){var e=Ot().id,t=function(){var e=Ot().mapProvider,t=Ir().safeZoneInset,n=Cr().eventBus,r=Rr(),o=r.crossHair,i=r.dispatch,u=r.mapSize,a=function(e,n,r){if(t){var o=n*Wt[u],i=r*Wt[u];e.style.transform="translate(".concat(o-t.left,"px, ").concat(i-t.top,"px)"),e.style.left="0",e.style.top="0",e.style.display="block"}},l=ve(function(t){if(t){!function(e,t,n,r,o){e.pinToMap=function(i,u){var a=n.mapToScreen(i),l=a.x,c=a.y;e.coords=i,r({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!0,isVisible:!0,coords:i,state:u}}),o(t,l,c)},e.fixAtCenter=function(){t.style.left="50%",t.style.top="50%",t.style.transform="translate(0,0)",t.style.display="block",r({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!0}})},e.remove=function(){t.style.display="none",r({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!1}})},e.show=function(){t.style.display="block",r({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!0}})},e.hide=function(){t.style.display="none",r({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!1}})},e.setStyle=function(e){r({type:"UPDATE_CROSS_HAIR",payload:{state:e}})},e.getDetail=function(){var t=e.isPinnedToMap?e.coords:n.getCenter();return{state:e.state,point:n.mapToScreen(t),zoom:n.getZoom(),coords:t}}}(o,t,e,i,a);var r=function(){if(o.coords&&o.isPinnedToMap){var n=e.mapToScreen(o.coords),r=n.x,i=n.y;a(t,r,i)}};return n.on(ht.q.MAP_RENDER,r),function(){n.off(ht.q.MAP_RENDER,r)}}},[o,e,u,i,t]);return se(function(){o.coords&&o.isPinnedToMap&&o.pinToMap(o.coords,o.state)},[u]),{crossHair:o,crossHairRef:l}}(),n=t.crossHairRef,r=t.crossHair,o=r.isVisible,i=r.isPinnedToMap,u=r.state;return kt("svg",{id:"".concat(e,"-cross-hair"),ref:n,className:"im-c-cross-hair",width:"38",height:"38",viewBox:"0 0 38 38",fillRule:"evenodd",fill:"currentColor",style:{position:"absolute",left:i?0:"50%",top:i?0:"50%",pointerEvents:"none",display:o?"block":"none"},children:kt("path",{d:Co[u||"active"]})})};function Mo(e){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mo(e)}function No(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach(function(t){Lo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lo(e,t,n){return(t=function(e){var t=function(e){if("object"!=Mo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bo=function(e,t,n,r){if(!t||!r)return{x:0,y:0};var o=t.mapToScreen(e),i=o.x,u=o.y;return{x:i*Wt[n],y:u*Wt[n]-19}},Ho=function(e,t,n,r,o){e.forEach(function(e){var i=t.get(e.id);if(i&&e.coords){var u=Bo(e.coords,n,r,o),a=u.x,l=u.y;i.style.transform="translate(".concat(a,"px, ").concat(l,"px)"),i.style.display="block"}})};function Uo(e){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uo(e)}var zo=function(e,t){if(!e)return null;if("string"==typeof e)return e.trim();if("object"===Uo(e)){if(t&&e[t])return e[t];var n=Object.values(e)[0];return null!=n?n:null}return null};function Fo(e){return null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var qo=function(){var e=Ot(),t=e.id,n=e.markerShape,r=e.markerColor,o=Rr().mapStyle,i=function(){var e=Ot().mapProvider,t=Cr().eventBus,n=Rr(),r=n.markers,o=n.dispatch,i=n.mapSize,u=n.isMapReady,a=de(new Map);se(function(){e&&(r.markerRefs=a.current,r.add=function(t,n,r){var a=Bo(n,e,i,u),l=a.x,c=a.y;o({type:"UPSERT_LOCATION_MARKER",payload:xo(xo({id:t,coords:n},r),{},{x:l,y:c,isVisible:!0})})},r.remove=function(e){o({type:"REMOVE_LOCATION_MARKER",payload:e})},r.getMarker=function(e){return r.items.find(function(t){return t.id===e})})},[e,r,o,i]);var l=ve(function(n){return function(o){if(o){a.current.set(n,o);var l=function(){u&&e&&Ho(r.items,a.current,e,i,u)};return t.on(ht.q.MAP_RENDER,l),function(){t.off(ht.q.MAP_RENDER,l)}}a.current.delete(n)}},[r,e,u,i]);return se(function(){u&&e&&Ho(r.items,a.current,e,i,u)},[i,r.items,e,u]),function(e,t){se(function(){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.id&&null!=e&&e.coords){var n=e.id,r=e.coords,o=e.options;t.add(n,r,o)}};e.on(ht.q.APP_ADD_MARKER,n);var r=function(e){e&&t.remove(e)};return e.on(ht.q.APP_REMOVE_MARKER,r),function(){e.off(ht.q.APP_ADD_MARKER,n),e.off(ht.q.APP_REMOVE_MARKER,r)}},[])}(t,r),{markers:r,markerRef:l}}(),u=i.markers,a=i.markerRef;if(o){var l=Vt.find(function(e){return e.shape===n});return kt(P,{children:u.items.map(function(e){return kt("svg",{ref:a(e.id),id:"".concat(t,"-marker-").concat(e.id),className:"im-c-marker im-c-marker--".concat(e.markerShape||Fo(n)),width:"38",height:"38",viewBox:"0 0 38 38",style:{display:e.isVisible?"block":"none"},children:[kt("path",{className:"im-c-marker__background",d:l.backgroundPath,fill:zo(e.color||r,o.id)}),kt("path",{className:"im-c-marker__graphic",d:l.graphicPath})]},e.id)})})}};function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Go=function(e){var t=e.keyboardHintPortalRef,n=Ot(),r=n.id,o=n.mapProvider,i=n.mapLabel,u=n.keyboardHintText,a=Ir(),l=a.interfaceType,c=a.mode,f=a.previousMode,s=a.layoutRefs,p=a.safeZoneInset,d=Rr().mapSize,y=de(null),m=de(null),v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vo(e,t):void 0}}(e,t)||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.")}()}(ce(!1),2),b=v[0],_=v[1];!function(e){var t=Ot(),n=t.mapProvider,r=t.panDelta,o=t.nudgePanDelta,i=t.zoomDelta,u=t.nudgeZoomDelta,a=t.readMapText,l=Ir(),c=l.interfaceType,f=l.dispatch,s=Cr().announce;se(function(){var t=e.current;if(t&&"keyboard"===c){var l=function(e,t,n){var r,o=n.containerRef,i=n.dispatch,u=n.panDelta,a=n.nudgePanDelta,l=n.zoomDelta,c=n.nudgeZoomDelta,f=n.readMapText,s=function(e){return e?a:u},p=function(e){return e?c:l};return{showKeyboardControls:function(){i({type:"OPEN_PANEL",payload:{panelId:"keyboardHelp",props:{triggeringElement:o.current}}})},panUp:function(t){return e.panBy([0,-s(t.shiftKey)])},panDown:function(t){return e.panBy([0,s(t.shiftKey)])},panLeft:function(t){return e.panBy([-s(t.shiftKey),0])},panRight:function(t){return e.panBy([s(t.shiftKey),0])},zoomIn:function(t){return e.zoomIn(p(t.shiftKey))},zoomOut:function(t){return e.zoomOut(p(t.shiftKey))},getInfo:(r=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){To(i,r,o,u,a,"next",e)}function a(e){To(i,r,o,u,a,"throw",e)}u(void 0)})}}(jo().m(function n(r){var o,i,u,a,l;return jo().w(function(n){for(;;)switch(n.n){case 0:return i=e.getCenter(),n.n=1,(0,_r.R)(e.getZoom(),i);case 1:u=n.v,a=null===(o=e.getAreaDimensions)||void 0===o?void 0:o.call(e),l=a?"".concat(u,". Covering ").concat(a,"."):"".concat(u,"."),t(l,"core");case 2:return n.a(2)}},n)})),function(e){return r.apply(this,arguments)}),highlightNextLabel:function(n){if(f||!e.highlightNextLabel){var r=e.highlightNextLabel(n.key);t(r,"core")}},highlightLabelAtCenter:function(){if(f||!e.highlightNextLabel){var n=e.highlightLabelAtCenter();t(n,"core")}},clearSelection:function(){var t;return null==e||null===(t=e.clearHighlightedLabel)||void 0===t?void 0:t.call(e)}}}(n,s,{containerRef:e,dispatch:f,panDelta:r,nudgePanDelta:o,zoomDelta:i,nudgeZoomDelta:u,readMapText:a}),p=function(e){return function(t){var n=Eo[e][function(e){var t;return"Add"===(t=/^Key[A-Z]$/.test(e.code)?e.code.slice(3):e.key)||"NumpadAdd"===t?t="+":"Subtract"!==t&&"NumpadSubtract"!==t||(t="-"),e.altKey?"Alt+".concat(t):t}(t)];n&&l[n]&&(l[n](t),t.preventDefault())}},d=p("keydown"),y=p("keyup");return t.addEventListener("keydown",d),t.addEventListener("keyup",y),function(){t.removeEventListener("keydown",d),t.removeEventListener("keyup",y)}}},[e,c,n,r,o,i,u])}(s.viewportRef),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ot().mapProvider,n=Cr().eventBus;se(function(){if(t){var r={};return Object.entries(e).forEach(function(e){var t=ko(e,2),o=t[0],i=t[1],u=function(e){return i(e)};r[o]=u,n.on(o,u)}),function(){Object.entries(r).forEach(function(e){var t=ko(e,2),r=t[0],o=t[1];n.off(r,o)})}}},[t,e])}(function(e,t,n){return(t=function(e){var t=function(e){if("object"!=Wo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},ht.q.MAP_CLICK,function(){var e;return null==o||null===(e=o.clearHighlightedLabel)||void 0===e?void 0:e.call(o)}));var h=function(e){var t=e.interfaceType,n=e.containerRef,r=e.keyboardHintRef,o=e.onViewportFocusChange,i=e.keyboardHintVisible;return se(function(){if(i&&n.current){var e=n.current,t=function(e){["Escape","Tab"].includes(e.key)&&o(!1)},u=function(t){var n,i=e.contains(t.target),u=null===(n=r.current)||void 0===n?void 0:n.contains(t.target);i&&!u&&o(!1)};return e.addEventListener("keydown",t),e.addEventListener("mousedown",u),function(){e.removeEventListener("keydown",t),e.removeEventListener("mousedown",u)}}},[i,n,r,o]),{showHint:i,handleFocus:function(){"keyboard"===t&&o(!0)},handleBlur:function(){o(!1)}}}({interfaceType:l,containerRef:s.viewportRef,keyboardHintRef:m,keyboardHintVisible:b,onViewportFocusChange:_}),g=h.showHint,O=h.handleFocus,S=h.handleBlur;return se(function(){var e;c&&f&&c!==f&&(null===(e=s.viewportRef)||void 0===e||e.current.focus())},[c]),se(function(){var e,t=null===(e=s.mainRef)||void 0===e?void 0:e.current;if(t)return t.classList.toggle("im-o-app__main--keyboard-hint-visible",g),function(){return null==t?void 0:t.classList.remove("im-o-app__main--keyboard-hint-visible")}},[g]),kt(P,{children:[kt(wo,{mapContainerRef:y}),kt("div",{id:"".concat(r,"-viewport"),className:"im-c-viewport im-c-viewport--".concat(d),"aria-label":i,role:"application",tabIndex:"0",onFocus:O,onBlur:S,ref:s.viewportRef,children:[g&&(null==t?void 0:t.current)&&Ye(kt("div",{className:"im-c-viewport__keyboard-hint","aria-hidden":"true",ref:m,dangerouslySetInnerHTML:{__html:u}}),t.current),kt("div",{className:"im-c-viewport__map-container",ref:y}),kt("div",{className:"im-c-viewport__features"}),kt(Ro,{}),kt("div",{className:"im-c-viewport__safezone",style:p,ref:s.safeZoneRef,children:kt(Do,{})}),kt(qo,{})]})]})};function Zo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $o(e,t){var n=de(),r=de(new WeakMap);return se(function(){var o=(Array.isArray(e)?e:[e]).map(function(e){return null==e?void 0:e.current}).filter(Boolean);if(o.length&&t){var i=new window.ResizeObserver(function(e){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Zo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw i}}}}(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,u=i.contentRect,a=u.width,l=u.height,c=r.current.get(i.target)||{};c.width===a&&c.height===l||(r.current.set(i.target,{width:a,height:l}),t(i))}}catch(e){o.e(e)}finally{o.f()}});return o.forEach(function(e){return i.observe(e)}),function(){i.disconnect(),n.current&&cancelAnimationFrame(n.current)}}},[e,t]),{frameRef:n}}var Ko=function(){var e=Rr().mapStyle;if(null!=e&&e.logo)return kt("img",{className:"im-c-logo",src:e.logo,alt:e.logoAltText})},Yo=function(){var e=Ir().breakpoint,t=Rr().mapStyle;return t?"mobile"!==e&&kt("div",{className:"im-c-attributions",dangerouslySetInnerHTML:{__html:t.attribution}}):null},Xo=Object.freeze({SIDE:"side",BANNER:"banner",TOP_LEFT:"top-left",TOP_MIDDLE:"top-middle",TOP_RIGHT:"top-right",INSET:"inset",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",MIDDLE:"middle",FOOTER_RIGHT:"footer-right",BOTTOM:"bottom",ACTIONS:"actions",MODAL:"modal"}),Jo=Object.freeze({control:[Xo.BANNER,Xo.TOP_LEFT,Xo.TOP_RIGHT,Xo.INSET,Xo.MIDDLE,Xo.FOOTER_RIGHT,Xo.BOTTOM,Xo.ACTIONS],panel:[Xo.SIDE,Xo.BANNER,Xo.INSET,Xo.MIDDLE,Xo.BOTTOM,Xo.ACTIONS,Xo.DRAWER,Xo.MODAL],button:[Xo.TOP_LEFT,Xo.TOP_MIDDLE,Xo.TOP_RIGHT,Xo.RIGHT_TOP,Xo.RIGHT_BOTTOM,Xo.ACTIONS]}),Qo=function(e,t){return e.modal?"modal":"bottom"===e.slot&&["tablet","desktop"].includes(t)?"inset":e.slot},ei=function(e,t){var n;return!(e.includeModes&&!e.includeModes.includes(t)||null!==(n=e.excludeModes)&&void 0!==n&&n.includes(t))},ti=function(e){return"string"==typeof e.html&&!e.pluginId},ni=n("./src/utils/toggleInertElements.js");function ri(e){var t=e.mainRef,n=e.panelRef,r=e.isModal,o=e.rootEl,i=e.buttonContainerEl,u=e.handleClose;!function(e,t,n){se(function(){if(t){var r=function(t){"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),n()),"Tab"===t.key&&e.current&&function(e,t){if("Tab"===t.key){var n=Array.from(e.querySelectorAll(["a[href]:not([disabled])","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'*[tabindex="0"]:not([disabled])'].join(",")));if(0!==(n=n.filter(function(e){return!!e.offsetParent})).length){var r=n[0],o=n[n.length-1];!t.shiftKey||document.activeElement!==e&&document.activeElement!==r||(o.focus(),t.preventDefault()),t.shiftKey||document.activeElement!==o||(r.focus(),t.preventDefault())}}}(e.current,t)},o=e.current;return null==o||o.addEventListener("keydown",r),function(){null==o||o.removeEventListener("keydown",r)}}},[t,e,n])}(n,r,u);var a=document.documentElement,l=Number.parseInt(getComputedStyle(a).getPropertyValue("--divider-gap"),10);$o([t],function(){if(r&&i&&t.current){var e=t.current.getBoundingClientRect(),n=i.getBoundingClientRect(),o=n.top-e.top,u=Math.round(e.right-n.right+n.width+l);a.style.setProperty("--modal-inset","".concat(o,"px ").concat(u,"px auto auto"))}}),se(function(){if(r){var e=function(e){var t=e.target.closest(".im-o-app__modal-backdrop");o&&t&&o.contains(t)&&u()};return document.addEventListener("click",e),function(){document.removeEventListener("click",e)}}},[r,o,u]),se(function(){if(r&&n.current&&o)return(0,ni.U)({containerEl:n.current,isFullscreen:!0,boundaryEl:o}),function(){(0,ni.U)({containerEl:n.current,isFullscreen:!1,boundaryEl:o})}},[r,n,o]),function(e,t,n){se(function(){if(e){var r=function(e){var r=e.target,o=t.current;if(r&&o&&n){var i=n.contains(r),u=o.contains(r);i&&!u&&o.focus()}};return document.addEventListener("focusin",r),function(){document.removeEventListener("focusin",r)}}},[e,t,n])}(r,n,o)}function oi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ii=function(e){var t=e.id,n=e.svgContent;return kt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:En()[t]||n}})};function ui(e){return ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ui(e)}function ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(n),!0).forEach(function(t){ci(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ci(e,t,n){return(t=function(e){var t=function(e){if("object"!=ui(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ui(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ui(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fi=function(e,t){return e?"dialog":t?"complementary":"region"},si=function(e){var t,n,r,o,i,u=e.panelId,a=e.panelConfig,l=e.props,c=e.WrappedChild,f=e.label,s=e.html,p=e.children,d=e.isOpen,y=void 0===d||d,m=e.rootRef,v=Ot().id,b=Ir(),_=b.dispatch,h=b.breakpoint,g=b.layoutRefs,O=document.getElementById("".concat(v,"-im-app")),S=a[h],P="".concat(v,"-panel-").concat(Fo(u)),w=function(e,t){var n="side"===e.slot&&e.initiallyOpen&&!e.modal,r=!n&&e.dismissable,o=!0===e.modal;return{isAside:n,isDialog:r,isModal:o,isDismissable:!1!==e.dismissable,shouldFocus:Boolean(o||t),buttonContainerEl:e.slot.endsWith("button")?null==t?void 0:t.parentNode:void 0}}(S,null==l?void 0:l.triggeringElement),E=w.isAside,j=w.isDialog,A=w.isModal,T=w.isDismissable,k=w.shouldFocus,I=w.buttonContainerEl,R=A&&y,C=g.mainRef,D=de(null),M=de(null),N=de(y),x=(t=M,n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oi(e,t):void 0}}(e,t)||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.")}()}(ce(!1),2),r=n[0],o=n[1],i=ve(function(){var e=null==t?void 0:t.current;e&&o(e.scrollHeight>e.clientHeight)},[t]),$o(t,i),r),L=m||D,B=function(){requestAnimationFrame(function(){var e,t;null===(e=(t=(null==l?void 0:l.triggeringElement)||g.viewportRef.current).focus)||void 0===e||e.call(t)}),_({type:"CLOSE_PANEL",payload:u})};ri({mainRef:C,panelRef:L,isModal:R,isAside:E,rootEl:O,buttonContainerEl:I,handleClose:B}),se(function(){var e,t=y&&!N.current;N.current=y,k&&(t||y)&&(null===(e=L.current)||void 0===e||e.focus())},[y]);var H,U,z=(H=S.slot,U=a.showLabel,["im-c-panel","im-c-panel--".concat(H),!U&&"im-c-panel--no-heading"].filter(Boolean).join(" ")),F=function(e,t){return["im-c-panel__body",!e&&t&&"im-c-panel__body--offset"].filter(Boolean).join(" ")}(a.showLabel,T),q=me(function(){return s?{__html:s}:null},[s]),W=function(e){var t=e.elementId,n=e.shouldFocus,r=e.isDialog,o=e.isDismissable,i=e.isModal,u=e.width,a=e.panelClass;return{id:t,"aria-labelledby":"".concat(t,"-label"),tabIndex:n?-1:void 0,role:fi(r,o),"aria-modal":r&&i?"true":void 0,style:u?{width:u}:void 0,className:a}}({elementId:P,shouldFocus:k,isDialog:j,isDismissable:T,isModal:A,width:S.width,panelClass:z}),V=function(e){var t=e.isBodyScrollable;return{ref:e.bodyRef,className:e.panelBodyClass,tabIndex:t?0:void 0,role:t?"region":void 0,"aria-labelledby":t?"".concat(e.elementId,"-label"):void 0}}({bodyRef:M,panelBodyClass:F,isBodyScrollable:x,elementId:P});return kt("div",li(li({ref:L},W),{},{children:[kt("h2",{id:"".concat(P,"-label"),className:a.showLabel?"im-c-panel__heading im-e-heading-m":"im-u-visually-hidden",children:f}),T&&kt("button",{"aria-label":"Close ".concat(f),className:"im-c-panel__close",onClick:B,children:kt(ii,{id:"close"})}),kt("div",li(li({},V),{},q?{dangerouslySetInnerHTML:q}:{children:[" ",c?kt(c,li({},l)):p]}))]}))};function pi(e){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pi(e)}function di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?di(Object(n),!0).forEach(function(t){mi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mi(e,t,n){return(t=function(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bi(e,t):void 0}}(e,t)||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 bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||hi(e,t)||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 hi(e,t){if(e){if("string"==typeof e)return gi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gi(e,t):void 0}}function gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oi(e){return Oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oi(e)}function Si(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pi(e,t):void 0}}(e,t)||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 Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wi=0,Ei=function(e){var t=e.children,n=e.content,r=Ir().interfaceType,o=de(null),i=de(null),u=Si(ce(!1),2),a=u[0],l=u[1],c=Si(ce(!1),2),f=c[0],s=c[1],p=Si(ce(null),2),d=p[0],y=p[1],m=Si(ce(function(){return"tooltip-".concat(wi+=1)}),1)[0],v=de(null),b=de(null),_=function(){clearTimeout(v.current),l(!1)},h=function(){clearTimeout(b.current),v.current=setTimeout(function(){return l(!0)},500)},g=function(){clearTimeout(v.current),b.current=setTimeout(function(){return l(!1)},0)};se(function(){var e=function(e){"Escape"===e.key&&(clearTimeout(v.current),clearTimeout(b.current),l(!1))};if(window.addEventListener("keydown",e),a){var t=function(e,t){if(!e)return"bottom";t||(t=e.closest(".im-o-app__main"));var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={top:n.top-r.top,bottom:r.bottom-n.bottom,left:n.left-r.left,right:r.right-n.right},i=Object.entries(o),u=i.toSorted(function(e,t){return _i(e,2)[1]-_i(t,2)[1]}),a=_i(u[0],2),l=a[0],c=a[1];if("top"===l||"bottom"===l){var f,s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=hi(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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,i=!0,u=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw o}}}}(i);try{for(s.s();!(f=s.n()).done;){var p=_i(f.value,2),d=p[0],y=p[1];if(("left"===d||"right"===d)&&Math.abs(y-c)<=50)return"left"===d?"right":"left"}}catch(e){s.e(e)}finally{s.f()}}return{top:"bottom",bottom:"top",left:"right",right:"left"}[l]}(o.current);y(t)}return function(){window.removeEventListener("keydown",e),clearTimeout(v.current),clearTimeout(b.current)}},[a]);var O=mt(t,{ref:function(e){var n;o.current=e;var r=null===(n=t.props)||void 0===n?void 0:n.ref;"function"==typeof r?r(e):r&&"object"===Oi(r)&&(r.current=e)},onMouseEnter:h,onMouseLeave:g,onMouseDown:_,onKeyDown:_,onFocus:function(){"keyboard"===r&&h(),s(!0)},onBlur:function(){g(),s(!1)},"aria-labelledby":m});return kt("div",{className:"im-c-tooltip-wrapper".concat(f?" im-c-tooltip-wrapper--has-focus":""),children:[O,kt("div",{id:m,ref:i,className:"im-c-tooltip im-c-tooltip--".concat(d||"hidden"," ").concat(a?"im-c-tooltip--is-visible":""),role:"tooltip","aria-hidden":!a,children:n})]})};function ji(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ai=function(e){var t=e.popupMenuId,n=e.buttonId,r=e.instigatorId,o=e.pluginId,i=e.startPos,u=e.startIndex,a=e.menuRef,l=e.items,c=e.setIsOpen,f=Ot().id,s=Ir(),p=s.buttonRefs,d=s.buttonConfig,y=s.hiddenButtons,m=s.disabledButtons,v=s.pressedButtons,b=null!=n?n:r,_=p.current[b],h=Jr(),g=me(function(){var e=[];return l.forEach(function(t,n){y.has(t.id)||e.push(n)}),e},[l,y]),O=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ji(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ji(e,t):void 0}}(e,t)||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.")}()}(ce(function(){return"number"==typeof u?u:"first"===i?null!==(e=g[0])&&void 0!==e?e:-1:"last"===i&&null!==(t=g[g.length-1])&&void 0!==t?t:-1;var e,t}),2),S=O[0],P=O[1],w=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!=e&&e.preventDefault&&e.preventDefault(),_.focus(),c(!1)},E=function(e,t){var n=d[t.id];if("function"==typeof(null==n?void 0:n.onClick)?n.onClick(e,h(function(e){return e},o)):"function"==typeof t.onClick&&t.onClick(e.nativeEvent),e.nativeEvent instanceof KeyboardEvent){var r=document.getElementById("".concat(f,"-").concat(Fo(t.id)));if(r){var i=new MouseEvent("click",{bubbles:!0,cancelable:!0});i._fromKeyboardActivation=!0,r.dispatchEvent(i)}}},j=function(e){var t,n;null!==(t=a.current)&&void 0!==t&&t.contains(e.target)||null!==(n=p.current[b])&&void 0!==n&&n.contains(e.target)||c(!1)};return se(function(){var e,t;if(null===(e=a.current)||void 0===e||e.focus(),"first"===i)P(null!==(t=g[0])&&void 0!==t?t:-1);else if("last"===i){var n;P(null!==(n=g[g.length-1])&&void 0!==n?n:-1)}return document.addEventListener("focusin",j),document.addEventListener("pointerdown",j),function(){document.removeEventListener("focusin",j),document.removeEventListener("pointerdown",j)}},[]),kt("ul",{ref:a,id:t,className:"im-c-popup-menu",role:"menu",tabIndex:"-1","aria-labelledby":b,"aria-activedescendant":S>=0?"".concat(f,"-").concat(Fo(l[S].id)):void 0,onKeyDown:function(e){["Escape","Esc"].includes(e.key)?w(e,!0):"Tab"!==e.key?["ArrowDown","ArrowUp"].includes(e.key)?function(e){e.preventDefault();var t=g,n=t.length;if(0!==n){var r,o=t.indexOf(S);r="ArrowDown"===e.key?-1===o?0:(o+1)%n:-1===o?n-1:(o-1+n)%n,P(t[r])}}(e):"Home"===e.key&&g.length?P(g[0]):"End"===e.key&&g.length?P(g[g.length-1]):("Enter"===e.key&&function(e){e.preventDefault();var t=l[S];t&&!m.has(t.id)&&E(e,t),_.focus(),c(!1)}(e)," "===e.key&&function(e){e.preventDefault();var t=l[S];if(t&&!m.has(t.id)){var n=void 0!==t.isPressed||t.pressedWhen;E(e,t),n||(_.focus(),c(!1))}}(e)):w(e)},children:l.map(function(e,t){return kt("li",{id:"".concat(f,"-").concat(Fo(l[t].id)),className:"im-c-popup-menu__item".concat(S===t?" im-c-popup-menu__item--selected":""),role:void 0!==l[t].isPressed||l[t].pressedWhen?"menuitemcheckbox":"menuitem","aria-disabled":m.has(l[t].id)||void 0,"aria-checked":void 0!==l[t].isPressed||l[t].pressedWhen?v.has(l[t].id):void 0,style:y.has(l[t].id)?{display:"none"}:void 0,onClick:function(e){return function(e,t){e.nativeEvent._fromKeyboardActivation||m.has(t.id)||(c(!1),E(e,t))}(e,l[t])},children:[(e.iconId||e.iconSvgContent)&&kt(ii,{id:e.iconId,svgContent:e.iconSvgContent}),kt("span",{className:"im-c-popup-menu__item-label",children:e.label})]},e.id)})})};function Ti(e){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(e)}function ki(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ii(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ii(e,t):void 0}}(e,t)||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 Ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ci(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ri(Object(n),!0).forEach(function(t){Di(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ri(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Di(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ti(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ti(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mi=function(e,t,n){return["im-c-map-button",e&&"im-c-map-button--".concat(Fo(e)),t&&"im-c-map-button--".concat(t),n&&"im-c-map-button--with-label"].filter(Boolean).join(" ")},Ni=function(e,t,n,r,o){return["im-c-button-wrapper",e&&"im-c-button-wrapper--".concat(Fo(e)),t&&"im-c-button-wrapper--wide",n&&"im-c-button-wrapper--group-start",r&&"im-c-button-wrapper--group-middle",o&&"im-c-button-wrapper--group-end"].filter(Boolean).join(" ")},xi=function(e){" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),e.currentTarget.click())},Li=function(e){var t=e.buttonId,n=e.iconId,r=e.iconSvgContent,o=e.label,i=e.showLabel,u=e.isDisabled,a=e.isPressed,l=e.isExpanded,c=e.isHidden,f=e.isPanelOpen,s=e.variant,p=e.onClick,d=e.panelId,y=e.menuItems,m=e.idPrefix,v=e.href,b=e.groupMiddle,_=e.groupStart,h=e.groupEnd,g=Ot().id,O=Ir().buttonRefs,S=ki(ce(!1),2),P=S[0],w=S[1],E=ki(ce(null),2),j=E[0],A=E[1],T=de(null),k=v?"a":"button",I=(null==y?void 0:y.length)>=1,R=function(e){var t=e.idPrefix,n=e.panelId,r=e.buttonId,o=e.hasMenu;return n?{id:"".concat(t,"-panel-").concat(Fo(n)),type:"panel"}:o?{id:"".concat(t,"-popup-").concat(Fo(r)),type:"popup"}:null}({idPrefix:m,panelId:d,buttonId:t,hasMenu:I}),C=function(e){var t,n=e.appId,r=e.buttonId,o=e.className,i=e.onClick,u=e.onKeyUp,a=e.buttonRefs,l=e.isDisabled,c=e.isPressed,f=e.isExpanded,s=e.isPanelOpen,p=e.isPopupOpen,d=e.controlledElement,y=e.href;return"panel"===(null==d?void 0:d.type)?t=String(s):"popup"===(null==d?void 0:d.type)?t=p:"boolean"==typeof f&&(t=f),Ci({id:"".concat(n,"-").concat(Fo(r)),className:o,onClick:i,onKeyUp:u,ref:function(e){a.current&&r&&(a.current[r]=e)},"aria-disabled":l||void 0,"aria-expanded":t,"aria-pressed":"boolean"==typeof c?c:void 0,"aria-controls":null==d?void 0:d.id,"aria-haspopup":"popup"===(null==d?void 0:d.type)||void 0},y?{href:y,target:"_blank",onKeyUp:xi,role:"button"}:{type:"button"})}({appId:g,buttonId:t,className:Mi(t,s,i),onClick:function(e){if(!u){if("popup"===(null==R?void 0:R.type)){var t=""===e.nativeEvent.pointerType;A(t?"first":null),w(function(e){return!e})}p&&p(e)}},onKeyUp:function(e){I&&["ArrowDown","ArrowUp"].includes(e.key)&&(e.preventDefault(),A("ArrowUp"===e.key?"last":"first"),w(!0))},buttonRefs:O,isDisabled:u,isPressed:a,isExpanded:l,isPanelOpen:f,isPopupOpen:P,controlledElement:R,href:v}),D=kt(k,Ci(Ci({},C),{},{children:[(n||r)&&kt(ii,{id:n,svgContent:r}),i&&kt("span",{children:o})]}));return kt("div",{className:Ni(t,i,_,b,h),style:c?{display:"none"}:void 0,children:[i?D:kt(Ei,{content:o,children:D}),d&&kt(Ji,{slot:"".concat(Fo(t),"-button")}),P&&kt(Ai,{popupMenuId:R.id,buttonId:t,startPos:j,menuRef:T,items:y,setIsOpen:w})]})};function Bi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||Hi(e,t)||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 Hi(e,t){if(e){if("string"==typeof e)return Ui(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ui(e,t):void 0}}function Ui(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zi(e){var t,n=e.btn,r=e.appState,o=e.appConfig,i=e.evaluateProp,u=e.groupStart,a=e.groupMiddle,l=e.groupEnd,c=Bi(n,2),f=c[0],s=c[1],p=null!==(t=s[r.breakpoint])&&void 0!==t?t:{},d=function(e,t,n){var r=Bi(e,2)[1],o=!(!r.panelId||!t.openPanels[r.panelId]);return function(e){if("function"!=typeof r.onClick){if(r.panelId){var i=e.currentTarget;t.dispatch({type:o?"CLOSE_PANEL":"OPEN_PANEL",payload:o?r.panelId:{panelId:r.panelId,props:{triggeringElement:i}}})}}else r.onClick(e,n(function(e){return e},r.pluginId))}}(n,r,i),y=!(!s.panelId||!r.openPanels[s.panelId]);return kt(Li,{buttonId:f,iconId:i(s.iconId,s.pluginId),iconSvgContent:i(s.iconSvgContent,s.pluginId),variant:s.variant,label:i(s.label,s.pluginId),href:i(s.href,s.pluginId),showLabel:p.showLabel,isDisabled:r.disabledButtons.has(f),isHidden:r.hiddenButtons.has(f),isPressed:void 0!==s.isPressed||s.pressedWhen?r.pressedButtons.has(f):void 0,isExpanded:void 0!==s.isExpanded||s.expandedWhen?r.expandedButtons.has(f):void 0,isPanelOpen:y,onClick:d,panelId:s.panelId,menuItems:s.menuItems,idPrefix:o.id,groupStart:u,groupMiddle:a,groupEnd:l},f)}function Fi(e){return Fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fi(e)}var qi=["evaluateProp"];function Wi(e){return function(e){if(Array.isArray(e))return Gi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vi(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.")}()}function Vi(e,t){if(e){if("string"==typeof e)return Gi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zi(Object(n),!0).forEach(function(t){Ki(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ki(e,t,n){return(t=function(e){var t=function(e){if("object"!=Fi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fi(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yi(e){var t=e.evaluateProp,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qi),r=function(e){var t=e.slot,n=e.appState,r=e.evaluateProp,o=n.breakpoint,i=n.mode,u=n.pluginRegistry,a=n.controlConfig;return Object.values(a).filter(function(e){var r,u,a,l;if(ti(e))return!1;var c=e[o];if(!c)return!1;var f=Jo.control.includes(c.slot),s=null===(r=null===(u=e.includeModes)||void 0===u?void 0:u.includes(i))||void 0===r||r,p=null!==(a=null===(l=e.excludeModes)||void 0===l?void 0:l.includes(i))&&void 0!==a&&a;return!(!1===e.inline&&!n.isFullscreen)&&s&&!p&&c.slot===t&&f}).map(function(e){var t,n,i,a=u.registeredPlugins.find(function(t){var n;return null===(n=t.manifest)||void 0===n||null===(n=n.controls)||void 0===n?void 0:n.some(function(t){return t.id===e.id})}),l=null==a?void 0:a.id;return i=e.html?kt("div",{className:"im-c-control",dangerouslySetInnerHTML:{__html:r(e.html,l)}},e.id):kt(Hr(e.render,{pluginId:l,pluginConfig:null==a?void 0:a.config}),{},e.id),{id:e.id,type:"control",order:null!==(t=null===(n=e[o])||void 0===n?void 0:n.order)&&void 0!==t?t:0,element:i}})}($i({evaluateProp:t},n)),o=function(e){var t=e.slot,n=e.appState,r=e.evaluateProp,o=n.breakpoint,i=n.pluginRegistry,u=n.panelConfig,a=n.mode,l=n.openPanels,c=Object.entries(l),f=c.filter(function(e){var t,n=vi(e,1)[0],r=null===(t=u[n])||void 0===t?void 0:t[o];return null==r?void 0:r.modal}),s=f.length>0?f[f.length-1][0]:null;return c.map(function(e){var l,c=vi(e,2),f=c[0],p=c[1].props,d=u[f];if(!d)return null;if(ti(d))return null;var y=d[o];if(!y)return null;var m=Qo(y,o);if(!function(e,t,n,r){var o=r.targetSlot,i=r.slot,u=r.mode,a=r.isFullscreen,l=r.allowedModalPanelId,c="".concat(Fo(e),"-button")===o;return!(!Jo.panel.includes(o)&&!c||!ei(t,u)||!1===t.inline&&!a||o!==i||n.modal&&e!==l)}(f,d,y,{targetSlot:m,slot:t,mode:a,isFullscreen:n.isFullscreen,allowedModalPanelId:s}))return null;var v=i.registeredPlugins.find(function(e){return e.id===d.pluginId}),b=null==v?void 0:v.id,_=d.render?Hr(d.render,yi(yi({},p),{},{pluginId:b,pluginConfig:null==v?void 0:v.config})):null;return{id:f,type:"panel",order:null!==(l=y.order)&&void 0!==l?l:0,element:kt(si,{panelId:f,panelConfig:d,props:p,WrappedChild:_,label:r(d.label,b),html:b?r(d.html,b):d.html},f)}}).filter(Boolean)}($i({evaluateProp:t},n)),i=function(e){var t=e.slot,n=e.appState,r=e.appConfig,o=e.evaluateProp,i=n.buttonConfig,u=n.breakpoint,a=function(e){var t=e.appState,n=e.buttonConfig,r=e.slot,o=e.evaluateProp,i=t.breakpoint,u=t.mode;return n?Object.entries(n).filter(function(e){var n,a,l=Bi(e,2),c=(l[0],l[1]),f=c[i];return!(c.isMenuItem||"function"==typeof c.excludeWhen&&o(c.excludeWhen,c.pluginId)||c.includeModes&&(null===(n=c.includeModes)||void 0===n||!n.includes(u))||null!==(a=c.excludeModes)&&void 0!==a&&a.includes(u)||!1===c.inline&&!t.isFullscreen||(null==f?void 0:f.slot)!==r||!Jo.button.includes(f.slot))}):[]}({appState:n,appConfig:r,buttonConfig:i,slot:t,evaluateProp:o});if(!a.length)return[];var l=new Map;a.forEach(function(e,t){var n=Bi(e,2)[1].group;null!=n&&(l.has(n)||l.set(n,[]),l.get(n).push(t))});var c,f=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Hi(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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,i=!0,u=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw o}}}}(l);try{for(f.s();!(c=f.n()).done;){var s=Bi(c.value,2),p=s[0];s[1].length<2&&l.delete(p)}}catch(e){f.e(e)}finally{f.f()}return a.map(function(e,t){var i,a,c=Bi(e,2),f=c[0],s=c[1],p=s.group,d=null==p?null:l.get(p),y=!!d&&t===d[0],m=!!d&&t===d[d.length-1],v=d&&d.length>=3&&!y&&!m;return{id:f,type:"button",order:null!==(i=null===(a=s[u])||void 0===a?void 0:a.order)&&void 0!==i?i:0,element:zi({btn:e,appState:n,appConfig:r,evaluateProp:o,groupStart:y,groupMiddle:v,groupEnd:m})}})}($i({evaluateProp:t},n)),u=[].concat(Wi(r),Wi(o),Wi(i)),a=u.filter(function(e){return null==e.order||0===e.order}),l=u.filter(function(e){return null!=e.order&&0!==e.order});l.sort(function(e,t){return e.order-t.order});var c,f=Wi(a),s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Vi(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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,i=!0,u=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(u)throw o}}}}(l);try{for(s.s();!(c=s.n()).done;){var p=c.value,d=Math.min(Math.max(p.order-1,0),f.length);f.splice(d,0,p)}}catch(e){s.e(e)}finally{s.f()}return f}var Xi=function(e){var t=e.children,n=Ir(),r=n.openPanels,o=n.panelConfig,i=n.breakpoint,u=bt.Children.toArray(t).find(function(e){var t;return!1===(null===(t=e.props)||void 0===t?void 0:t.isHidden)});return kt("div",{className:["im-c-panel","im-c-actions",!u&&"im-c-actions--hidden",Object.keys(r).some(function(e){var t;return"mobile"===i&&"bottom"===(null===(t=o[e])||void 0===t||null===(t=t[i])||void 0===t?void 0:t.slot)})&&"im-c-actions--border-top"].filter(Boolean).join(" "),children:t})},Ji=function(e){var t=e.slot,n=Yi({slot:t,appConfig:Ot(),appState:Ir(),evaluateProp:Jr()});return n.length?kt(P,{children:"actions"===t?kt(Xi,{slot:t,children:n.map(function(e){return e.element})}):kt(P,{children:n.map(function(e){return e.element})})}):null};function Qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eu(e,t):void 0}}(e,t)||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 eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tu=function(e,t,n,r,o){se(function(){var o=e.current;if(n){var i=function(e,t){return{side:t.sideRef,banner:t.bannerRef,"top-left":t.topLeftColRef,"top-right":t.topRightColRef,inset:t.insetRef,middle:t.middleRef,bottom:t.bottomRef,actions:t.actionsRef,modal:t.modalRef}[e]||null}(t,r);null!=i&&i.current&&(i.current.appendChild(o),o.style.display="")}else o.style.display="none";return function(){o.style.display="none"}},[n,t,r,o,e])},nu=function(e){var t=e.panelId,n=e.config,r=e.isOpen,o=e.openPanelProps,i=e.allowedModalPanelId,u=e.appState,a=de(null),l=u.breakpoint,c=u.mode,f=u.isFullscreen,s=u.layoutRefs,p=n[l],d=p?Qo(p,l):null,y=function(){if(!r||!p||!d)return!1;var e="".concat(Fo(t),"-button")===d;if(!Jo.panel.includes(d)&&!e)return!1;var o=p.modal&&t!==i,u=!1===n.inline&&!f,a=!ei(n,c);return!(o||u||a)}();return tu(a,d,y,s,l),kt(si,{panelId:t,panelConfig:n,props:o,html:n.html,label:n.label,isOpen:r,rootRef:a})},ru=function(e){var t=e.control,n=e.appState,r=de(null),o=n.breakpoint,i=n.mode,u=n.isFullscreen,a=n.layoutRefs,l=t[o],c=function(e,t){var n=t.mode,r=t.isFullscreen,o=e[t.breakpoint];return!(!o||!Jo.control.includes(o.slot)||!ei(e,n)||!1===e.inline&&!r)}(t,{breakpoint:o,mode:i,isFullscreen:u}),f=(null==l?void 0:l.slot)||null;return tu(r,f,c,a,o),kt("div",{ref:r,className:"im-c-control",style:{display:"none"},dangerouslySetInnerHTML:me(function(){return{__html:t.html}},[t.html])})},ou=function(){var e=Ir(),t=e.panelConfig,n=void 0===t?{}:t,r=e.controlConfig,o=void 0===r?{}:r,i=e.openPanels,u=void 0===i?{}:i,a=e.breakpoint,l=me(function(){return Object.entries(n).filter(function(e){var t=Qi(e,2),n=(t[0],t[1]);return ti(n)})},[n]),c=me(function(){return Object.values(o).filter(function(e){return ti(e)})},[o]),f=me(function(){var e=Object.entries(u).filter(function(e){var t,r=Qi(e,1)[0],o=null===(t=n[r])||void 0===t?void 0:t[a];return null==o?void 0:o.modal});return e.length>0?e[e.length-1][0]:null},[u,n,a]);return l.length||c.length?kt(P,{children:[l.map(function(t){var n,r=Qi(t,2),o=r[0],i=r[1];return kt(nu,{panelId:o,config:i,isOpen:!!u[o],openPanelProps:null===(n=u[o])||void 0===n?void 0:n.props,allowedModalPanelId:f,appState:e},o)}),c.map(function(t){return kt(ru,{control:t,appState:e},t.id)})]}):null},iu=function(){var e=Ot().id,t=Ir(),n=t.breakpoint,r=t.interfaceType,o=t.preferredColorScheme,i=t.layoutRefs,u=t.isLayoutReady,a=t.hasExclusiveControl,l=t.isFullscreen,c=Rr().mapStyle;return function(){var e=Ir(),t=e.dispatch,n=e.breakpoint,r=e.layoutRefs,o=Rr(),i=o.mapSize,u=o.isMapReady,a=r.appContainerRef,l=r.mainRef,c=r.bannerRef,f=r.topRef,s=r.topLeftColRef,p=r.topRightColRef,d=r.insetRef,y=r.footerRef,m=r.actionsRef,v=function(){var e=a.current,t=l.current,n=f.current,r=s.current,o=p.current,i=d.current,u=y.current,c=m.current;if(t&&n&&i&&u){var v=document.documentElement,b=Number.parseInt(getComputedStyle(v).getPropertyValue("--divider-gap"),10),_=r.offsetHeight+n.offsetTop,h=t.offsetHeight-_-n.offsetTop;e.style.setProperty("--inset-offset-top","".concat(_,"px")),e.style.setProperty("--inset-max-height","".concat(h,"px"));var g=i.offsetHeight+_,O=Math.min(u.offsetTop,c.offsetTop)-b>g?0:i.offsetLeft+i.offsetWidth;e.style.setProperty("--offset-left","".concat(O,"px"));var S=o.offsetHeight+n.offsetTop,P=t.offsetHeight-u.offsetTop+b;e.style.setProperty("--right-offset-top","".concat(S,"px")),e.style.setProperty("--right-offset-bottom","".concat(P,"px"));var w=r.offsetWidth||0,E=o.offsetWidth||0,j=w||E?Math.max(w,E):0;e.style.setProperty("--top-col-width","".concat(j,"px"))}};pe(function(){requestAnimationFrame(function(){v();var e=bo(r);t({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:e}})})},[n,i,u]),$o([c,l,f,m,y],function(){requestAnimationFrame(function(){v()})})}(),function(){var e=Ir(),t=e.interfaceType,n=e.layoutRefs,r=de(t);r.current=t,se(function(){if(n.appContainerRef.current)return document.addEventListener("focusin",e),document.addEventListener("focusout",t),document.addEventListener("pointerdown",o),function(){document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),document.removeEventListener("pointerdown",o)};function e(e){e.target.dataset.focusVisible="keyboard"===r.current}function t(e){delete e.target.dataset.focusVisible}function o(){delete document.activeElement.dataset.focusVisible}},[n.appContainerRef])}(),kt("div",{id:"".concat(e,"-im-app"),className:["im-o-app","im-o-app--".concat(n),"im-o-app--".concat(r),"im-o-app--".concat(l?"fullscreen":"inline"),"im-o-app--".concat((null==c?void 0:c.appColorScheme)||o,"-app"),"im-o-app--".concat((null==c?void 0:c.mapColorScheme)||"light","-map"),a&&"im-o-app--exclusive-control"].filter(Boolean).join(" "),style:{backgroundColor:(null==c?void 0:c.backgroundColor)||void 0},ref:i.appContainerRef,children:[kt(Go,{keyboardHintPortalRef:i.topRef}),kt("div",{className:"im-o-app__overlay".concat(u?"":" im-o-app__overlay--not-ready"),children:[kt("div",{className:"im-o-app__side",ref:i.sideRef,children:kt(Ji,{slot:Xo.SIDE})}),kt("div",{className:"im-o-app__main",ref:i.mainRef,children:[["mobile","tablet"].includes(n)&&kt("div",{className:"im-o-app__banner",ref:i.bannerRef,children:kt(Ji,{slot:Xo.BANNER})}),kt("div",{className:"im-o-app__top",ref:i.topRef,children:[kt("div",{className:"im-o-app__top-col",ref:i.topLeftColRef,children:kt(Ji,{slot:Xo.TOP_LEFT})}),kt("div",{className:"im-o-app__top-col",children:[kt(Ji,{slot:Xo.TOP_MIDDLE}),["desktop"].includes(n)&&kt("div",{className:"im-o-app__banner",ref:i.bannerRef,children:kt(Ji,{slot:Xo.BANNER})})]}),kt("div",{className:"im-o-app__top-col",ref:i.topRightColRef,children:kt(Ji,{slot:Xo.TOP_RIGHT})})]}),kt("div",{className:"im-o-app__inset",ref:i.insetRef,children:kt(Ji,{slot:Xo.INSET})}),kt("div",{className:"im-o-app__right",ref:i.rightRef,children:[kt("div",{className:"im-o-app__right-top",children:kt(Ji,{slot:Xo.RIGHT_TOP})}),kt("div",{className:"im-o-app__right-bottom",children:kt(Ji,{slot:Xo.RIGHT_BOTTOM})})]}),kt("div",{className:"im-o-app__middle",ref:i.middleRef,children:kt(Ji,{slot:Xo.MIDDLE})}),kt("div",{className:"im-o-app__footer",ref:i.footerRef,children:[kt("div",{className:"im-o-app__footer-col",children:kt(Ko,{})}),kt("div",{className:"im-o-app__footer-col",children:[kt(Ji,{slot:Xo.FOOTER_RIGHT}),kt("div",{className:"im-o-app__attributions",children:kt(Yo,{})})]})]}),kt("div",{className:"im-o-app__bottom",ref:i.bottomRef,children:kt(Ji,{slot:Xo.BOTTOM})}),kt("div",{className:"im-o-app__actions",ref:i.actionsRef,children:kt(Ji,{slot:Xo.ACTIONS})})]})]}),kt(ou,{}),kt("div",{className:"im-o-app__modal",ref:i.modalRef,children:[kt(Ji,{slot:Xo.MODAL}),kt("div",{className:"im-o-app__modal-backdrop"})]})]})},uu=function(e){return se(function(){(0,Or.i)(),e.eventBus.emit(ht.q.APP_READY)},[]),kt(rr,{options:e,children:kt(br,{options:e,children:kt(gr,{eventBus:e.eventBus,children:kt(Tr,{children:[kt(uo,{}),kt(iu,{})]})})})})};function au(e){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},au(e)}var lu=["id","load","manifest"],cu=["InitComponent","api","reducer"],fu=["MapProvider","mapProviderConfig","mapFramework","plugins"];function su(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?su(Object(n),!0).forEach(function(t){du(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):su(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function du(e,t,n){return(t=function(e){var t=function(e){if("object"!=au(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=au(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==au(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yu(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof a?r:a,c=Object.create(l.prototype);return mu(c,"_invoke",function(n,r,o){var i,a,l,c=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,l=e,p.n=n,u}};function d(n,r){for(a=n,l=r,t=0;!s&&c&&!o&&t<f.length;t++){var o,i=f[t],d=p.p,y=i[2];n>3?(o=y===r)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(a=0,p.v=r,p.n=i[1]):d<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,p.n=y,a=0))}if(o||n>1)return u;throw s=!0,r}return function(o,f,y){if(c>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,y),a=f,l=y;(t=a<2?e:l)||!s;){i||(a?a<3?(a>1&&(p.n=-1),d(a,l)):p.n=l:p.v=l);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(s=p.n<0)?l:n.call(r,p))!==u)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:s}}}(n,o,i),!0),c}var u={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(mu(t={},r,function(){return this}),t),s=c.prototype=a.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,mu(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return l.prototype=c,mu(s,"constructor",c),mu(c,"constructor",l),l.displayName="GeneratorFunction",mu(c,o,"GeneratorFunction"),mu(s),mu(s,o,"Generator"),mu(s,r,function(){return this}),mu(s,"toString",function(){return"[object Generator]"}),(yu=function(){return{w:i,m:p}})()}function mu(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mu=function(e,t,n,r){function i(t,n){mu(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},mu(e,t,n,r)}function vu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bu(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw i}}}}function _u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hu(e,t,n,r,o,i,u){try{var a=e[i](u),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function gu(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){hu(i,r,o,u,a,"next",e)}function a(e){hu(i,r,o,u,a,"throw",e)}u(void 0)})}}var Ou=new WeakMap,Su=new WeakMap,Pu=new WeakMap,wu=function(e){var t,n,r,o,i,u,a,l=Pu.get(e);if(!l){var c=rn(),f=(n={},{registerPanel:function(e){n=sn(n,e)},addPanel:function(e,t){return(n=pn(n,e,t))[e]},removePanel:function(e){n=dn(n,e)},getPanelConfig:function(){return n},clear:function(){n={}}}),s=(t={},{registerControl:function(e){t=_n(t,e)},addControl:function(e,n){return(t=hn(t,e,n))[e]},getControlConfig:function(){return t},clear:function(){t={}}});l={buttonRegistry:c,panelRegistry:f,controlRegistry:s,pluginRegistry:(r={registerButton:c.registerButton,registerPanel:f.registerPanel,registerControl:s.registerControl},o=r.registerButton,i=r.registerPanel,u=r.registerControl,a=[],{registeredPlugins:a,registerPlugin:function(e){var t,n,r=e.manifest,l={pluginId:e.id,includeModes:null===(t=e.config)||void 0===t?void 0:t.includeModes,excludeModes:null===(n=e.config)||void 0===n?void 0:n.excludeModes};r.buttons&&In(r.buttons).forEach(function(e){var t;o(kn({},e.id,Tn(Tn({},l),e))),null==e||null===(t=e.menuItems)||void 0===t||t.forEach(function(e){o(kn({},e.id,Tn(Tn(Tn({},l),e),{},{isMenuItem:!0})))})}),r.panels&&In(r.panels).forEach(function(e){i(kn({},e.id,Tn(Tn({},l),e)))}),r.controls&&In(r.controls).forEach(function(e){u(kn({},e.id,Tn(Tn({},l),e)))}),r.icons&&In(r.icons).forEach(function(e){return function(e){wn=Sn(Sn({},wn),e)}(kn({},e.id,e.svgContent))}),r.keyboardShortcuts&&In(r.keyboardShortcuts).forEach(function(e){return function(e){var t=e.shortcut;Et.has(t.id)||(Et.add(t.id),wt.push(t))}(Tn(Tn({},l),{},{shortcut:e}))}),a.push(e)},clear:function(){a.length=0}})},Pu.set(e,l)}return l},Eu=function(){var e=gu(yu().m(function e(t,n){var r,o,i,u,a,l,c,f,s,p,d,y,m;return yu().w(function(e){for(;;)switch(e.p=e.n){case 0:r=bu(t),e.p=1,r.s();case 2:if((o=r.n()).done){e.n=5;break}if("function"!=typeof(i=o.value).load){e.n=4;break}return e.n=3,i.load();case 3:u=e.v,a=i.id,i.load,l=i.manifest,c=vu(i,lu),f=u.InitComponent,s=u.api,p=u.reducer,d=vu(u,cu),y=Nn(d,l),n({id:a,InitComponent:f,api:s,reducer:p,config:c,manifest:y,_originalPlugin:i});case 4:e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,m=e.v,r.e(m);case 7:return e.p=7,r.f(),e.f(7);case 8:return e.a(2)}},e,null,[[1,6,7,8]])}));return function(t,n){return e.apply(this,arguments)}}();function ju(e,t){return Au.apply(this,arguments)}function Au(){return(Au=gu(yu().m(function e(t,n){var r,o,i,u,a,l,c,f,s,p,d,y,m,v,b,_,h;return yu().w(function(e){for(;;)switch(e.n){case 0:return o=n.MapProvider,i=n.mapProviderConfig,u=n.mapFramework,a=n.plugins,l=void 0===a?[]:a,c=vu(n,fu),f=c.eventBus,(s=Su.get(t))||(s=new o({mapFramework:u,mapProviderConfig:i,events:ht.q,eventBus:f}),Su.set(t,s)),null!==(r=s.capabilities)&&void 0!==r&&r.supportedShortcuts&&At(s.capabilities.supportedShortcuts),p=wu(t),d=p.buttonRegistry,y=p.panelRegistry,m=p.controlRegistry,v=p.pluginRegistry,b=v.registerPlugin,v.clear(),b({id:"appConfig",manifest:Ht}),(_=Ou.get(t))||(_=_t(t),Ou.set(t,_)),h={_root:_,on:f.on,off:f.off,emit:f.emit,unmount:function(){var e,n;_.unmount(),Ou.delete(t),null===(e=(n=s).destroyMap)||void 0===e||e.call(n),Su.delete(t),v.clear()}},e.n=1,Eu(l,b);case 1:return _.render(kt(uu,pu(pu({},c),{},{buttonRegistry:d,panelRegistry:y,controlRegistry:m,pluginRegistry:v,mapProvider:s}))),e.a(2,h)}},e)}))).apply(this,arguments)}}};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"@babel/runtime/helpers/asyncToGenerator";import{createRoot as n}from"preact/compat/client";import{g as o,E as i,s as a,r as l,t as c,a as s}from"./im-shell.js";import p,{useContext as d,createContext as u,useEffect as f,useRef as v,useReducer as m,useCallback as b,useMemo as g,useLayoutEffect as y,useState as h,createPortal as O,cloneElement as P}from"preact/compat";import{jsx as E,jsxs as _,Fragment as w}from"preact/jsx-runtime";var j=u(null);function S(){return d(j)}var R=[{id:"showKeyboardHelp",group:"General",title:"Show keyboard help",command:"<kbd>Alt</kbd> + <kbd>K</kbd>",enabled:!0},{id:"selectControl",group:"General",title:"Select a map control",command:"<kbd>Tab</kbd> or <kbd>Shift</kbd> + <kbd>Tab</kbd>",enabled:!0},{id:"moveLarge",group:"Navigation",title:"Move in large steps",command:"<kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!0},{id:"nudgeMap",group:"Navigation",title:"Nudge map",command:"<kbd>Shift</kbd> + <kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd> or <kbd>↓</kbd>",enabled:!1},{id:"zoomLarge",group:"Navigation",title:"Zoom in large steps",command:"<kbd>+</kbd> or <kbd>-</kbd>",enabled:!0},{id:"nudgeZoom",group:"Navigation",title:"Nudge zoom",command:"<kbd>Shift</kbd> + <kbd>+</kbd> or <kbd>-</kbd>",enabled:!1},{id:"highlightLabelAtCenter",group:"Labels",title:"Highlight label at centre",command:"<kbd>Alt</kbd> + <kbd>Enter</kbd>",enabled:!1,requiredConfig:["readMapText"]},{id:"highlightNextLabel",group:"Labels",title:"Highlight nearby label",command:"<kbd>Alt</kbd> + <kbd>→</kbd>, <kbd>←</kbd>, <kbd>↑</kbd> or <kbd>↓</kbd>",enabled:!1,requiredConfig:["readMapText"]}],T=[],D=new Set,k=new Set,A=()=>{var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[...R.filter(t=>!!k.has(t.id)&&(!t.requiredConfig||t.requiredConfig.every(t=>e[t]))),...T]}(S()).reduce((e,t)=>(e[t.group]=e[t.group]||[],e[t.group].push(t),e),{});return E("div",{className:"im-c-keyboard-help",children:Object.entries(e).map(e=>{var[t,r]=e;return E("div",{className:"im-c-keyboard-help__group",children:E("dl",{className:"im-c-keyboard-help__list",children:r.map(e=>_("div",{className:"im-c-keyboard-help__item",children:[E("dt",{className:"im-c-keyboard-help__title",children:e.title}),E("dd",{className:"im-c-keyboard-help__description",dangerouslySetInnerHTML:{__html:e.command}})]},e.id))})},t)})})};function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?M(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var I={slot:"middle",initiallyOpen:!1,dismissable:!0,modal:!0},L={slot:"right-top",showLabel:!1},N={slot:"top-left",showLabel:!1},B={buttons:[{id:"exit",label:"Exit",iconId:"close",onClick:(e,t)=>{var{services:r}=t;return r.closeApp()},excludeWhen:e=>{var{appConfig:t,appState:r}=e;return!t.hasExitButton||!(r.isFullscreen&&new URL(window.location.href).searchParams.has(t.mapViewParamKey))},mobile:N,tablet:N,desktop:N},{id:"fullscreen",label:()=>"".concat(document.fullscreenElement?"Exit":"Enter"," fullscreen"),iconId:()=>document.fullscreenElement?"minimise":"maximise",onClick:(e,t)=>{var{appState:r}=t,n=r.layoutRefs.appContainerRef.current;document.fullscreenElement?document.exitFullscreen():n.requestFullscreen()},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableFullscreen||t.isFullscreen},mobile:L,tablet:L,desktop:L},{id:"zoomIn",group:"zoom",label:"Zoom in",iconId:"plus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomIn(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMaxZoom},mobile:L,tablet:L,desktop:L},{id:"zoomOut",group:"zoom",label:"Zoom out",iconId:"minus",onClick:(e,t)=>{var{mapProvider:r,appConfig:n}=t;return r.zoomOut(n.zoomDelta)},excludeWhen:e=>{var{appState:t,appConfig:r}=e;return!r.enableZoomControls||"touch"===t.interfaceType},enableWhen:e=>{var{mapState:t}=e;return!t.isAtMinZoom},mobile:L,tablet:L,desktop:L}],panels:[{id:"keyboardHelp",label:"Keyboard shortcuts",mobile:C({},I),tablet:C(C({},I),{},{width:"500px"}),desktop:C(C({},I),{},{width:"500px"}),render:()=>E(A,{})}],icons:[{id:"maximise",svgContent:'<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>'},{id:"minimise",svgContent:'<path d="m14 10 7-7"/><path d="M20 10h-6V4"/><path d="m3 21 7-7"/><path d="M4 14h6v6"/>'},{id:"plus",svgContent:'<path d="M5 12h14"/><path d="M12 5v14"/>'},{id:"minus",svgContent:'<path d="M5 12h14"/>'}]},x={slot:"right-top",showLabel:!1},z={label:"Button",mobile:x,tablet:x,desktop:x},H={showLabel:!0,label:"Panel",mobile:{slot:"bottom",initiallyOpen:!0,dismissable:!0,modal:!1},tablet:{slot:"inset",initiallyOpen:!0,dismissable:!0,modal:!1},desktop:{slot:"inset",initiallyOpen:!0,dismissable:!0,modal:!1},render:null,html:null},F={label:"Control",mobile:{slot:"bottom"},tablet:{slot:"inset"},desktop:{slot:"inset"}},U={small:1,medium:1.5,large:2},G=[{shape:"pin",backgroundPath:"M31 16.001c0 7.489-8.308 15.289-11.098 17.698-.533.4-1.271.4-1.803 0C15.309 31.29 7 23.49 7 16.001c0-6.583 5.417-12 12-12s12 5.417 12 12z",graphicPath:"M19 11.001c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.241 5-5-2.24-5-5-5z"}];function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var W=(t,r)=>{var n=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?V(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t);for(var o in r)"object"!=typeof r[o]||Array.isArray(r[o])||null===r[o]?n[o]=r[o]:n[o]=W(t[o]||{},r[o]);return n};function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function K(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Z(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Y=(e,t)=>K(K({},e),t),q=(e,t,r)=>{var n=W(z,r);return K(K({},e),{},{[t]:n})};function X(){var e={};return{registerButton:t=>{e=Y(e,t)},addButton:(t,r)=>(e=q(e,t,r),t),getButtonConfig:t=>((e,t)=>t?Object.fromEntries(Object.entries(e).filter(e=>{var[r,n]=e;return n.pluginId===t})):e)(e,t),clear:()=>{e={}}}}function $(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?J(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ee=(e,t)=>{var r=Object.fromEntries(Object.entries(t).map(e=>{var[t,r]=e;return[t,Q({showLabel:!0},r)]}));return Q(Q({},e),r)},te=(e,t,r)=>{var n=W(H,r);return Q(Q({},e),{},{[t]:Q(Q({},n),{},{html:n.html,render:n.render})})},re=(e,r)=>{var{[r]:n}=e;return t(e,[r].map($))};function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ne(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var ie=(e,t)=>oe(oe({},e),t),ae=(e,t,r)=>{var n=W(F,r);return oe(oe({},e),{},{[t]:oe({id:t},n)})};function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ce(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?le(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var se={close:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'},pe=()=>se;function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ue(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?de(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var fe=e=>Array.isArray(e)?e:[e];function ve(e){var{registerButton:t,registerPanel:r,registerControl:n}=e,o=[];return{registeredPlugins:o,registerPlugin:function(e){var i,a,{manifest:l}=e,c={pluginId:e.id,includeModes:null===(i=e.config)||void 0===i?void 0:i.includeModes,excludeModes:null===(a=e.config)||void 0===a?void 0:a.excludeModes};l.buttons&&fe(l.buttons).forEach(e=>{var r;t({[e.id]:ue(ue({},c),e)}),null==e||null===(r=e.menuItems)||void 0===r||r.forEach(e=>{t({[e.id]:ue(ue(ue({},c),e),{},{isMenuItem:!0})})})}),l.panels&&fe(l.panels).forEach(e=>{r({[e.id]:ue(ue({},c),e)})}),l.controls&&fe(l.controls).forEach(e=>{n({[e.id]:ue(ue({},c),e)})}),l.icons&&fe(l.icons).forEach(e=>(e=>{se=ce(ce({},se),e)})({[e.id]:e.svgContent})),l.keyboardShortcuts&&fe(l.keyboardShortcuts).forEach(e=>(e=>{var{shortcut:t}=e;D.has(t.id)||(D.add(t.id),T.push(t))})(ue(ue({},c),{},{shortcut:e}))),o.push(e)},clear:function(){o.length=0}}}function me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function be(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?me(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]);var r=new Map(e.map(e=>[e.id,e]));return t.forEach(e=>{null!=e&&e.id&&(r.has(e.id)?r.set(e.id,be(be({},r.get(e.id)),e)):r.set(e.id,e))}),Array.from(r.values())},n=be(be({},e),t);return(e.buttons||t.buttons)&&(n.buttons=r(e.buttons,t.buttons)),(e.panels||t.panels)&&(n.panels=r(e.panels,t.panels)),(e.controls||t.controls)&&(n.controls=r(e.controls,t.controls)),(e.icons||t.icons)&&(n.icons=r(e.icons,t.icons)),n}function ye(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return Object.keys(e).forEach(o=>{var i,a=e[o][t];null!==(i=null==a?void 0:a.initiallyOpen)&&void 0!==i&&i&&(n[o]=r[o]||{props:{}})}),n}function he(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pe(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ee(e,t,r,n){var o,i=e.panelConfig||e.panelRegistry.getPanelConfig(),a=null===(o=i[t])||void 0===o?void 0:o[r],l=!!a.exclusive&&!a.modal,c=!!a.modal,s=Object.fromEntries(Object.entries(e.openPanels).filter(e=>{var t,[n]=e;return!(null!==(t=i[n])&&void 0!==t&&null!==(t=t[r])&&void 0!==t&&t.exclusive)}));return Pe(Pe(Pe({},l?{}:s),c?e.openPanels:{}),{},{[t]:{props:n}})}var _e={SET_BREAKPOINT:(e,t)=>{var r,{behaviour:n,hybridWidth:i,maxMobileWidth:a}=t,l=Object.keys(e.openPanels),c=l[l.length-1],s="hybrid"===n?e.isFullscreen:o({behaviour:n,hybridWidth:i,maxMobileWidth:a});return Pe(Pe({},e),{},{breakpoint:t.breakpoint,isFullscreen:s,previousOpenPanels:e.openPanels,openPanels:c?Ee(e,c,t.breakpoint,(null===(r=e.openPanels[c])||void 0===r?void 0:r.props)||{}):{}})},SET_MEDIA:(e,t)=>Pe(Pe({},e),t),SET_HYBRID_FULLSCREEN:(e,t)=>Pe(Pe({},e),{},{isFullscreen:t}),SET_INTERFACE_TYPE:(e,t)=>e.interfaceType===t?e:Pe(Pe({},e),{},{interfaceType:t}),SET_MODE:(e,t)=>{var r=e.panelConfig||e.panelRegistry.getPanelConfig();return Pe(Pe({},e),{},{mode:t,previousMode:e.mode,openPanels:ye(r,e.breakpoint,e.openPanels)})},SET_SAFE_ZONE_INSET:(e,t)=>{var{safeZoneInset:r,syncMapPadding:n=!0}=t;return((e,t)=>{if(e===t)return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t)return!1;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.is(e[r],t[r]))})(e.safeZoneInset,r)?e:Pe(Pe({},e),{},{safeZoneInset:r,syncMapPadding:n,isLayoutReady:!0})},REVERT_MODE:e=>{var t=e.panelConfig||e.panelRegistry.getPanelConfig();return Pe(Pe({},e),{},{mode:e.previousMode,previousMode:e.mode,openPanels:ye(t,e.breakpoint,e.openPanels)})},OPEN_PANEL:(e,t)=>{var{panelId:r,props:n={}}=t;return Pe(Pe({},e),{},{previousOpenPanels:e.openPanels,openPanels:Ee(e,r,e.breakpoint,n)})},CLOSE_PANEL:(e,r)=>{var n=e.openPanels,{[r]:o}=n,i=t(n,[r].map(he));return Pe(Pe({},e),{},{previousOpenPanels:e.openPanels,openPanels:i})},CLOSE_ALL_PANELS:e=>Pe(Pe({},e),{},{previousOpenPanels:e.openPanels,openPanels:{}}),RESTORE_PREVIOUS_PANELS:e=>Pe(Pe({},e),{},{openPanels:e.previousOpenPanels||{},previousOpenPanels:e.openPanels}),TOGGLE_HAS_EXCLUSIVE_CONTROL:(e,t)=>Pe(Pe({},e),{},{hasExclusiveControl:t}),TOGGLE_BUTTON_DISABLED:(e,t)=>{var{id:r,isDisabled:n}=t,o=new Set(e.disabledButtons);return n?o.add(r):o.delete(r),Pe(Pe({},e),{},{disabledButtons:o})},TOGGLE_BUTTON_HIDDEN:(e,t)=>{var{id:r,isHidden:n}=t,o=new Set(e.hiddenButtons);return n?o.add(r):o.delete(r),Pe(Pe({},e),{},{hiddenButtons:o})},TOGGLE_BUTTON_PRESSED:(e,t)=>{var{id:r,isPressed:n}=t,o=new Set(e.pressedButtons);return n?o.add(r):o.delete(r),Pe(Pe({},e),{},{pressedButtons:o})},TOGGLE_BUTTON_EXPANDED:(e,t)=>{var{id:r,isExpanded:n}=t,o=new Set(e.expandedButtons);return n?o.add(r):o.delete(r),Pe(Pe({},e),{},{expandedButtons:o})},REGISTER_BUTTON:(e,t)=>Pe(Pe({},e),{},{buttonConfig:Y(e.buttonConfig,t)}),ADD_BUTTON:(e,t)=>{var r,{id:n,config:o}=t,i=q(e.buttonConfig,n,o),a=new Set(e.hiddenButtons);o.isHidden&&a.add(n);var l=new Set(e.disabledButtons);o.isDisabled&&l.add(n);var c=new Set(e.pressedButtons);o.isPressed&&c.add(n);var s=new Set(e.expandedButtons);return o.isExpanded&&s.add(n),null!==(r=e.buttonRegistry)&&void 0!==r&&r.addButton&&e.buttonRegistry.addButton(n,o),Pe(Pe({},e),{},{buttonConfig:i,hiddenButtons:a,disabledButtons:l,pressedButtons:c,expandedButtons:s})},REGISTER_PANEL:(e,t)=>Pe(Pe({},e),{},{panelConfig:ee(e.panelConfig,t)}),ADD_PANEL:(e,t)=>{var r,{id:n,config:o}=t,i=te(e.panelConfig,n,o),a=i[n];null!==(r=e.panelRegistry)&&void 0!==r&&r.addPanel&&e.panelRegistry.addPanel(n,o);var l=null==a?void 0:a[e.breakpoint],c=null==l?void 0:l.initiallyOpen;return Pe(Pe({},e),{},{panelConfig:i,openPanels:c?Ee(Pe(Pe({},e),{},{panelConfig:i}),n,e.breakpoint,{}):e.openPanels})},REMOVE_PANEL:(e,r)=>{var n,o=r,i=e.openPanels,{[o]:a}=i,l=t(i,[o].map(he));return null!==(n=e.panelRegistry)&&void 0!==n&&n.removePanel&&e.panelRegistry.removePanel(o),Pe(Pe({},e),{},{panelConfig:re(e.panelConfig,o),openPanels:l})},REGISTER_CONTROL:(e,t)=>Pe(Pe({},e),{},{controlConfig:ie(e.controlConfig,t)}),ADD_CONTROL:(e,t)=>{var r,{id:n,config:o}=t,i=ae(e.controlConfig,n,o);return null!==(r=e.controlRegistry)&&void 0!==r&&r.addControl&&e.controlRegistry.addControl(n,o),Pe(Pe({},e),{},{controlConfig:i})}};function we(){return{preferredColorScheme:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",prefersReducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches}}var je=(e,t)=>{var{type:r,payload:n}=t,o=_e[r];return o?o(e,n):e};function Se(e,t,r,n){var{type:o,payload:a}=e;if("CLOSE_PANEL"===o&&queueMicrotask(()=>{n.emit(i.APP_PANEL_CLOSED,{panelId:a})}),"CLOSE_ALL_PANELS"===o&&queueMicrotask(()=>{Object.keys(t.openPanels).forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})})}),"OPEN_PANEL"===o){var{panelId:l,props:c}=a,s=function(e,t,r,n){var o,i=null===(o=n[e])||void 0===o?void 0:o[r],a=!(null==i||!i.exclusive||null!=i&&i.modal),l=!(null==i||!i.modal),c=[];if(l)return c;var s=Object.keys(t);return a?s.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null!=o&&o.exclusive||c.push(e)}):s.forEach(e=>{var t,o=null===(t=n[e])||void 0===t?void 0:t[r];null==o||!o.exclusive||null!=o&&o.modal||c.push(e)}),c}(l,t.openPanels,t.breakpoint,r);queueMicrotask(()=>{s.forEach(e=>{n.emit(i.APP_PANEL_CLOSED,{panelId:e})}),n.emit(i.APP_PANEL_OPENED,{panelId:l,props:c})})}}function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Te(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var De=u(null),ke=e=>{var{options:t,children:r}=e,{pluginRegistry:n,buttonRegistry:l,panelRegistry:c,controlRegistry:s,eventBus:p,breakpointDetector:d}=t,u={appContainerRef:v(null),sideRef:v(null),mainRef:v(null),topRef:v(null),topLeftColRef:v(null),topRightColRef:v(null),insetRef:v(null),rightRef:v(null),middleRef:v(null),bottomRef:v(null),footerRef:v(null),actionsRef:v(null),bannerRef:v(null),modalRef:v(null),viewportRef:v(null)},y=v({}),[h,O]=m(je,(e=>{var{initialBreakpoint:t,initialInterfaceType:r,appColorScheme:n,autoColorScheme:i,pluginRegistry:a,buttonRegistry:l,panelRegistry:c,controlRegistry:s,mode:p}=e,{preferredColorScheme:d,prefersReducedMotion:u}=we(),f=o(e),v=ye(c.getPanelConfig(),t);return{isLayoutReady:!1,breakpoint:t,interfaceType:r,preferredColorScheme:i?d:n,prefersReducedMotion:u,isFullscreen:f,mode:p||null,previousMode:null,safeZoneInset:null,disabledButtons:new Set,hiddenButtons:new Set,pressedButtons:new Set,expandedButtons:new Set,hasExclusiveControl:!1,openPanels:v,previousOpenPanels:{},syncMapPadding:!0,pluginRegistry:a,buttonRegistry:l,panelRegistry:c,controlRegistry:s,buttonConfig:l.getButtonConfig(),panelConfig:c.getPanelConfig(),controlConfig:s.getControlConfig()}})(t)),P=b(e=>{var r=h.panelConfig||t.panelRegistry.getPanelConfig(),n=h;O(e),Se(e,n,r,p)},[h,t,p]);!function(e,t){var{appColorScheme:r,autoColorScheme:n,behaviour:o,hybridWidth:i,maxMobileWidth:a}=t;f(()=>{var t=[window.matchMedia("(prefers-color-scheme: dark)"),window.matchMedia("(prefers-reduced-motion: reduce)")];function l(){var{preferredColorScheme:t,prefersReducedMotion:o}=we();e({type:"SET_MEDIA",payload:{preferredColorScheme:n?t:r,prefersReducedMotion:o}})}t.forEach(e=>e.addEventListener("change",l));var c=null,s=null;if("hybrid"===o){var p=null!=i?i:a;c=window.matchMedia("(max-width: ".concat(p,"px)")),s=t=>{e({type:"SET_HYBRID_FULLSCREEN",payload:t.matches})},c.addEventListener("change",s)}return()=>{t.forEach(e=>e.removeEventListener("change",l)),c&&s&&c.removeEventListener("change",s)}},[e,o,i,a])}(O,t);var _=e=>{P({type:"SET_MODE",payload:e})},w=()=>{P({type:"REVERT_MODE"})};f(()=>{p.on(i.APP_SET_MODE,_),p.on(i.APP_REVERT_MODE,w);var e=d.subscribe(e=>{P({type:"SET_BREAKPOINT",payload:{behaviour:t.behaviour,breakpoint:e,hybridWidth:t.hybridWidth,maxMobileWidth:t.maxMobileWidth}})}),r=a(e=>{P({type:"SET_INTERFACE_TYPE",payload:e})});return()=>{p.off(i.APP_SET_MODE,_),p.off(i.APP_REVERT_MODE,w),e(),r()}},[]);var S=g(()=>Te(Te({},h),{},{dispatch:P,layoutRefs:u,buttonRefs:y,pluginRegistry:n,buttonRegistry:l,panelRegistry:c,controlRegistry:s}),[h,P]);return E(j.Provider,{value:t,children:E(De.Provider,{value:S,children:r})})};function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ae(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ce=(e,t)=>Me(Me({},e),t),Ie={SET_MAP_READY:(e,t)=>Me(Me({},e),{},{isMapReady:!0,mapProvider:t}),MAP_MOVE:Ce,MAP_MOVE_END:Ce,MAP_FIRST_IDLE:Ce,SET_MAP_STYLE:(e,t)=>Me(Me({},e),{},{mapStyle:t}),SET_MAP_SIZE:(e,t)=>Me(Me({},e),{},{mapSize:t}),UPDATE_CROSS_HAIR:(e,t)=>Me(Me({},e),{},{crossHair:Me(Me({},e.crossHair),t)}),UPSERT_LOCATION_MARKER:(e,t)=>{var r=new Map(e.markers.items.map(e=>[e.id,e]));r.set(t.id,t);var n=Array.from(r.values());return Me(Me({},e),{},{markers:Me(Me({},e.markers),{},{items:n})})},REMOVE_LOCATION_MARKER:(e,t)=>{var r=e.markers.items.filter(e=>e.id!==t);return Me(Me({},e),{},{markers:Me(Me({},e.markers),{},{items:r})})}},Le=(e,t)=>{var{type:r,payload:n}=t,o=Ie[r];return o?o(e,n):e};function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Be(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ne(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var xe=u(null),ze=e=>{var{options:t,children:r}=e,[n,o]=m(Le,(e=>{var{center:t,zoom:r,bounds:n,extent:o,mapStyle:i,mapSize:a,markers:l}=e,{registeredPlugins:c}=e.pluginRegistry;return{isMapReady:!1,mapProvider:null,mapStyle:null!=c&&c.find(e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.handlesMapStyle})?null:i,mapSize:a,center:t,zoom:r,bounds:n||o,resolution:null,isAtMaxZoom:null,isAtMinZoom:null,crossHair:{isVisible:!1,isPinnedToMap:!1,state:"active"},markers:{items:l||[]}}})(t)),a=e=>{o({type:"SET_MAP_READY",payload:e})},l=e=>{var r=localStorage.getItem("".concat(t.id,":mapStyleId")),n=e.find(e=>e.id===r)||e[0],i=localStorage.getItem("".concat(t.id,":mapSize"))||t.mapSize;o({type:"SET_MAP_STYLE",payload:n}),o({type:"SET_MAP_SIZE",payload:i})},c=e=>{o({type:"SET_MAP_STYLE",payload:e})},s=e=>{o({type:"SET_MAP_SIZE",payload:e})},{eventBus:p}=t;f(()=>(p.on(i.MAP_READY,a),p.on(i.MAP_INIT_MAP_STYLES,l),p.on(i.MAP_SET_STYLE,c),p.on(i.MAP_SET_SIZE,s),()=>{p.off(i.MAP_READY,a),p.off(i.MAP_INIT_MAP_STYLES,l),p.off(i.MAP_SET_STYLE,c),p.off(i.MAP_SET_SIZE,s)}),[]),f(()=>{n.mapStyle&&n.mapSize&&(localStorage.setItem("".concat(t.id,":mapStyleId"),n.mapStyle.id),localStorage.setItem("".concat(t.id,":mapSize"),n.mapSize))},[n.mapStyle,n.mapSize]);var d=g(()=>Be(Be({},n),{},{dispatch:o}),[n]);return E(xe.Provider,{value:d,children:r})};function He(e){var t,r,n,o,i=!1,a=t=>{null!=e&&e.current&&t&&(e.current.textContent="",setTimeout(()=>{e.current&&(e.current.textContent=t)},100))},l=(t=a,r=500,n=null,o=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];clearTimeout(n),n=setTimeout(()=>{t(...o)},r)},o.cancel=()=>{n&&(clearTimeout(n),n=null)},o);return function(e){if(e)return"plugin"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core")?(i=!0,void a(e)):void(i?i=!1:l(e))}}var Fe=u(null),Ue=e=>{var{eventBus:t,children:r}=e,{id:n,handleExitClick:o}=S(),a=v(null),c=g(()=>He(a),[]),s=g(()=>({announce:c,reverseGeocode:(e,t)=>l(e,t),events:i,eventBus:t,mapStatusRef:a,closeApp:()=>function(e,t,r){var n;r.emit(i.MAP_EXIT,{mapId:e}),null!==(n=history.state)&&void 0!==n&&n.isBack?history.back():t()}(n,o,t)}),[c]);return E(Fe.Provider,{value:s,children:r})};function Ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ve(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ge(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var We=u(null);var Ze=e=>{var{children:t}=e,{pluginRegistry:r}=S(),n={},o={},i=v({});r.registeredPlugins.forEach(e=>{var t=e.reducer;if(t){var{initialState:r,actions:a}=t;n[e.id]=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=null==e?void 0:e[null==r?void 0:r.type];return n?n(t,r.payload):t}}(a),o[e.id]=r}i.current[e.id]||(i.current[e.id]={})});var[a,l]=m((e,t)=>{var{pluginId:r}=t;return r&&n[r]?Ve(Ve({},e),{},{[r]:n[r](e[r],t)}):e},o),c=(e,t)=>(i.current[e]||(i.current[e]={}),i.current[e][t]||(i.current[e][t]=p.createRef()),i.current[e][t]),s=g(()=>({state:a,dispatch:l,refs:i,getPluginRef:c}),[a,l]);return E(We.Provider,{value:s,children:t})},Ke=e=>{var t=d(We);if(!t)throw new Error("usePlugin must be used within PluginProvider");var{state:r,dispatch:n,refs:o,getPluginRef:i}=t;return o.current[e]||(o.current[e]={}),Ve(Ve({},r[e]),{},{dispatch:t=>n(Ve(Ve({},t),{},{pluginId:e})),refs:o.current[e],useRef:t=>i(e,t)})};function Ye(){return d(De)}function qe(){return d(xe)}function Xe(){return d(Fe)}function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Je(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?$e(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Qe=new Map;function et(e,t){var{pluginId:r,pluginConfig:n}=t,o=e;return Qe.has(o)||Qe.set(o,function(t){var o=S(),i=Ye(),a=qe(),l=Xe(),c=Ke(r);return E(e,Je(Je({},t),{},{pluginConfig:n,pluginState:c,appConfig:o,appState:i,mapState:a,services:l,mapProvider:o.mapProvider,iconRegistry:pe(),buttonConfig:Object.fromEntries(Object.entries(i.buttonConfig).filter(e=>{var[t,n]=e;return n.pluginId===r}))}))}),Qe.get(o)}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?tt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?nt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function at(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?it(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function lt(){var e=S(),t=Ye(),r=qe(),n=Xe(),o=d(We),i={appConfig:e,appState:t,mapState:r,services:n,mapProvider:null==e?void 0:e.mapProvider,iconRegistry:pe()};function a(t,r){var n,a;if(r){var l,c,s=e.pluginRegistry.registeredPlugins.find(e=>e.id===r);n=s?at({pluginId:s.id},s.config):{},a=at(at({},null!==(l=null==o||null===(c=o.state)||void 0===c?void 0:c[r])&&void 0!==l?l:{}),{},{dispatch:null==o?void 0:o.dispatch})}var p=at(at({},i),{},{pluginConfig:n,pluginState:a});return"function"==typeof t?t(p):t}return a.ctx=i,a}function ct(e){var t=Ye(),{pluginRegistry:r}=S(),n=d(We);y(()=>{if(null!=t&&t.dispatch&&n){var{dispatch:o}=t;r.registeredPlugins.forEach(r=>{var n,i;(null!==(n=null==r||null===(i=r.manifest)||void 0===i?void 0:i.buttons)&&void 0!==n?n:[]).flatMap(e=>{var t;return[e,...null!==(t=e.menuItems)&&void 0!==t?t:[]]}).forEach(n=>function(e){var{btn:t,pluginId:r,appState:n,dispatch:o,evaluateProp:i}=e;[{prop:"enableWhen",state:n.disabledButtons,action:"TOGGLE_BUTTON_DISABLED",invert:!0,key:"isDisabled"},{prop:"hiddenWhen",state:n.hiddenButtons,action:"TOGGLE_BUTTON_HIDDEN",key:"isHidden"},{prop:"pressedWhen",state:n.pressedButtons,action:"TOGGLE_BUTTON_PRESSED",key:"isPressed"},{prop:"expandedWhen",state:n.expandedButtons,action:"TOGGLE_BUTTON_EXPANDED",key:"isExpanded"}].forEach(e=>{var{prop:n,state:a,action:l,key:c,invert:s}=e;if("function"==typeof t[n])try{var p=i(t[n],r),d=s?!p:p;a.has(t.id)!==d&&o({type:l,payload:{id:t.id,[c]:d}})}catch(e){console.warn("".concat(n," error for button ").concat(t.id,":"),e)}})}({btn:n,pluginId:r.id,appState:t,dispatch:o,evaluateProp:e}))})}},[t,n,e])}var st=["api"],pt=e=>{var r,n,{plugin:o,mode:i}=e,a=function(e){var t=v(null),r=S(),n=Ye(),o=qe(),i=Xe(),a=Ke(e);return f(()=>{t.current={appConfig:r,appState:n,mapState:o,services:i,mapProvider:r.mapProvider,pluginState:a}}),t}(o.id);f(()=>{o.api&&o._originalPlugin&&Object.entries(o.api).forEach(e=>{var[t,r]=e;o._originalPlugin[t]=function(e,t){var{pluginId:r,pluginConfig:n,stateRef:o}=t;return function(){var t=o.current;if(!t)throw new Error('Plugin API "'.concat(r,'" called before state is initialized'));for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e(rt(rt({},t),{},{pluginConfig:n,pluginId:r}),...a)}}(r,{pluginId:o.id,pluginConfig:(null==o?void 0:o.config)||{},stateRef:a})})},[o,a]);var{InitComponent:l}=o,c=(null==o?void 0:o.config)||{},{api:s}=c,p=t(c,st),{includeModes:d,excludeModes:u}=o.config||{},m=null===(r=null==d?void 0:d.includes(i))||void 0===r||r,b=null!==(n=null==u?void 0:u.includes(i))&&void 0!==n&&n;if(!m||b||!l)return null;var g=et(l,{pluginId:o.id,pluginConfig:p});return E(g,{})},dt=()=>{var{mode:e}=Ye(),{pluginRegistry:t}=S();(()=>{var{dispatch:e,hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o}=Ye(),{eventBus:a}=Xe(),l=v(e),c=v({hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o});l.current=e,c.current={hiddenButtons:t,disabledButtons:r,pressedButtons:n,expandedButtons:o},f(()=>{var e=e=>{var{id:t,config:r}=e;l.current({type:"ADD_BUTTON",payload:{id:t,config:r}}),Array.isArray(r.menuItems)&&r.menuItems.forEach(e=>{l.current({type:"ADD_BUTTON",payload:{id:e.id,config:ot(ot({},e),{},{isMenuItem:!0})}})})},t=e=>{var{id:t,prop:r,value:n}=e,{hiddenButtons:o,disabledButtons:i,pressedButtons:a,expandedButtons:s}=c.current;switch(r){case"hidden":var p="boolean"==typeof n?n:!o.has(t);l.current({type:"TOGGLE_BUTTON_HIDDEN",payload:{id:t,isHidden:p}});break;case"disabled":var d="boolean"==typeof n?n:!i.has(t);l.current({type:"TOGGLE_BUTTON_DISABLED",payload:{id:t,isDisabled:d}});break;case"pressed":var u="boolean"==typeof n?n:!a.has(t);l.current({type:"TOGGLE_BUTTON_PRESSED",payload:{id:t,isPressed:u}});break;case"expanded":var f="boolean"==typeof n?n:!s.has(t);l.current({type:"TOGGLE_BUTTON_EXPANDED",payload:{id:t,isExpanded:f}})}},r=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_PANEL",payload:{id:t,config:r}})},n=e=>l.current({type:"REMOVE_PANEL",payload:e}),o=e=>l.current({type:"OPEN_PANEL",payload:{panelId:e}}),s=e=>l.current({type:"CLOSE_PANEL",payload:e}),p=e=>{var{id:t,config:r}=e;return l.current({type:"ADD_CONTROL",payload:{id:t,config:r}})};return a.on(i.APP_ADD_BUTTON,e),a.on(i.APP_TOGGLE_BUTTON_STATE,t),a.on(i.APP_ADD_PANEL,r),a.on(i.APP_REMOVE_PANEL,n),a.on(i.APP_SHOW_PANEL,o),a.on(i.APP_HIDE_PANEL,s),a.on(i.APP_ADD_CONTROL,p),()=>{a.off(i.APP_ADD_BUTTON,e),a.off(i.APP_TOGGLE_BUTTON_STATE,t),a.off(i.APP_ADD_PANEL,r),a.off(i.APP_REMOVE_PANEL,n),a.off(i.APP_SHOW_PANEL,o),a.off(i.APP_HIDE_PANEL,s),a.off(i.APP_ADD_CONTROL,p)}},[a])})();var r=lt();return ct(r),E(w,{children:t.registeredPlugins.map((t,n)=>E(pt,{plugin:t,mode:e,evaluateProp:r},"init-".concat(t.id,"-").concat(n)))})};var ut=function(e){var{id:t,center:r,zoom:n,bounds:o}=e,i=((e,t)=>{var r=new URLSearchParams(t),n=r.get("".concat(e,":center")),o=r.get("".concat(e,":zoom"));if(!n||!o)return null;var[i,a]=n.split(",").map(Number);return{center:[i,a],zoom:Number(o)}})(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search);return i?{center:i.center,zoom:i.zoom}:o?{bounds:o}:{center:r,zoom:n}};function ft(){var{id:e}=S(),{eventBus:t}=Xe();f(()=>{if(e){var r=t=>{var{current:r}=t;!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.href,n=new URL(r||"http://localhost"),o=[...new URLSearchParams(n.search)].map(e=>{var[t,r]=e;return"".concat(t,"=").concat(r)}),i=[];t.center&&i.push("".concat(e,":center=").concat(t.center[0],",").concat(t.center[1])),null!=t.zoom&&i.push("".concat(e,":zoom=").concat(t.zoom));var a=o.filter(e=>!i.some(t=>t.split("=")[0]===e.split("=")[0])),l=n.hash||"",c="".concat(n.origin).concat(n.pathname,"?").concat([...a,...i].join("&")).concat(l);window.history.replaceState(window.history.state,"",c)}(e,{center:r.center,zoom:r.zoom})};return t.on(i.MAP_STATE_UPDATED,r),()=>t.off(i.MAP_STATE_UPDATED,r)}},[e])}var vt=e=>{var{direction:t}=e;return"Map moved ".concat(t,".")},mt=e=>{var{from:t,to:r,areaDimensions:n,isAtMaxZoom:o,isAtMinZoom:i}=e;return"Map zoomed ".concat(r>t?"in":"out").concat(o?" (Maximum zoom)":"").concat(i?" (Minimum zoom)":"",". New area approximately ").concat(n,".")},bt=e=>{var{areaDimensions:t,isAtMaxZoom:r,isAtMinZoom:n}=e;return"New area approximately ".concat(t).concat(r?" (Maximum zoom)":"").concat(n?" (Minimum zoom)":"",".")},gt=e=>{var{isAtMaxZoom:t,isAtMinZoom:r}=e;return"No change, ".concat(t?"maximum zoom reached":"").concat(r?"minimum zoom reached":"",".")};function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ht(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?yt(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ot(){var{mapProvider:e}=S(),{eventBus:t,announce:r}=Xe();f(()=>{var n=t=>{var{previous:n,current:o}=t;if(null!=n&&n.center&&null!=o&&o.center){var i=((e,t,r)=>{var n=e.zoom!==t.zoom,o=e.center[0]!==t.center[0]||e.center[1]!==t.center[1],i=r.getAreaDimensions();if(o&&!n){var a=r.getCardinalMove(e.center,t.center);return vt({direction:a,areaDimensions:i})}return!o&&n?mt(ht(ht({},t),{},{from:e.zoom,to:t.zoom,areaDimensions:i})):o||n?bt(ht(ht({},t),{},{areaDimensions:i})):gt(ht({},t))})(n,o,e);i&&r(i,"core")}};return t.on(i.MAP_STATE_UPDATED,n),()=>{t.off(i.MAP_STATE_UPDATED,n)}},[e,r])}var Pt=e=>{var{mainRef:t,insetRef:r,rightRef:n,actionsRef:o,footerRef:i}=e,a=[t,r,n,o,i];if(!a.some(e=>!e.current)){var[l,c,s,p,d]=a.map(e=>e.current),u=document.documentElement,f=Number.parseInt(getComputedStyle(u).getPropertyValue("--divider-gap"),10),v=p.offsetTop-c.offsetTop-f,m=c.offsetLeft+s.offsetWidth+f,b=l.offsetWidth-2*m,g=c.offsetWidth-m+c.offsetLeft,y=b-g>v-c.offsetHeight,h=c.offsetTop+(!y&&c.offsetHeight>0?c.offsetHeight+f:0),O=y?c.offsetWidth+c.offsetLeft+f:m,P=l.offsetHeight-p.offsetTop,E=l.offsetHeight-d.offsetTop,_=g<b/2&&c.offsetHeight<v/2;return{top:_?c.offsetTop:h,right:m,left:l.offsetLeft+(_?m:Math.max(O,m)),bottom:Math.max(P,E)+f}}},Et=(e,t)=>Object.entries(e).reduce((e,r)=>{var[n,o]=r;return e[n]=Math.round(o/t),e},{});function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?_t(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var jt=e=>{var{mapContainerRef:t}=e,r=S(),{id:n,mapProvider:o}=r,{safeZoneInset:a,breakpoint:l,isLayoutReady:c,syncMapPadding:s}=Ye(),{isMapReady:p,mapStyle:d,mapSize:u,center:m,zoom:b,bounds:g}=qe(),y=v(!1),h=ut({id:n,center:m,zoom:b,bounds:g});return f(()=>{if(a&&c&&d&&u&&!y.current)return requestAnimationFrame(()=>{o.initMap(wt(wt({},r),{},{pixelRatio:window.devicePixelRatio*U[u],container:t.current,padding:a,center:h.center,zoom:h.zoom,bounds:h.bounds,mapStyle:d}))}),y.current=!0,()=>{}},[a,c,d,u]),function(){var{mapProvider:e}=S(),{dispatch:t}=qe(),{eventBus:r}=Xe(),n=v(null),o=v(!1);f(()=>{if(e){var a=e=>{t({type:"MAP_MOVE",payload:e})},l=e=>{t({type:"MAP_MOVE_END",payload:e}),r.emit(i.MAP_STATE_UPDATED,{previous:n.current,current:e}),n.current=e},c=r=>{o.current||(n.current={center:e.getCenter(),zoom:e.getZoom()},o.current=!0),t({type:"MAP_FIRST_IDLE",payload:r})};return r.on(i.MAP_MOVE,a),r.on(i.MAP_MOVE_END,l),r.on(i.MAP_FIRST_IDLE,c),()=>{r.off(i.MAP_MOVE,a),r.off(i.MAP_MOVE_END,l),r.off(i.MAP_FIRST_IDLE,c)}}},[e,t])}(),ft(),Ot(),(()=>{var{mapProvider:e}=S(),{dispatch:t,layoutRefs:r}=Ye(),{mapSize:n}=qe(),o=v(n);o.current=n;var i=()=>{var n=Pt(r),i=Et(n,U[o.current]);"function"==typeof t&&t({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:n,syncMapPadding:!1}}),"function"==typeof e.setPadding&&e.setPadding(i)};f(()=>{if(e){var t=e.fitToBounds;e.fitToBounds=function(r){if(r)return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||i(),t.call(e,r)};var r=e.setView;return e.setView=t=>{var{center:n,zoom:o}=t;if(n)return i(),r.call(e,{center:n,zoom:o})},()=>{e.fitToBounds=t,e.setView=r}}},[e,t,r,n])})(),f(()=>{p&&s&&o.setPadding(Et(a,U[u]))},[p,u,l,a]),null};var St={keydown:{ArrowUp:"panUp",ArrowDown:"panDown",ArrowLeft:"panLeft",ArrowRight:"panRight","+":"zoomIn","=":"zoomIn","-":"zoomOut",_:"zoomOut"},keyup:{"Alt+k":"showKeyboardControls","Alt+K":"showKeyboardControls","Alt+ArrowRight":"highlightNextLabel","Alt+ArrowLeft":"highlightNextLabel","Alt+ArrowUp":"highlightNextLabel","Alt+ArrowDown":"highlightNextLabel","Alt+Enter":"highlightLabelAtCenter","Alt+i":"getInfo","Alt+I":"getInfo",Escape:"clearSelection"}},Rt=(e,t,n)=>{var o,{containerRef:i,dispatch:a,panDelta:c,nudgePanDelta:s,zoomDelta:p,nudgeZoomDelta:d,readMapText:u}=n,f=e=>e?s:c,v=e=>e?d:p;return{showKeyboardControls:()=>{a({type:"OPEN_PANEL",payload:{panelId:"keyboardHelp",props:{triggeringElement:i.current}}})},panUp:t=>e.panBy([0,-f(t.shiftKey)]),panDown:t=>e.panBy([0,f(t.shiftKey)]),panLeft:t=>e.panBy([-f(t.shiftKey),0]),panRight:t=>e.panBy([f(t.shiftKey),0]),zoomIn:t=>e.zoomIn(v(t.shiftKey)),zoomOut:t=>e.zoomOut(v(t.shiftKey)),getInfo:(o=r(function*(r){var n,o=e.getCenter(),i=yield l(e.getZoom(),o),a=null===(n=e.getAreaDimensions)||void 0===n?void 0:n.call(e),c=a?"".concat(i,". Covering ").concat(a,"."):"".concat(i,".");t(c,"core")}),function(e){return o.apply(this,arguments)}),highlightNextLabel:r=>{if(u||!e.highlightNextLabel){var n=e.highlightNextLabel(r.key);t(n,"core")}},highlightLabelAtCenter:()=>{if(u||!e.highlightNextLabel){var r=e.highlightLabelAtCenter();t(r,"core")}},clearSelection:()=>{var t;return null==e||null===(t=e.clearHighlightedLabel)||void 0===t?void 0:t.call(e)}}};var Tt=()=>{var{mapStatusRef:e}=Xe();return E("div",{ref:e,role:"status",className:"im-c-viewport__status","aria-live":"polite","aria-atomic":"true","aria-label":"Map updates"})},Dt={active:"M5.035 20H1v-2h4.035C5.525 11.069 11.069 5.525 18 5.035V1h2v4.035c6.931.49 12.475 6.034 12.965 12.965H37v2h-4.035c-.49 6.931-6.034 12.475-12.965 12.965V37h-2v-4.035C11.069 32.475 5.525 26.931 5.035 20zM19 7c-6.581.005-11.995 5.419-12 12 .005 6.581 5.419 11.995 12 12 6.581-.005 11.995-5.419 12-12-.005-6.581-5.419-11.995-12-12zm0 10a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2z",inactive:"M5.035 20H1v-2h4.035a13.98 13.98 0 0 1 .246-1.8l1.96.399C7.083 17.375 7 18.178 7 19s.083 1.625.241 2.401l-1.96.399a13.98 13.98 0 0 1-.246-1.8zM20 5.035a13.98 13.98 0 0 1 1.8.246l-.399 1.96C20.625 7.083 19.822 7 19 7s-1.625.083-2.401.241l-.399-1.96a13.98 13.98 0 0 1 1.8-.246V1h2v4.035zm-2 27.93a13.98 13.98 0 0 1-1.8-.246l.399-1.96c.776.158 1.579.241 2.401.241s1.625-.083 2.401-.241l.399 1.96a13.98 13.98 0 0 1-1.8.246V37h-2v-4.035zM32.965 20a13.98 13.98 0 0 1-.246 1.8l-1.96-.399c.158-.776.241-1.579.241-2.401s-.083-1.625-.241-2.401l1.96-.399a13.98 13.98 0 0 1 .246 1.8H37v2h-4.035zM19 17a2.01 2.01 0 0 1 2 2 2.01 2.01 0 0 1-2 2 2.01 2.01 0 0 1-2-2 2.01 2.01 0 0 1 2-2zm3.8-9.385l.634-1.897c1.789.598 3.438 1.553 4.848 2.805l-1.327 1.496c-1.196-1.06-2.605-1.886-4.155-2.404zm5.181 3.43l1.496-1.327c1.252 1.41 2.207 3.059 2.805 4.848l-1.897.634c-.518-1.55-1.344-2.959-2.404-4.155zM30.385 22.8l1.897.634c-.598 1.789-1.553 3.438-2.805 4.848l-1.496-1.327c1.06-1.196 1.886-2.605 2.404-4.155zm-3.43 5.181l1.327 1.496c-1.41 1.252-3.059 2.207-4.848 2.805l-.634-1.897c1.55-.518 2.959-1.344 4.155-2.404zM15.2 30.385l-.634 1.897c-1.789-.598-3.438-1.553-4.848-2.805l1.327-1.496c1.196 1.06 2.605 1.886 4.155 2.404zm-5.181-3.43l-1.496 1.327c-1.252-1.41-2.207-3.059-2.805-4.848l1.897-.634c.518 1.55 1.344 2.959 2.404 4.155zM7.615 15.2l-1.897-.634c.598-1.789 1.553-3.438 2.805-4.848l1.496 1.327c-1.06 1.196-1.886 2.605-2.404 4.155zm3.43-5.181L9.718 8.523c1.41-1.252 3.059-2.207 4.848-2.805l.634 1.897c-1.55.518-2.959 1.344-4.155 2.404z"},kt=()=>{var{id:e}=S(),{crossHairRef:t,crossHair:r}=(()=>{var{mapProvider:e}=S(),{safeZoneInset:t}=Ye(),{eventBus:r}=Xe(),{crossHair:n,dispatch:o,mapSize:a}=qe(),l=(e,r,n)=>{if(t){var o=r*U[a],i=n*U[a];e.style.transform="translate(".concat(o-t.left,"px, ").concat(i-t.top,"px)"),e.style.left="0",e.style.top="0",e.style.display="block"}},c=b(t=>{if(t){((e,t,r,n,o)=>{e.pinToMap=(i,a)=>{var{x:l,y:c}=r.mapToScreen(i);e.coords=i,n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!0,isVisible:!0,coords:i,state:a}}),o(t,l,c)},e.fixAtCenter=()=>{t.style.left="50%",t.style.top="50%",t.style.transform="translate(0,0)",t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!0}})},e.remove=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isPinnedToMap:!1,isVisible:!1}})},e.show=()=>{t.style.display="block",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!0}})},e.hide=()=>{t.style.display="none",n({type:"UPDATE_CROSS_HAIR",payload:{isVisible:!1}})},e.setStyle=e=>{n({type:"UPDATE_CROSS_HAIR",payload:{state:e}})},e.getDetail=()=>{var t=e.isPinnedToMap?e.coords:r.getCenter();return{state:e.state,point:r.mapToScreen(t),zoom:r.getZoom(),coords:t}}})(n,t,e,o,l);var a=()=>{if(n.coords&&n.isPinnedToMap){var{x:r,y:o}=e.mapToScreen(n.coords);l(t,r,o)}};return r.on(i.MAP_RENDER,a),()=>{r.off(i.MAP_RENDER,a)}}},[n,e,a,o,t]);return f(()=>{n.coords&&n.isPinnedToMap&&n.pinToMap(n.coords,n.state)},[a]),{crossHair:n,crossHairRef:c}})(),{isVisible:n,isPinnedToMap:o,state:a}=r;return E("svg",{id:"".concat(e,"-cross-hair"),ref:t,className:"im-c-cross-hair",width:"38",height:"38",viewBox:"0 0 38 38",fillRule:"evenodd",fill:"currentColor",style:{position:"absolute",left:o?0:"50%",top:o?0:"50%",pointerEvents:"none",display:n?"block":"none"},children:E("path",{d:Dt[a||"active"]})})};function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?At(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Ct=(e,t,r,n)=>{if(!t||!n)return{x:0,y:0};var{x:o,y:i}=t.mapToScreen(e);return{x:o*U[r],y:i*U[r]-19}},It=(e,t,r,n,o)=>{e.forEach(e=>{var i=t.get(e.id);if(i&&e.coords){var{x:a,y:l}=Ct(e.coords,r,n,o);i.style.transform="translate(".concat(a,"px, ").concat(l,"px)"),i.style.display="block"}})},Lt=()=>{var{mapProvider:e}=S(),{eventBus:t}=Xe(),{markers:r,dispatch:n,mapSize:o,isMapReady:a}=qe(),l=v(new Map);f(()=>{e&&(r.markerRefs=l.current,r.add=(t,r,i)=>{var{x:l,y:c}=Ct(r,e,o,a);n({type:"UPSERT_LOCATION_MARKER",payload:Mt(Mt({id:t,coords:r},i),{},{x:l,y:c,isVisible:!0})})},r.remove=e=>{n({type:"REMOVE_LOCATION_MARKER",payload:e})},r.getMarker=e=>r.items.find(t=>t.id===e))},[e,r,n,o]);var c=b(n=>c=>{if(c){l.current.set(n,c);var s=()=>{a&&e&&It(r.items,l.current,e,o,a)};return t.on(i.MAP_RENDER,s),()=>{t.off(i.MAP_RENDER,s)}}l.current.delete(n)},[r,e,a,o]);return f(()=>{a&&e&&It(r.items,l.current,e,o,a)},[o,r.items,e,a]),((e,t)=>{f(()=>{var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.id&&null!=e&&e.coords){var{id:r,coords:n,options:o}=e;t.add(r,n,o)}};e.on(i.APP_ADD_MARKER,r);var n=e=>{e&&t.remove(e)};return e.on(i.APP_REMOVE_MARKER,n),()=>{e.off(i.APP_ADD_MARKER,r),e.off(i.APP_REMOVE_MARKER,n)}},[])})(t,r),{markers:r,markerRef:c}},Nt=(e,t)=>{if(!e)return null;if("string"==typeof e)return e.trim();if("object"==typeof e){if(t&&e[t])return e[t];var r=Object.values(e)[0];return null!=r?r:null}return null};function Bt(e){return null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var xt=()=>{var{id:e,markerShape:t,markerColor:r}=S(),{mapStyle:n}=qe(),{markers:o,markerRef:i}=Lt();if(n){var a=G.find(e=>e.shape===t);return E(w,{children:o.items.map(o=>_("svg",{ref:i(o.id),id:"".concat(e,"-marker-").concat(o.id),className:"im-c-marker im-c-marker--".concat(o.markerShape||Bt(t)),width:"38",height:"38",viewBox:"0 0 38 38",style:{display:o.isVisible?"block":"none"},children:[E("path",{className:"im-c-marker__background",d:a.backgroundPath,fill:Nt(o.color||r,n.id)}),E("path",{className:"im-c-marker__graphic",d:a.graphicPath})]},o.id))})}},zt=e=>{var{keyboardHintPortalRef:t}=e,{id:r,mapProvider:n,mapLabel:o,keyboardHintText:a}=S(),{interfaceType:l,mode:c,previousMode:s,layoutRefs:p,safeZoneInset:d}=Ye(),{mapSize:u}=qe(),m=v(null),b=v(null),[g,y]=h(!1);!function(e){var{mapProvider:t,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}=S(),{interfaceType:l,dispatch:c}=Ye(),{announce:s}=Xe();f(()=>{var p=e.current;if(p&&"keyboard"===l){var d=Rt(t,s,{containerRef:e,dispatch:c,panDelta:r,nudgePanDelta:n,zoomDelta:o,nudgeZoomDelta:i,readMapText:a}),u=e=>t=>{var r=St[e][(e=>{var t;return"Add"===(t=/^Key[A-Z]$/.test(e.code)?e.code.slice(3):e.key)||"NumpadAdd"===t?t="+":"Subtract"!==t&&"NumpadSubtract"!==t||(t="-"),e.altKey?"Alt+".concat(t):t})(t)];r&&d[r]&&(d[r](t),t.preventDefault())},f=u("keydown"),v=u("keyup");return p.addEventListener("keydown",f),p.addEventListener("keyup",v),()=>{p.removeEventListener("keydown",f),p.removeEventListener("keyup",v)}}},[e,l,t,r,n,o,i])}(p.viewportRef),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mapProvider:t}=S(),{eventBus:r}=Xe();f(()=>{if(t){var n={};return Object.entries(e).forEach(e=>{var[t,o]=e,i=e=>o(e);n[t]=i,r.on(t,i)}),()=>{Object.entries(n).forEach(e=>{var[t,n]=e;r.off(t,n)})}}},[t,e])}({[i.MAP_CLICK]:()=>{var e;return null==n||null===(e=n.clearHighlightedLabel)||void 0===e?void 0:e.call(n)}});var{showHint:P,handleFocus:j,handleBlur:R}=function(e){var{interfaceType:t,containerRef:r,keyboardHintRef:n,keyboardHintVisible:o,onViewportFocusChange:i}=e,a=o;return f(()=>{if(a&&r.current){var e=r.current,t=e=>{["Escape","Tab"].includes(e.key)&&i(!1)},o=t=>{var r,o=e.contains(t.target),a=null===(r=n.current)||void 0===r?void 0:r.contains(t.target);o&&!a&&i(!1)};return e.addEventListener("keydown",t),e.addEventListener("mousedown",o),()=>{e.removeEventListener("keydown",t),e.removeEventListener("mousedown",o)}}},[a,r,n,i]),{showHint:a,handleFocus:()=>{"keyboard"===t&&i(!0)},handleBlur:()=>{i(!1)}}}({interfaceType:l,containerRef:p.viewportRef,keyboardHintRef:b,keyboardHintVisible:g,onViewportFocusChange:y});return f(()=>{var e;c&&s&&c!==s&&(null===(e=p.viewportRef)||void 0===e||e.current.focus())},[c]),f(()=>{var e,t=null===(e=p.mainRef)||void 0===e?void 0:e.current;if(t)return t.classList.toggle("im-o-app__main--keyboard-hint-visible",P),()=>null==t?void 0:t.classList.remove("im-o-app__main--keyboard-hint-visible")},[P]),_(w,{children:[E(jt,{mapContainerRef:m}),_("div",{id:"".concat(r,"-viewport"),className:"im-c-viewport im-c-viewport--".concat(u),"aria-label":o,role:"application",tabIndex:"0",onFocus:j,onBlur:R,ref:p.viewportRef,children:[P&&(null==t?void 0:t.current)&&O(E("div",{className:"im-c-viewport__keyboard-hint","aria-hidden":"true",ref:b,dangerouslySetInnerHTML:{__html:a}}),t.current),E("div",{className:"im-c-viewport__map-container",ref:m}),E("div",{className:"im-c-viewport__features"}),E(Tt,{}),E("div",{className:"im-c-viewport__safezone",style:d,ref:p.safeZoneRef,children:E(kt,{})}),E(xt,{})]})]})};function Ht(e,t){var r=v(),n=v(new WeakMap);return f(()=>{var o=(Array.isArray(e)?e:[e]).map(e=>null==e?void 0:e.current).filter(Boolean);if(o.length&&t){var i=new window.ResizeObserver(e=>{for(var r of e){var{width:o,height:i}=r.contentRect,a=n.current.get(r.target)||{};a.width===o&&a.height===i||(n.current.set(r.target,{width:o,height:i}),t(r))}});return o.forEach(e=>i.observe(e)),()=>{i.disconnect(),r.current&&cancelAnimationFrame(r.current)}}},[e,t]),{frameRef:r}}var Ft=()=>{var{mapStyle:e}=qe();if(null!=e&&e.logo)return E("img",{className:"im-c-logo",src:e.logo,alt:e.logoAltText})},Ut=()=>{var{breakpoint:e}=Ye(),{mapStyle:t}=qe();return t?"mobile"!==e&&E("div",{className:"im-c-attributions",dangerouslySetInnerHTML:{__html:t.attribution}}):null},Gt=Object.freeze({SIDE:"side",BANNER:"banner",TOP_LEFT:"top-left",TOP_MIDDLE:"top-middle",TOP_RIGHT:"top-right",INSET:"inset",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",MIDDLE:"middle",FOOTER_RIGHT:"footer-right",BOTTOM:"bottom",ACTIONS:"actions",MODAL:"modal"}),Vt=Object.freeze({control:[Gt.BANNER,Gt.TOP_LEFT,Gt.TOP_RIGHT,Gt.INSET,Gt.MIDDLE,Gt.FOOTER_RIGHT,Gt.BOTTOM,Gt.ACTIONS],panel:[Gt.SIDE,Gt.BANNER,Gt.INSET,Gt.MIDDLE,Gt.BOTTOM,Gt.ACTIONS,Gt.DRAWER,Gt.MODAL],button:[Gt.TOP_LEFT,Gt.TOP_MIDDLE,Gt.TOP_RIGHT,Gt.RIGHT_TOP,Gt.RIGHT_BOTTOM,Gt.ACTIONS]}),Wt=(e,t)=>e.modal?"modal":"bottom"===e.slot&&["tablet","desktop"].includes(t)?"inset":e.slot,Zt=(e,t)=>{var r;return!(e.includeModes&&!e.includeModes.includes(t))&&(null===(r=e.excludeModes)||void 0===r||!r.includes(t))},Kt=e=>"string"==typeof e.html&&!e.pluginId;var Yt=(e,t,r)=>{f(()=>{if(t){var n=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),r()),"Tab"===t.key&&e.current&&function(e,t){if("Tab"===t.key){var r=Array.from(e.querySelectorAll(["a[href]:not([disabled])","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'*[tabindex="0"]:not([disabled])'].join(",")));if(0!==(r=r.filter(e=>!!e.offsetParent)).length){var n=r[0],o=r[r.length-1];!t.shiftKey||document.activeElement!==e&&document.activeElement!==n||(o.focus(),t.preventDefault()),t.shiftKey||document.activeElement!==o||(n.focus(),t.preventDefault())}}}(e.current,t)},o=e.current;return null==o||o.addEventListener("keydown",n),()=>{null==o||o.removeEventListener("keydown",n)}}},[t,e,r])};function qt(e){var{mainRef:t,panelRef:r,isModal:n,rootEl:o,buttonContainerEl:i,handleClose:a}=e;Yt(r,n,a);var l=document.documentElement,s=Number.parseInt(getComputedStyle(l).getPropertyValue("--divider-gap"),10);Ht([t],()=>{if(n&&i&&t.current){var e=t.current.getBoundingClientRect(),r=i.getBoundingClientRect(),o=r.top-e.top,a=Math.round(e.right-r.right+r.width+s);l.style.setProperty("--modal-inset","".concat(o,"px ").concat(a,"px auto auto"))}}),f(()=>{if(n){var e=e=>{var t=e.target.closest(".im-o-app__modal-backdrop");o&&t&&o.contains(t)&&a()};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}},[n,o,a]),f(()=>{if(n&&r.current&&o)return c({containerEl:r.current,isFullscreen:!0,boundaryEl:o}),()=>{c({containerEl:r.current,isFullscreen:!1,boundaryEl:o})}},[n,r,o]),((e,t,r)=>{f(()=>{if(e){var n=e=>{var n=e.target,o=t.current;if(n&&o&&r){var i=r.contains(n),a=o.contains(n);i&&!a&&o.focus()}};return document.addEventListener("focusin",n),()=>{document.removeEventListener("focusin",n)}}},[e,t,r])})(n,r,o)}var Xt=e=>{var{id:t,svgContent:r}=e,n=pe()[t]||r;return E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:n}})};function $t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jt(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?$t(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Qt=(e,t)=>e?"dialog":t?"complementary":"region",er=e=>{var{panelId:t,panelConfig:r,props:n,WrappedChild:o,label:i,html:a,children:l,isOpen:c=!0,rootRef:s}=e,{id:p}=S(),{dispatch:d,breakpoint:u,layoutRefs:m}=Ye(),y=document.getElementById("".concat(p,"-im-app")),O=r[u],P="".concat(p,"-panel-").concat(Bt(t)),{isDialog:w,isModal:j,isDismissable:R,shouldFocus:T,buttonContainerEl:D}=((e,t)=>{var r="side"===e.slot&&e.initiallyOpen&&!e.modal,n=!r&&e.dismissable,o=!0===e.modal;return{isAside:r,isDialog:n,isModal:o,isDismissable:!1!==e.dismissable,shouldFocus:Boolean(o||t),buttonContainerEl:e.slot.endsWith("button")?null==t?void 0:t.parentNode:void 0}})(O,null==n?void 0:n.triggeringElement),k=j&&c,A=m.mainRef,M=v(null),C=v(null),I=v(c),L=function(e){var[t,r]=h(!1),n=b(()=>{var t=null==e?void 0:e.current;t&&r(t.scrollHeight>t.clientHeight)},[e]);return Ht(e,n),t}(C),N=s||M,B=()=>{requestAnimationFrame(()=>{var e,t;null===(e=(t=(null==n?void 0:n.triggeringElement)||m.viewportRef.current).focus)||void 0===e||e.call(t)}),d({type:"CLOSE_PANEL",payload:t})};qt({mainRef:A,panelRef:N,isModal:k,rootEl:y,buttonContainerEl:D,handleClose:B}),f(()=>{var e,t=c&&!I.current;(I.current=c,T&&(t||c))&&(null===(e=N.current)||void 0===e||e.focus())},[c]);var x,z,H=(x=O.slot,z=r.showLabel,["im-c-panel","im-c-panel--".concat(x),!z&&"im-c-panel--no-heading"].filter(Boolean).join(" ")),F=((e,t)=>["im-c-panel__body",!e&&t&&"im-c-panel__body--offset"].filter(Boolean).join(" "))(r.showLabel,R),U=g(()=>a?{__html:a}:null,[a]),G=(e=>{var{elementId:t,shouldFocus:r,isDialog:n,isDismissable:o,isModal:i,width:a,panelClass:l}=e;return{id:t,"aria-labelledby":"".concat(t,"-label"),tabIndex:r?-1:void 0,role:Qt(n,o),"aria-modal":n&&i?"true":void 0,style:a?{width:a}:void 0,className:l}})({elementId:P,shouldFocus:T,isDialog:w,isDismissable:R,isModal:j,width:O.width,panelClass:H}),V=(e=>{var{bodyRef:t,panelBodyClass:r,isBodyScrollable:n,elementId:o}=e;return{ref:t,className:r,tabIndex:n?0:void 0,role:n?"region":void 0,"aria-labelledby":n?"".concat(o,"-label"):void 0}})({bodyRef:C,panelBodyClass:F,isBodyScrollable:L,elementId:P});return _("div",Jt(Jt({ref:N},G),{},{children:[E("h2",{id:"".concat(P,"-label"),className:r.showLabel?"im-c-panel__heading im-e-heading-m":"im-u-visually-hidden",children:i}),R&&E("button",{"aria-label":"Close ".concat(i),className:"im-c-panel__close",onClick:B,children:E(Xt,{id:"close"})}),U?E("div",Jt(Jt({},V),{},{dangerouslySetInnerHTML:U})):_("div",Jt(Jt({},V),{},{children:[" ",o?E(o,Jt({},n)):l]}))]}))};function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?tr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function nr(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,pluginRegistry:i,panelConfig:a,mode:l,openPanels:c}=r,s=Object.entries(c),p=s.filter(e=>{var t,[r]=e,n=null===(t=a[r])||void 0===t?void 0:t[o];return null==n?void 0:n.modal}),d=p.length>0?p[p.length-1][0]:null;return s.map(e=>{var c,[s,{props:p}]=e,u=a[s];if(!u)return null;if(Kt(u))return null;var f=u[o];if(!f)return null;var v=Wt(f,o);if(!((e,t,r,n)=>{var{targetSlot:o,slot:i,mode:a,isFullscreen:l,allowedModalPanelId:c}=n,s="".concat(Bt(e),"-button")===o;return!(!Vt.panel.includes(o)&&!s||!Zt(t,a)||!1===t.inline&&!l||o!==i||r.modal&&e!==c)})(s,u,f,{targetSlot:v,slot:t,mode:l,isFullscreen:r.isFullscreen,allowedModalPanelId:d}))return null;var m=i.registeredPlugins.find(e=>e.id===u.pluginId),b=null==m?void 0:m.id,g=u.render?et(u.render,rr(rr({},p),{},{pluginId:b,pluginConfig:null==m?void 0:m.config})):null;return{id:s,type:"panel",order:null!==(c=f.order)&&void 0!==c?c:0,element:E(er,{panelId:s,panelConfig:u,props:p,WrappedChild:g,label:n(u.label,b),html:b?n(u.html,b):u.html},s)}}).filter(Boolean)}var or=0,ir=e=>{var{children:t,content:r}=e,{interfaceType:n}=Ye(),o=v(null),i=v(null),[a,l]=h(!1),[c,s]=h(!1),[p,d]=h(null),[u]=h(()=>"tooltip-".concat(or+=1)),m=v(null),b=v(null),g=()=>{clearTimeout(m.current),l(!1)},y=()=>{clearTimeout(b.current),m.current=setTimeout(()=>l(!0),500)},O=()=>{clearTimeout(m.current),b.current=setTimeout(()=>l(!1),0)};f(()=>{var e=e=>{"Escape"===e.key&&(clearTimeout(m.current),clearTimeout(b.current),l(!1))};if(window.addEventListener("keydown",e),a){var t=function(e,t){if(!e)return"bottom";t||(t=e.closest(".im-o-app__main"));var r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o={top:r.top-n.top,bottom:n.bottom-r.bottom,left:r.left-n.left,right:n.right-r.right},i=Object.entries(o),a=i.toSorted((e,t)=>{var[,r]=e,[,n]=t;return r-n}),[l,c]=a[0];if("top"===l||"bottom"===l)for(var[s,p]of i)if(("left"===s||"right"===s)&&Math.abs(p-c)<=50)return"left"===s?"right":"left";return{top:"bottom",bottom:"top",left:"right",right:"left"}[l]}(o.current);d(t)}return()=>{window.removeEventListener("keydown",e),clearTimeout(m.current),clearTimeout(b.current)}},[a]);var w=P(t,{ref:e=>{var r;o.current=e;var n=null===(r=t.props)||void 0===r?void 0:r.ref;"function"==typeof n?n(e):n&&"object"==typeof n&&(n.current=e)},onMouseEnter:y,onMouseLeave:O,onMouseDown:g,onKeyDown:g,onFocus:()=>{"keyboard"===n&&y(),s(!0)},onBlur:()=>{O(),s(!1)},"aria-labelledby":u});return _("div",{className:"im-c-tooltip-wrapper".concat(c?" im-c-tooltip-wrapper--has-focus":""),children:[w,E("div",{id:u,ref:i,className:"im-c-tooltip im-c-tooltip--".concat(p||"hidden"," ").concat(a?"im-c-tooltip--is-visible":""),role:"tooltip","aria-hidden":!a,children:r})]})},ar=e=>{var{popupMenuId:t,buttonId:r,instigatorId:n,pluginId:o,startPos:i,startIndex:a,menuRef:l,items:c,setIsOpen:s}=e,{id:p}=S(),{buttonRefs:d,buttonConfig:u,hiddenButtons:v,disabledButtons:m,pressedButtons:b}=Ye(),y=null!=r?r:n,O=d.current[y],P=lt(),w=g(()=>{var e=[];return c.forEach((t,r)=>{v.has(t.id)||e.push(r)}),e},[c,v]),[j,R]=h(()=>{return"number"==typeof a?a:"first"===i?null!==(e=w[0])&&void 0!==e?e:-1:"last"===i&&null!==(t=w[w.length-1])&&void 0!==t?t:-1;var e,t}),T=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&null!=e&&e.preventDefault&&e.preventDefault(),O.focus(),s(!1)},D=(e,t)=>{var r=u[t.id];if("function"==typeof(null==r?void 0:r.onClick)?r.onClick(e,P(e=>e,o)):"function"==typeof t.onClick&&t.onClick(e.nativeEvent),e.nativeEvent instanceof KeyboardEvent){var n=document.getElementById("".concat(p,"-").concat(Bt(t.id)));if(n){var i=new MouseEvent("click",{bubbles:!0,cancelable:!0});i._fromKeyboardActivation=!0,n.dispatchEvent(i)}}},k=e=>{var t,r;null!==(t=l.current)&&void 0!==t&&t.contains(e.target)||null!==(r=d.current[y])&&void 0!==r&&r.contains(e.target)||s(!1)};return f(()=>{var e,t;if(null===(e=l.current)||void 0===e||e.focus(),"first"===i)R(null!==(t=w[0])&&void 0!==t?t:-1);else if("last"===i){var r;R(null!==(r=w[w.length-1])&&void 0!==r?r:-1)}return document.addEventListener("focusin",k),document.addEventListener("pointerdown",k),()=>{document.removeEventListener("focusin",k),document.removeEventListener("pointerdown",k)}},[]),E("ul",{ref:l,id:t,className:"im-c-popup-menu",role:"menu",tabIndex:"-1","aria-labelledby":y,"aria-activedescendant":j>=0?"".concat(p,"-").concat(Bt(c[j].id)):void 0,onKeyDown:e=>{["Escape","Esc"].includes(e.key)?T(e,!0):"Tab"!==e.key?["ArrowDown","ArrowUp"].includes(e.key)?(e=>{e.preventDefault();var t=w,r=t.length;if(0!==r){var n,o=t.indexOf(j);n="ArrowDown"===e.key?-1===o?0:(o+1)%r:-1===o?r-1:(o-1+r)%r,R(t[n])}})(e):"Home"===e.key&&w.length?R(w[0]):"End"===e.key&&w.length?R(w[w.length-1]):("Enter"===e.key&&(e=>{e.preventDefault();var t=c[j];t&&!m.has(t.id)&&D(e,t),O.focus(),s(!1)})(e)," "===e.key&&(e=>{e.preventDefault();var t=c[j];if(t&&!m.has(t.id)){var r=void 0!==t.isPressed||t.pressedWhen;D(e,t),r||(O.focus(),s(!1))}})(e)):T(e)},children:c.map((e,t)=>_("li",{id:"".concat(p,"-").concat(Bt(c[t].id)),className:"im-c-popup-menu__item".concat(j===t?" im-c-popup-menu__item--selected":""),role:void 0!==c[t].isPressed||c[t].pressedWhen?"menuitemcheckbox":"menuitem","aria-disabled":m.has(c[t].id)||void 0,"aria-checked":void 0!==c[t].isPressed||c[t].pressedWhen?b.has(c[t].id):void 0,style:v.has(c[t].id)?{display:"none"}:void 0,onClick:e=>((e,t)=>{e.nativeEvent._fromKeyboardActivation||m.has(t.id)||(s(!1),D(e,t))})(e,c[t]),children:[(e.iconId||e.iconSvgContent)&&E(Xt,{id:e.iconId,svgContent:e.iconSvgContent}),E("span",{className:"im-c-popup-menu__item-label",children:e.label})]},e.id))})};function lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?lr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var sr=(e,t,r)=>["im-c-map-button",e&&"im-c-map-button--".concat(Bt(e)),t&&"im-c-map-button--".concat(t),r&&"im-c-map-button--with-label"].filter(Boolean).join(" "),pr=(e,t,r,n,o)=>["im-c-button-wrapper",e&&"im-c-button-wrapper--".concat(Bt(e)),t&&"im-c-button-wrapper--wide",r&&"im-c-button-wrapper--group-start",n&&"im-c-button-wrapper--group-middle",o&&"im-c-button-wrapper--group-end"].filter(Boolean).join(" "),dr=e=>{" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),e.currentTarget.click())},ur=e=>{var{buttonId:t,iconId:r,iconSvgContent:n,label:o,showLabel:i,isDisabled:a,isPressed:l,isExpanded:c,isHidden:s,isPanelOpen:p,variant:d,onClick:u,panelId:f,menuItems:m,idPrefix:b,href:g,groupMiddle:y,groupStart:O,groupEnd:P}=e,{id:w}=S(),{buttonRefs:j}=Ye(),[R,T]=h(!1),[D,k]=h(null),A=v(null),M=g?"a":"button",C=(null==m?void 0:m.length)>=1,I=(e=>{var{idPrefix:t,panelId:r,buttonId:n,hasMenu:o}=e;return r?{id:"".concat(t,"-panel-").concat(Bt(r)),type:"panel"}:o?{id:"".concat(t,"-popup-").concat(Bt(n)),type:"popup"}:null})({idPrefix:b,panelId:f,buttonId:t,hasMenu:C}),L=(e=>{var t,{appId:r,buttonId:n,className:o,onClick:i,onKeyUp:a,buttonRefs:l,isDisabled:c,isPressed:s,isExpanded:p,isPanelOpen:d,isPopupOpen:u,controlledElement:f,href:v}=e;return"panel"===(null==f?void 0:f.type)?t=String(d):"popup"===(null==f?void 0:f.type)?t=u:"boolean"==typeof p&&(t=p),cr({id:"".concat(r,"-").concat(Bt(n)),className:o,onClick:i,onKeyUp:a,ref:e=>{l.current&&n&&(l.current[n]=e)},"aria-disabled":c||void 0,"aria-expanded":t,"aria-pressed":"boolean"==typeof s?s:void 0,"aria-controls":null==f?void 0:f.id,"aria-haspopup":"popup"===(null==f?void 0:f.type)||void 0},v?{href:v,target:"_blank",onKeyUp:dr,role:"button"}:{type:"button"})})({appId:w,buttonId:t,className:sr(t,d,i),onClick:e=>{if(!a){if("popup"===(null==I?void 0:I.type)){var t=""===e.nativeEvent.pointerType;k(t?"first":null),T(e=>!e)}u&&u(e)}},onKeyUp:e=>{C&&["ArrowDown","ArrowUp"].includes(e.key)&&(e.preventDefault(),k("ArrowUp"===e.key?"last":"first"),T(!0))},buttonRefs:j,isDisabled:a,isPressed:l,isExpanded:c,isPanelOpen:p,isPopupOpen:R,controlledElement:I,href:g}),N=_(M,cr(cr({},L),{},{children:[(r||n)&&E(Xt,{id:r,svgContent:n}),i&&E("span",{children:o})]}));return _("div",{className:pr(t,i,O,y,P),style:s?{display:"none"}:void 0,children:[i?N:E(ir,{content:o,children:N}),f&&E(Or,{slot:"".concat(Bt(t),"-button")}),R&&E(ar,{popupMenuId:I.id,buttonId:t,startPos:D,menuRef:A,items:m,setIsOpen:T})]})};function fr(e){var t,{btn:r,appState:n,appConfig:o,evaluateProp:i,groupStart:a,groupMiddle:l,groupEnd:c}=e,[s,p]=r,d=null!==(t=p[n.breakpoint])&&void 0!==t?t:{},u=function(e,t,r){var[,n]=e,o=!(!n.panelId||!t.openPanels[n.panelId]);return e=>{if("function"!=typeof n.onClick){if(n.panelId){var i=e.currentTarget;t.dispatch({type:o?"CLOSE_PANEL":"OPEN_PANEL",payload:o?n.panelId:{panelId:n.panelId,props:{triggeringElement:i}}})}}else n.onClick(e,r(e=>e,n.pluginId))}}(r,n,i),f=!(!p.panelId||!n.openPanels[p.panelId]);return E(ur,{buttonId:s,iconId:i(p.iconId,p.pluginId),iconSvgContent:i(p.iconSvgContent,p.pluginId),variant:p.variant,label:i(p.label,p.pluginId),href:i(p.href,p.pluginId),showLabel:d.showLabel,isDisabled:n.disabledButtons.has(s),isHidden:n.hiddenButtons.has(s),isPressed:void 0!==p.isPressed||p.pressedWhen?n.pressedButtons.has(s):void 0,isExpanded:void 0!==p.isExpanded||p.expandedWhen?n.expandedButtons.has(s):void 0,isPanelOpen:f,onClick:u,panelId:p.panelId,menuItems:p.menuItems,idPrefix:o.id,groupStart:a,groupMiddle:l,groupEnd:c},s)}function vr(e){var{slot:t,appState:r,appConfig:n,evaluateProp:o}=e,{buttonConfig:i,breakpoint:a}=r,l=function(e){var{appState:t,buttonConfig:r,slot:n,evaluateProp:o}=e,{breakpoint:i,mode:a}=t;return r?Object.entries(r).filter(e=>{var r,l,[c,s]=e,p=s[i];return!(s.isMenuItem||"function"==typeof s.excludeWhen&&o(s.excludeWhen,s.pluginId)||s.includeModes&&(null===(r=s.includeModes)||void 0===r||!r.includes(a))||null!==(l=s.excludeModes)&&void 0!==l&&l.includes(a)||!1===s.inline&&!t.isFullscreen||(null==p?void 0:p.slot)!==n||!Vt.button.includes(p.slot))}):[]}({appState:r,buttonConfig:i,slot:t,evaluateProp:o});if(!l.length)return[];var c=new Map;for(var[s,p]of(l.forEach((e,t)=>{var[,r]=e,n=r.group;null!=n&&(c.has(n)||c.set(n,[]),c.get(n).push(t))}),c))p.length<2&&c.delete(s);return l.map((e,t)=>{var i,l,[s,p]=e,d=p.group,u=null==d?null:c.get(d),f=!!u&&t===u[0],v=!!u&&t===u[u.length-1],m=u&&u.length>=3&&!f&&!v;return{id:s,type:"button",order:null!==(i=null===(l=p[a])||void 0===l?void 0:l.order)&&void 0!==i?i:0,element:fr({btn:e,appState:r,appConfig:n,evaluateProp:o,groupStart:f,groupMiddle:m,groupEnd:v})}})}var mr=["evaluateProp"];function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gr(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?br(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function yr(e){var{evaluateProp:r}=e,n=t(e,mr),o=function(e){var{slot:t,appState:r,evaluateProp:n}=e,{breakpoint:o,mode:i,pluginRegistry:a,controlConfig:l}=r;return Object.values(l).filter(e=>{var n,a,l,c;if(Kt(e))return!1;var s=e[o];if(!s)return!1;var p=Vt.control.includes(s.slot),d=null===(n=null===(a=e.includeModes)||void 0===a?void 0:a.includes(i))||void 0===n||n,u=null!==(l=null===(c=e.excludeModes)||void 0===c?void 0:c.includes(i))&&void 0!==l&&l;return!(!1===e.inline&&!r.isFullscreen)&&d&&!u&&s.slot===t&&p}).map(e=>{var t,r,i,l=a.registeredPlugins.find(t=>{var r;return null===(r=t.manifest)||void 0===r||null===(r=r.controls)||void 0===r?void 0:r.some(t=>t.id===e.id)}),c=null==l?void 0:l.id;if(e.html)i=E("div",{className:"im-c-control",dangerouslySetInnerHTML:{__html:n(e.html,c)}},e.id);else{var s=et(e.render,{pluginId:c,pluginConfig:null==l?void 0:l.config});i=E(s,{},e.id)}return{id:e.id,type:"control",order:null!==(t=null===(r=e[o])||void 0===r?void 0:r.order)&&void 0!==t?t:0,element:i}})}(gr({evaluateProp:r},n)),i=[...o,...nr(gr({evaluateProp:r},n)),...vr(gr({evaluateProp:r},n))],a=i.filter(e=>null==e.order||0===e.order),l=i.filter(e=>null!=e.order&&0!==e.order);l.sort((e,t)=>e.order-t.order);var c=[...a];for(var s of l){var p=Math.min(Math.max(s.order-1,0),c.length);c.splice(p,0,s)}return c}var hr=e=>{var{children:t}=e,{openPanels:r,panelConfig:n,breakpoint:o}=Ye(),i=["im-c-panel","im-c-actions",!p.Children.toArray(t).find(e=>{var t;return!1===(null===(t=e.props)||void 0===t?void 0:t.isHidden)})&&"im-c-actions--hidden",Object.keys(r).some(e=>{var t;return"mobile"===o&&"bottom"===(null===(t=n[e])||void 0===t||null===(t=t[o])||void 0===t?void 0:t.slot)})&&"im-c-actions--border-top"].filter(Boolean).join(" ");return E("div",{className:i,children:t})},Or=e=>{var{slot:t}=e,r=yr({slot:t,appConfig:S(),appState:Ye(),evaluateProp:lt()});return r.length?E(w,{children:"actions"===t?E(hr,{slot:t,children:r.map(e=>e.element)}):E(w,{children:r.map(e=>e.element)})}):null},Pr=(e,t,r,n,o)=>{f(()=>{var o=e.current;if(r){var i=((e,t)=>({side:t.sideRef,banner:t.bannerRef,"top-left":t.topLeftColRef,"top-right":t.topRightColRef,inset:t.insetRef,middle:t.middleRef,bottom:t.bottomRef,actions:t.actionsRef,modal:t.modalRef}[e]||null))(t,n);null!=i&&i.current&&(i.current.appendChild(o),o.style.display="")}else o.style.display="none";return()=>{o.style.display="none"}},[r,t,n,o,e])},Er=e=>{var{panelId:t,config:r,isOpen:n,openPanelProps:o,allowedModalPanelId:i,appState:a}=e,l=v(null),{breakpoint:c,mode:s,isFullscreen:p,layoutRefs:d}=a,u=r[c],f=u?Wt(u,c):null,m=(()=>{if(!n||!u||!f)return!1;var e="".concat(Bt(t),"-button")===f;if(!(Vt.panel.includes(f)||e))return!1;var o=u.modal&&t!==i,a=!1===r.inline&&!p,l=!Zt(r,s);return!(o||a||l)})();return Pr(l,f,m,d,c),E(er,{panelId:t,panelConfig:r,props:o,html:r.html,label:r.label,isOpen:n,rootRef:l})},_r=e=>{var{control:t,appState:r}=e,n=v(null),{breakpoint:o,mode:i,isFullscreen:a,layoutRefs:l}=r,c=t[o],s=((e,t)=>{var{breakpoint:r,mode:n,isFullscreen:o}=t,i=e[r];return!(!i||!Vt.control.includes(i.slot)||!Zt(e,n)||!1===e.inline&&!o)})(t,{breakpoint:o,mode:i,isFullscreen:a}),p=(null==c?void 0:c.slot)||null;Pr(n,p,s,l,o);var d=g(()=>({__html:t.html}),[t.html]);return E("div",{ref:n,className:"im-c-control",style:{display:"none"},dangerouslySetInnerHTML:d})},wr=()=>{var e=Ye(),{panelConfig:t={},controlConfig:r={},openPanels:n={},breakpoint:o}=e,i=g(()=>Object.entries(t).filter(e=>{var[t,r]=e;return Kt(r)}),[t]),a=g(()=>Object.values(r).filter(e=>Kt(e)),[r]),l=g(()=>{var e=Object.entries(n).filter(e=>{var r,[n]=e,i=null===(r=t[n])||void 0===r?void 0:r[o];return null==i?void 0:i.modal});return e.length>0?e[e.length-1][0]:null},[n,t,o]);return i.length||a.length?_(w,{children:[i.map(t=>{var r,[o,i]=t;return E(Er,{panelId:o,config:i,isOpen:!!n[o],openPanelProps:null===(r=n[o])||void 0===r?void 0:r.props,allowedModalPanelId:l,appState:e},o)}),a.map(t=>E(_r,{control:t,appState:e},t.id))]}):null},jr=()=>{var{id:e}=S(),{breakpoint:t,interfaceType:r,preferredColorScheme:n,layoutRefs:o,isLayoutReady:i,hasExclusiveControl:a,isFullscreen:l}=Ye(),{mapStyle:c}=qe();return function(){var{dispatch:e,breakpoint:t,layoutRefs:r}=Ye(),{mapSize:n,isMapReady:o}=qe(),{appContainerRef:i,mainRef:a,bannerRef:l,topRef:c,topLeftColRef:s,topRightColRef:p,insetRef:d,footerRef:u,actionsRef:f}=r,v=()=>{var e=i.current,t=a.current,r=c.current,n=s.current,o=p.current,l=d.current,v=u.current,m=f.current;if(t&&r&&l&&v){var b=document.documentElement,g=Number.parseInt(getComputedStyle(b).getPropertyValue("--divider-gap"),10),y=n.offsetHeight+r.offsetTop,h=t.offsetHeight-y-r.offsetTop;e.style.setProperty("--inset-offset-top","".concat(y,"px")),e.style.setProperty("--inset-max-height","".concat(h,"px"));var O=l.offsetHeight+y,P=Math.min(v.offsetTop,m.offsetTop)-g>O?0:l.offsetLeft+l.offsetWidth;e.style.setProperty("--offset-left","".concat(P,"px"));var E=o.offsetHeight+r.offsetTop,_=t.offsetHeight-v.offsetTop+g;e.style.setProperty("--right-offset-top","".concat(E,"px")),e.style.setProperty("--right-offset-bottom","".concat(_,"px"));var w=n.offsetWidth||0,j=o.offsetWidth||0,S=w||j?Math.max(w,j):0;e.style.setProperty("--top-col-width","".concat(S,"px"))}};y(()=>{requestAnimationFrame(()=>{v();var t=Pt(r);e({type:"SET_SAFE_ZONE_INSET",payload:{safeZoneInset:t}})})},[t,n,o]),Ht([l,a,c,f,u],()=>{requestAnimationFrame(()=>{v()})})}(),function(){var{interfaceType:e,layoutRefs:t}=Ye(),r=v(e);r.current=e,f(()=>{if(t.appContainerRef.current)return document.addEventListener("focusin",e),document.addEventListener("focusout",n),document.addEventListener("pointerdown",o),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),document.removeEventListener("pointerdown",o)};function e(e){e.target.dataset.focusVisible="keyboard"===r.current}function n(e){delete e.target.dataset.focusVisible}function o(){delete document.activeElement.dataset.focusVisible}},[t.appContainerRef])}(),_("div",{id:"".concat(e,"-im-app"),className:["im-o-app","im-o-app--".concat(t),"im-o-app--".concat(r),"im-o-app--".concat(l?"fullscreen":"inline"),"im-o-app--".concat((null==c?void 0:c.appColorScheme)||n,"-app"),"im-o-app--".concat((null==c?void 0:c.mapColorScheme)||"light","-map"),a&&"im-o-app--exclusive-control"].filter(Boolean).join(" "),style:{backgroundColor:(null==c?void 0:c.backgroundColor)||void 0},ref:o.appContainerRef,children:[E(zt,{keyboardHintPortalRef:o.topRef}),_("div",{className:"im-o-app__overlay".concat(i?"":" im-o-app__overlay--not-ready"),children:[E("div",{className:"im-o-app__side",ref:o.sideRef,children:E(Or,{slot:Gt.SIDE})}),_("div",{className:"im-o-app__main",ref:o.mainRef,children:[["mobile","tablet"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(Or,{slot:Gt.BANNER})}),_("div",{className:"im-o-app__top",ref:o.topRef,children:[E("div",{className:"im-o-app__top-col",ref:o.topLeftColRef,children:E(Or,{slot:Gt.TOP_LEFT})}),_("div",{className:"im-o-app__top-col",children:[E(Or,{slot:Gt.TOP_MIDDLE}),["desktop"].includes(t)&&E("div",{className:"im-o-app__banner",ref:o.bannerRef,children:E(Or,{slot:Gt.BANNER})})]}),E("div",{className:"im-o-app__top-col",ref:o.topRightColRef,children:E(Or,{slot:Gt.TOP_RIGHT})})]}),E("div",{className:"im-o-app__inset",ref:o.insetRef,children:E(Or,{slot:Gt.INSET})}),_("div",{className:"im-o-app__right",ref:o.rightRef,children:[E("div",{className:"im-o-app__right-top",children:E(Or,{slot:Gt.RIGHT_TOP})}),E("div",{className:"im-o-app__right-bottom",children:E(Or,{slot:Gt.RIGHT_BOTTOM})})]}),E("div",{className:"im-o-app__middle",ref:o.middleRef,children:E(Or,{slot:Gt.MIDDLE})}),_("div",{className:"im-o-app__footer",ref:o.footerRef,children:[E("div",{className:"im-o-app__footer-col",children:E(Ft,{})}),_("div",{className:"im-o-app__footer-col",children:[E(Or,{slot:Gt.FOOTER_RIGHT}),E("div",{className:"im-o-app__attributions",children:E(Ut,{})})]})]}),E("div",{className:"im-o-app__bottom",ref:o.bottomRef,children:E(Or,{slot:Gt.BOTTOM})}),E("div",{className:"im-o-app__actions",ref:o.actionsRef,children:E(Or,{slot:Gt.ACTIONS})})]})]}),E(wr,{}),_("div",{className:"im-o-app__modal",ref:o.modalRef,children:[E(Or,{slot:Gt.MODAL}),E("div",{className:"im-o-app__modal-backdrop"})]})]})},Sr=e=>(f(()=>{s(),e.eventBus.emit(i.APP_READY)},[]),E(ke,{options:e,children:E(ze,{options:e,children:E(Ue,{eventBus:e.eventBus,children:_(Ze,{children:[E(dt,{}),E(jr,{})]})})})})),Rr=["id","load","manifest"],Tr=["InitComponent","api","reducer"],Dr=["MapProvider","mapProviderConfig","mapFramework","plugins"];function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ar(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?kr(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Mr=new WeakMap,Cr=new WeakMap,Ir=new WeakMap,Lr=e=>{var t,r,n=Ir.get(e);if(!n){var o=X(),i=(r={},{registerPanel:e=>{r=ee(r,e)},addPanel:(e,t)=>(r=te(r,e,t))[e],removePanel:e=>{r=re(r,e)},getPanelConfig:()=>r,clear:()=>{r={}}}),a=(t={},{registerControl:e=>{t=ie(t,e)},addControl:(e,r)=>(t=ae(t,e,r))[e],getControlConfig:()=>t,clear:()=>{t={}}});n={buttonRegistry:o,panelRegistry:i,controlRegistry:a,pluginRegistry:ve({registerButton:o.registerButton,registerPanel:i.registerPanel,registerControl:a.registerControl})},Ir.set(e,n)}return n},Nr=function(){var e=r(function*(e,r){for(var n of e)if("function"==typeof n.load){var o=yield n.load(),{id:i,load:a,manifest:l}=n,c=t(n,Rr),{InitComponent:s,api:p,reducer:d}=o;r({id:i,InitComponent:s,api:p,reducer:d,config:c,manifest:ge(t(o,Tr),l),_originalPlugin:n})}});return function(t,r){return e.apply(this,arguments)}}();function Br(e,t){return xr.apply(this,arguments)}function xr(){return xr=r(function*(e,r){var o,{MapProvider:a,mapProviderConfig:l,mapFramework:c,plugins:s=[]}=r,p=t(r,Dr),{eventBus:d}=p,u=Cr.get(e);u||(u=new a({mapFramework:c,mapProviderConfig:l,events:i,eventBus:d}),Cr.set(e,u)),null!==(o=u.capabilities)&&void 0!==o&&o.supportedShortcuts&&function(){k=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])}(u.capabilities.supportedShortcuts);var{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b}=Lr(e),{registerPlugin:g}=b;b.clear(),g({id:"appConfig",manifest:B});var y=Mr.get(e);y||(y=n(e),Mr.set(e,y));var h={_root:y,on:d.on,off:d.off,emit:d.emit,unmount(){var t,r;y.unmount(),Mr.delete(e),null===(t=(r=u).destroyMap)||void 0===t||t.call(r),Cr.delete(e),b.clear()}};return yield Nr(s,g),y.render(E(Sr,Ar(Ar({},p),{},{buttonRegistry:f,panelRegistry:v,controlRegistry:m,pluginRegistry:b,mapProvider:u}))),h}),xr.apply(this,arguments)}export{Br as initialiseApp};