/* Request ID: a1048df662d0d4a6bf46ecef89f882f1 (03/29/2024 7:52am) (FcMBCoAgDAXQG/mPFGt90Jg1nLrrRw8etgxk5r+YZFnO5ym8Fnyd1vSosxusbWYVI2ZlJ/QdROhoPgNuooxyxwc=) */ /* Resource ID: c580fb58f68979bb8d59cb75b9b (places.js, minified by uglifyjs) (01/22/2024 1:49pm) (A:9648, G:5039, K:5039) */ (function(M){var r=false;M.widget("lw.lwPlaces",{options:{scrollWheel:false,mapTypeId:null,selector:null},_create:function(){var e=this,t=this.element,a=this.options,i=JSON.parse(t.find(".lw_widget_json").text()),s=a.selector?t.find(a.selector):t.find(".lw_places_map"),o;this._markers=[];this._infoWindows=[];this._data={};if(i&&M.isArray(i.places)){this._data=i.places[0];if(this._data.markers&&typeof this._data.markers==="string"){o=JSON.parse(this._data.markers);if(o.markers){this._data.markers=o.markers}}}if(a.latitude)this._data.latitude=a.latitude;if(a.longitude)this._data.longitude=a.longitude;if(a.markers)this._data.markers=a.markers;if(a.zoom)this._data.zoom=a.zoom;if(!this._data.latitude||!this._data.longitude){return}var l=a.mapTypeId;if(!l){l=livewhale.googlemaps&&livewhale.googlemaps.map_type_id?google.maps.MapTypeId[livewhale.googlemaps.map_type_id.toUpperCase()]:google.maps.MapTypeId.ROADMAP}var n={};if(r){l="watercolor";n=[l]}this._map=new google.maps.Map(s.get(0),{zoom:this._data.zoom,scrollwheel:a.scrollWheel,mapTypeId:l,mapTypeControlOptions:n,center:new google.maps.LatLng(this._data.latitude,this._data.longitude),gestureHandling:"cooperative"});if(r){this._map.mapTypes.set(l,new google.maps.StamenMapType(l))}this.addMarkers(this._data.markers);google.maps.event.addListener(this._map,"zoom_changed",function(){if(!livewhale.is_details_template)e.adjustMarkers()});google.maps.event.addListener(this._map,"dragend",function(){if(!livewhale.is_details_template)e.adjustMarkers()})},addMarkers:function(e){var t=this.options,a=this._map.getCenter();t.zoom=this._map.getZoom();t.center=a.lat()+","+a.lng();for(var i in e){this.addMarker(e[i])}},addMarker:function(e){var a="",t={news:"8000FF",events:"FF8000",galleries:"0000FF",blurbs:"00BFFF",profiles:"088A29",images:"848484",aggregate:"FE7569"};if(e.results){M.each(e.results,function(e,t){a=a===t.content_type||a===""?t.content_type:"aggregate"})}if(a===""){a="aggregate"}var i=this,s=new google.maps.LatLng(e.latitude,e.longitude),o=t[a]?t[a]:t.aggregate,l="//chart.googleapis.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|"+o,n=new google.maps.Size(21,34),r=new google.maps.Point(0,0),p=new google.maps.Point(10,34),d=new google.maps.MarkerImage(l,n,r,p),g="",h,m,c,f;if(a==="profile"&&(location.hostname==="www.whitewhale.net"||location.hostname==="whitewhale.net")){d=new google.maps.MarkerImage("http://www.whitewhale.net/images/whales.png")}var u;if(e.title){u=""+e.title}else if(_.isArray(e.results)&&e.results.length&&e.results[0].location){u=e.results[0].location}h=new google.maps.Marker({position:s,map:this._map,title:u?livewhale.lib.htmlEncode(u):"Map Marker",icon:d});this._markers.push(h);if(e.results&&e.results[0]){c=e.results[1]?"":" one_result";g+='