1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2671],{4808:function(i,e,n){n.r(e),n.d(e,{default:function(){return u}});var t,s=n(4575),a=n.n(s),o=n(3913),r=n.n(o),h=n(9713),d=n.n(h),p=n(7041),l=n(4466),u=function(){function i(e){var n=e.outerEl,t=e.latKey,s=void 0===t?"lat":t,o=e.lngKey,r=void 0===o?"lng":o,h=e.mapOptions,l=void 0===h?{}:h,u=e.onMapReady,c=void 0===u?function(){}:u,v=e.onMarkerClick,f=void 0===v?function(){}:v,m=e.onMarkersBoundsChange,y=void 0===m?function(){}:m,k=e.points,g=void 0===k?[]:k,M=e.mapElSelector,C=void 0===M?"[data-map]":M;a()(this,i),d()(this,"latKey",void 0),d()(this,"lngKey",void 0),d()(this,"map",null),d()(this,"markers",[]),d()(this,"onMarkersBoundsChange",void 0),d()(this,"onMapReady",void 0),d()(this,"onMarkerClick",void 0),d()(this,"outerEl",void 0),d()(this,"points",void 0),d()(this,"isApiReady",void 0),d()(this,"isMapReady",void 0),d()(this,"mapEl",void 0),d()(this,"apiKey",void 0),d()(this,"mapOptions",void 0),d()(this,"listenerBoss",void 0),d()(this,"loadingClass","loading"),d()(this,"boundsHaveChanged",!0),this.isMapReady=!1,this.isApiReady=!1,this.outerEl=n,this.latKey=s,this.lngKey=r,this.mapOptions=l,this.onMapReady=c,this.onMarkerClick=f,this.onMarkersBoundsChange=y,this.points=g,this.listenerBoss=new p.Z,this.mapEl=this.outerEl.querySelector(C),this.mapEl?this.loadTheApi():console.error("the map element could not be found",C)}return r()(i,[{key:"loadTheApi",value:function(){var i=this;this.mapEl.classList.add(this.loadingClass),new l.Z((function(e){t=e,i.apiIsReady()}))}},{key:"apiIsReady",value:function(){this.isApiReady=!0,this.mapEl.classList.remove(this.loadingClass),this.map=new t.maps.Map(this.mapEl,this.mapOptions),this.initialSetup()}},{key:"initialSetup",value:function(){var i=this;this.mapEl&&this.isApiReady&&(this.isMapReady?this.mapReady():t.maps.event.addListenerOnce(this.map,"idle",(function(){i.isMapReady=!0,i.mapReady()})))}},{key:"mapReady",value:function(){var i=this;this.setUpMarkers(),this.listenerBoss.register(window,"resize",(function(){i.boundsHaveChanged=!0,i.centerMap()})),this.listenerBoss.register(window,"site.print",(function(){i.updateMapBounds(!0),i.boundsHaveChanged=!0,i.centerMap()})),"function"==typeof this.onMapReady&&this.onMapReady.call(this,this.map,this.markers)}},{key:"setUpMarkers",value:function(){var i=this;this.points.forEach((function(e,n){var s=e[i.latKey],a=e[i.lngKey];if(s&&a){var o=new t.maps.Marker({icon:e.hasOwnProperty("icon")?e.icon:null,map:i.map,opacity:e.hasOwnProperty("opacity")?e.opacity:1,optimized:!1,point:e,position:{lat:parseFloat(e[i.latKey]),lng:parseFloat(e[i.lngKey])},title:e.hasOwnProperty("title")?e.title:null,zIndex:n});i.markers.push(o),"function"==typeof i.onMarkerClick&&o.addListener("click",(function(){return i.onMarkerClick(o,i.map)}))}else console.error("Missing lat and/or lng",e)})),this.updateMapBounds()}},{key:"removePoints",value:function(){this.markers.length&&(this.markers.forEach((function(i){i.setMap(null)})),this.markers=[]),this.points=[]}},{key:"changePoints",value:function(i){this.removePoints(),this.points=i,this.initialSetup()}},{key:"centerMap",value:function(){if(this.map&&this.boundsHaveChanged){var i=this.map.getCenter();t.maps.event.trigger(this.map,"resize"),this.map.setCenter(i)}}},{key:"updateMapBounds",value:function(){var i=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.map&&(this.boundsHaveChanged||e)){this.boundsHaveChanged=!1;var n=!1,s=new t.maps.LatLngBounds;this.markers.forEach((function(i){i.getVisible()&&(n=!0,s.extend(i.getPosition()))})),n&&(t.maps.event.addListenerOnce(this.map,"bounds_changed",(function(){"function"==typeof i.onMarkersBoundsChange&&i.onMarkersBoundsChange(i.map),t.maps.event.addListenerOnce(i.map,"bounds_changed",(function(){i.boundsHaveChanged=!0}))})),this.map.fitBounds(s))}}},{key:"resetMarkerZIndexes",value:function(){this.markers.forEach((function(i,e){i.setZIndex(e)}))}}]),i}()},4466:function(i,e,n){n.d(e,{Z:function(){return u}});var t=n(4575),s=n.n(t),a=n(3913),o=n.n(a),r=["places"],h=!1,d=!1,p=[],l=null,u=function(){function i(e){s()(this,i),d?e(l):(p.push(e),h||(h=!0,this.load()))}return o()(i,[{key:"load",value:function(){var i=window.mapsKey||"";i?n.e(567).then(n.bind(n,7708)).then((function(e){new(0,e.Loader)(i,{libraries:r}).load().then((function(i){l=i,d=!0,p.forEach((function(i){i(l)})),p=[]}))})):console.warn('No Google Maps API key was found. Please assign it to "windows.mapsKey".')}}]),i}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.