function MsgGoogleMap(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et){this._sId=n;this._inEltPh=document.getElementById(n);this._inEltMap=document.getElementById(n+"_mapi");this._inEltCall=document.getElementById(n+"_mapia");this._inEltNat=document.getElementById(n+"_mapn");this._inEltS=document.getElementById(n+"_maps");this._sAddr=t;this._iZ=i;this._mapTypeId=r;this._map=null;this._dst=null;this._geocoder=null;this._iPWidth=u;this._iLWidth=f;this._bIsDesignMode=e;this._heading=c;this._pitch=l;this._streetViewZoom=a;this._inEltPanorama=document.getElementById(n+"_panorama");this._panorama=null;this._hideMainAddress=it;this._radius=rt?rt:"";this._unit=ut?ut:"";this._useLocations=ft?ft:"";this._locations=et?et.split(","):[];this.load=function(){var i,u,t,r,f,e,c;google&&google.maps&&(i=this,this._inEltMap!=null&&(this._inEltMap.style.display=""),this._inEltCall&&(this._inEltCall.style.display="none"),this._inEltS!=null&&(this._inEltS.style.display="none"),this._inEltNat!=null&&(this._inEltNat.style.display="none"),this._inEltPanorama!=null&&(this._inEltPanorama.style.display=""),this.multipleAddresses={"2":y,"3":p,"4":w,"5":b,"6":k,"7":d,"8":g,"9":nt,"10":tt},this.allValidMarkers=[],this.allValidCircles=[],this._geocoder=new google.maps.Geocoder,u={zoom:this._iZ,scrollwheel:!1,mapTypeId:this._mapTypeId},this._inEltMap!==null&&(this._map=new google.maps.Map(this._inEltMap,u),window["collapseContainerGoogleMap_"+n]=this._map),this._inEltPanorama!==null&&(this._panorama=new google.maps.StreetViewPanorama(this._inEltPanorama),h==="streetViewSideBySide"&&(window["collapseContainerGoogleStreetViewSideBySide_"+n]=this._panorama)),t=o!==null&&s!==null,r=t?new google.maps.LatLng(o,s):null,v==="cordinates"?(f=o!=null?o:51.477222,e=s!=null?s:0,this.latlng=new google.maps.LatLng(f,e),h==="normalMap"?this.setMapCenterForCoordinats(this.latlng):h==="streetView"?this.setStreetViewForCoordinates(this.latlng):h==="streetViewSideBySide"&&(this.setMapCenterForCoordinats(this.latlng),this.setStreetViewForCoordinates(this.latlng))):(v==="full"||v==="detailed")&&(h==="normalMap"||h==="streetViewSideBySide"?(c=this._radius===""&&this._unit===""&&this._hideMainAddress==="true"&&(this._useLocations!=="true"||!this._locations.length>0),t&&!c?this.handleMap(r,this._sAddr):this._geocoder.geocode({address:this._sAddr},function(n,t){i.handleGeocode(n,t)}),v==="full"&&this.checkMultipleAddressesArrayForGeocode(this.multipleAddresses,!1)):h==="streetView"&&(t?this.setStreetViewForCoordinates(r):this._geocoder.geocode({address:this._sAddr},function(n,t){i.handleGeocodeForStreetView(n,t)}))),this._useLocations!==""&&this._useLocations==="true"&&this._locations!=undefined&&this._locations.length>0&&this.checkMultipleAddressesArrayForGeocode(this._locations,!0))};this.handleGeocode=function(n,t){var i=this;t===google.maps.GeocoderStatus.OK?i.handleMap(n[0].geometry.location,n[0].formatted_address,n[0].address_components):(i.setMapErrorMessage(i._inEltMap),h==="streetViewSideBySide"&&i.setPanoramaErrorMessage(i._inEltPanorama))};this.handleMap=function(n,t,i){var r=this,u,f,e,o;r._dst=n;r._map.setCenter(r._dst);u="";r.getValidMultipleAddressesNumber(r.multipleAddresses)!==0&&(u="1");r._hideMainAddress!=="true"&&(f=r.getGoogleMarker(r._dst,t,u,!1),r.addMarkerToValidMarkersArray(f));r._radius!==""&&r._unit!==""?(e=r.getGoogleCircle(r._dst,parseInt(r._radius),r._unit),r.addCircleToValidCirclesArray(e),r.setMapBoundsForMultipleAddresses(r.allValidMarkers,r.allValidCircles)):i!==undefined&&r._hideMainAddress==="true"&&(r._useLocations!=="true"||!r._locations.length>0)&&(o=r.getCityOrStateFromAddress(i),r._geocoder.geocode({address:o.long_name},function(i,f){if(f===google.maps.GeocoderStatus.OK){var e=r.getGoogleMarker(n,t,u,!1);r.addMarkerToValidMarkersArray(e)}}));h==="streetViewSideBySide"&&r.setStreetViewForCoordinates(r._dst)};this.getCityOrStateFromAddress=function(n){var t=n.find(function(n){return n.types.includes("locality")});return t===null&&(t=n.find(function(n){return n.types.includes("country")})),t};this.handleGeocodeForStreetView=function(n,t){t===google.maps.GeocoderStatus.OK?this.setStreetViewForCoordinates(n[0].geometry.location):this.setPanoramaErrorMessage(this._inEltPanorama)};this.setStreetViewForCoordinates=function(t){var i=this,r={heading:i._heading,pitch:i._pitch,zoom:i._streetViewZoom},u=new google.maps.StreetViewService;u.getPanoramaByLocation(t,100,function(t,u){u===google.maps.StreetViewStatus.OK?(i._panorama=new google.maps.StreetViewPanorama(i._inEltPanorama,{position:t.location.latLng,pov:r}),h==="streetViewSideBySide"?i._map.setStreetView(i._panorama):h==="streetView"&&(i._panorama.setPano(t.location.pano),i._panorama.setPov(r),i._panorama.setVisible(!0),window["collapseContainerGoogleStreetView_"+n]=i._panorama)):i.setPanoramaErrorMessage(i._inEltPanorama)})};this.setMapCenterForCoordinats=function(n){this._map.setCenter(n);this.getGoogleMarker(n,this.getLatLngString(n),"",!1)};this.checkMultipleAddressesArrayForGeocode=function(n,t){var i=this;$.each(n,function(n,r){var u=n;r!==""&&setTimeout(function(){i._geocoder.geocode({address:r},function(n,r){i.handleGeocodeForMultipleAddresses(n,r,u,t)})},100)})};this.handleGeocodeForMultipleAddresses=function(n,t,i,r){if(t===google.maps.GeocoderStatus.OK){var u=this.getGoogleMarker(n[0].geometry.location,n[0].formatted_address,i.toString(),r);this.addMarkerToValidMarkersArray(u);this.setMapBoundsForMultipleAddresses(this.allValidMarkers,this.allValidCircles)}};this.setMapBoundsForMultipleAddresses=function(n,t){for(var r=new google.maps.LatLngBounds,i=0;i