/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.maps_bundle_jsonpfunction=window.maps_bundle_jsonpfunction||[]).push([[20],{120:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var s=n(39),o=n.n(s);const a={};let i,c,l;const r={getGeoFieldNames(){const e=[];return Object.values(a).forEach((t=>{e.push(...t.getGeoFieldNames())})),o.a.uniq(e)},getLocation:()=>i,getMapPanels:()=>Object.keys(a).map((e=>({...a[e],id:e}))),hasMultipleMaps:()=>Object.keys(a).length>1,register(e,t){a[e]=t},setLocation(e,t,n,s){c&&c!==e||(c=e,l&&clearTimeout(l),l=setTimeout((()=>{c=void 0}),500),i={lat:t,lon:n,zoom:s},Object.keys(a).forEach((o=>{if(o===e)return;const i=a[o];i.getIsMovementSynchronized()&&i.onLocationChange(t,n,s)})))},unregister(e){delete a[e],0===Object.keys(a).length&&(i=void 0)}}},531:function(e,t,n){"use strict";n.r(t),n.d(t,"openModal",(function(){return r}));var s=n(4),o=n(14),a=n(43),i=n(120),c=n(5),l=n(3);function r(e){const{openModal:t}=Object(a.createReactOverlays)(Object(c.e)()),n=t(Object(l.jsx)(FilterByMapExtentModal,{onClose:()=>n.close(),title:e}))}class FilterByMapExtentModal extends s.Component{_renderSwitches(){return i.a.getMapPanels().map((e=>Object(l.jsx)(o.EuiFormRow,{display:"columnCompressedSwitch",key:e.id},Object(l.jsx)(o.EuiSwitch,{label:e.getTitle(),checked:e.getIsFilterByMapExtent(),onChange:t=>{const n=t.target.checked;e.setIsFilterByMapExtent(n),n&&i.a.getMapPanels().forEach((t=>{t.id!==e.id&&t.getIsFilterByMapExtent()&&t.setIsFilterByMapExtent(!1)})),this.forceUpdate()},compressed:!0,"data-test-subj":`filterByMapExtentSwitch${e.id}`}))))}render(){return Object(l.jsx)(s.Fragment,null,Object(l.jsx)(o.EuiModalHeader,null,Object(l.jsx)(o.EuiModalHeaderTitle,null,this.props.title)),Object(l.jsx)(o.EuiModalBody,null,this._renderSwitches()))}}}}]);