text: !function($,gmb){"use strict";function perform_places_search(a,e){for(var t=a.getCenter(),n=e.places_api.search_places,o=0;o<search_markers.length;o++)search_markers[o].setMap(null);if(search_markers=[],n.length>0){var i={key:gmb_data.api_key,location:new google.maps.LatLng(t.lat(),t.lng()),types:n,radius:e.places_api.search_radius};places_service.nearbySearch(i,function(t,n,o){var i,r=0;if(n==google.maps.places.PlacesServiceStatus.OK){for(r=0;i=t[r];r++)gmb.create_search_result_marker(a,t[r],e);o.hasNextPage&&o.nextPage()}})}}var map,places_service,place,directionsDisplay=[],search_markers=[];gmb.maps=[],gmb.init=function(){var a=$(".google-maps-builder");a.each(function(e,t){gmb.initialize_map($(a[e]))}),gmb.add_tab_support()},gmb.global_load=function(a){return $(a).hasClass("google-maps-builder")?void gmb.initialize_map(a):"invalid Google Maps Builder"},gmb.load_hidden_map=function(a){var e=$(a).find(".google-maps-builder");if(void 0!==e&&0!==e.length){var t=window.MapsBuilder.maps;e.each(function(a,e){var n=$(e).data("map-id");if(void 0!==n&&0!==n.length)if(void 0===t[n])gmb.initialize_map(map_canvas);else{google.maps.event.trigger(t[n],"resize");var o=gmb_data[n].map_params.latitude,i=gmb_data[n].map_params.longitude,r=new google.maps.LatLng(o,i);t[n].setCenter(r)}})}},gmb.initialize_map=function(a){var e=$(a).data("map-id"),t=gmb_data[e],n=t.map_params.latitude?t.map_params.latitude:"32.713240",o=t.map_params.longitude?t.map_params.longitude:"-117.159443",i={center:new google.maps.LatLng(n,o),zoom:parseInt(t.map_params.zoom),styles:[{stylers:[{visibility:"simplified"}]},{elementType:"labels",stylers:[{visibility:"off"}]}]};map=new google.maps.Map(a[0],i),places_service=new google.maps.places.PlacesService(map),gmb.set_map_options(map,t),gmb.set_map_theme(map,t),gmb.set_map_markers(map,t),gmb.set_mashup_markers(map,t),gmb.set_map_directions(map,t),gmb.set_map_layers(map,t),gmb.set_map_places_search(map,t),"yes"===t.places_api.show_places&&perform_places_search(map,t),gmb.maps[e]=map,$(document).trigger("gmb.initialize_map",[map,places_service,a])},gmb.set_map_theme=function(map,map_data){var map_type=map_data.map_theme.map_type.toUpperCase(),map_theme=map_data.map_theme.map_theme_json;"ROADMAP"===map_type&&"none"!==map_theme?map.setOptions({mapTypeId:google.maps.MapTypeId.ROADMAP,styles:eval(map_theme)}):map.setOptions({mapTypeId:google.maps.MapTypeId[map_type],styles:!1})},gmb.set_map_options=function(a,e){var t=e.map_controls.zoom_control.toLowerCase();"none"==t?a.setOptions({zoomControl:!1}):a.setOptions({zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle[t]}});var n=e.map_controls.wheel_zoom.toLowerCase();"none"===n?a.setOptions({scrollwheel:!1}):a.setOptions({scrollwheel:!0});var o=e.map_controls.pan_control.toLowerCase();"none"===o?a.setOptions({panControl:!1}):a.setOptions({panControl:!0});var i=e.map_controls.map_type_control;"none"==i?a.setOptions({mapTypeControl:!1}):a.setOptions({mapTypeControl:!0,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle[i]}});var r=e.map_controls.street_view.toLowerCase();"none"===r?a.setOptions({streetViewControl:!1}):a.setOptions({streetViewControl:!0});var s=e.map_controls.double_click_zoom.toLowerCase();"none"===s?a.setOptions({disableDoubleClickZoom:!0}):a.setOptions({disableDoubleClickZoom:!1});var m=e.map_controls.draggable.toLowerCase();"none"===m?a.setOptions({draggable:!1}):a.setOptions({draggable:!0})},gmb.set_map_markers=function(map,map_data){gmb.info_window_args={map:map,map_data:map_data,shadowStyle:gmb_data.infobubble_args.shadowStyle,padding:gmb_data.infobubble_args.padding,backgroundColor:gmb_data.infobubble_args.backgroundColor,borderRadius:gmb_data.infobubble_args.borderRadius,arrowSize:gmb_data.infobubble_args.arrowSize,minHeight:gmb_data.infobubble_args.minHeight,maxHeight:gmb_data.infobubble_args.maxHeight,minWidth:gmb_data.infobubble_args.minWidth,maxWidth:gmb_data.infobubble_args.maxWidth,borderWidth:gmb_data.infobubble_args.borderWidth,disableAutoPan:gmb_data.infobubble_args.disableAutoPan,disableAnimation:gmb_data.infobubble_args.disableAnimation,backgroundClassName:gmb_data.infobubble_args.backgroundClassName,closeSrc:gmb_data.infobubble_args.closeSrc};var map_markers=map_data.map_markers,markers=[];if(map.info_window=new GMB_InfoBubble(gmb.info_window_args),$(map_markers).each(function(index,marker_data){if(""!=marker_data.lat&&""!=marker_data.lng){var marker_label="",custom_marker_icon=marker_data.marker_img&&!isNaN(marker_data.marker_img_id)?marker_data.marker_img:"",marker_icon=map_data.map_params.default_marker,included_marker_icon=""!==marker_data.marker_included_img?marker_data.marker_included_img:"";included_marker_icon?marker_icon=map_data.plugin_url+included_marker_icon:custom_marker_icon?marker_icon=custom_marker_icon:"undefined"!=typeof marker_data.marker&&marker_data.marker.length>0&&"undefined"!=typeof marker_data.label&&marker_data.label.length>0&&(marker_icon=eval("("+marker_data.marker+")"),marker_label=marker_data.label);var marker_args={position:new google.maps.LatLng(marker_data.lat,marker_data.lng),map:map,zIndex:index,icon:marker_icon,custom_label:marker_label},location_marker=new Marker(marker_args);markers.push(location_marker),location_marker.setVisible(!0),google.maps.event.addListener(location_marker,"click",function(){map.info_window.close(),gmb.set_info_window_content(marker_data,map,map_data).done(function(){map.info_window.open(map,location_marker,map_data),"yes"==map_data.marker_centered&&window.setTimeout(function(){map.info_window.panToView()},300)})}),"undefined"!=typeof marker_data.infowindow_open&&"opened"==marker_data.infowindow_open&&google.maps.event.addListenerOnce(map,"idle",function(){gmb.set_info_window_content(marker_data,map,map_data).done(function(){map.info_window.open(map,location_marker,map_data)})})}}),"yes"===map_data.marker_cluster)var markerCluster=new MarkerClusterer(map,markers)},gmb.set_info_window_content=function(a,e,t){var n=$.Deferred(),o="";if("undefined"!=typeof a.title&&a.title.length>0&&(o+='<p class="place-title">'+a.title+"</p>"),"undefined"!=typeof a.description&&a.description.length>0&&(o+='<div class="place-description">'+a.description+"</div>"),"undefined"!=typeof a.place_id&&a.place_id&&"on"!==a.hide_details){var i={key:gmb_data.api_key,placeId:a.place_id};places_service.getDetails(i,function(a,i){i==google.maps.places.PlacesServiceStatus.OK&&(o+=gmb.set_place_content_in_info_window(a),e.info_window.setContent(o),e.info_window.updateContent_(),n.resolve(),"yes"==t.marker_centered&&window.setTimeout(function(){e.info_window.panToView()},300))})}else n.resolve(),e.info_window.setContent(o);return n},gmb.set_place_content_in_info_window=function(a){var e;return e='<div class="marker-info-wrapper">',a.adr_address&&(e+='<div class="place-address">',e+=a.adr_address,a.formatted_address&&(e+='<a href="https://www.google.com/maps/dir/Current+Location/'+encodeURIComponent(a.formatted_address)+'" class="place-directions-link" target="_blank" title="'+gmb_data.i18n.get_directions+'"><span class="place-icon"></span>'+gmb_data.i18n.get_directions+"</a>"),e+="</div>"),a.rating&&(e+='<div class="rating-wrap"><p class="numeric-rating">'+a.rating+'</p><div class="star-rating-wrap"><div class="star-rating-size" style="width:'+65*a.rating/5+'px;"></div></div></div>'),e+=a.formatted_phone_number?'<div class="place-phone"><a href="tel:'+a.international_phone_number.replace(/\s+/g,"")+'" class="place-tel-link"><span  class="place-icon"></span>'+a.formatted_phone_number+"</a></div>":"",e+=a.website?'<div class="place-website"><a href="'+a.website+'" target="_blank" rel="nofollow"><span class="place-icon"></span>'+gmb_data.i18n.visit_website+"</a></div>":"",e+="</div>"},gmb.create_search_result_marker=function(a,e,t){var n=new google.maps.Marker({map:a});n.setIcon({url:e.icon,size:new google.maps.Size(24,24),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(17,34),scaledSize:new google.maps.Size(24,24)}),n.setPosition(e.geometry.location),n.setVisible(!0),google.maps.event.addListener(n,"click",function(){a.info_window.close();var o={title:e.name,place_id:e.place_id};gmb.set_info_window_content(o,a,t).done(function(){a.info_window.open(a,n,t),"yes"==t.marker_centered&&window.setTimeout(function(){a.info_window.panToView()},300)})}),search_markers.push(n)},gmb.set_mashup_markers=function(a,e){if("undefined"==typeof e.mashup_markers||!e.mashup_markers)return!1;var t=[];$(e.mashup_markers).each(function(n,o){var i="undefined"!=typeof o.post_type?o.post_type:"",r="undefined"!=typeof o.taxonomy?o.taxonomy:"",s="undefined"!=typeof o.latitude?o.latitude:"",m="undefined"!=typeof o.longitude?o.longitude:"",_="undefined"!=typeof o.terms?o.terms:"",p={action:"get_mashup_markers",post_type:i,taxonomy:r,terms:_,index:n,lat_field:s,lng_field:m};jQuery.post(e.ajax_url,p,function(n){if($.each(n,function(n,i){var r=gmb.set_mashup_marker(a,p.index,i,o,e);r instanceof Marker&&t.push(r)}),"yes"===e.marker_cluster){new MarkerClusterer(a,t)}},"json")})},gmb.add_tab_support=function(){$(".responsive-tabs").on("click",".responsive-tabs__heading, .responsive-tabs__list__item",function(){gmb.load_hidden_map(".responsive-tabs__panel--active")}),$(".elementor-tabs").on("click",".elementor-tab-title",function(){var a=$(this).data("tab");gmb.load_hidden_map('.elementor-tab-content[data-tab="'+a+'"]')}),$(document).on("simple_slider_after_move_to",function(){gmb.load_hidden_map(".et-pb-active-slide")}),$('a[data-toggle="tab"]').on("shown.bs.tab",function(a){gmb.load_hidden_map($(a.target).attr("href"))}),$(".fl-tabs-label").on("click",function(){gmb.load_hidden_map($(".fl-tab-active"))}),$(".vc_tta-tabs").on("show.vc.tab",function(){gmb.load_hidden_map($(".vc_tta-panel.vc_active"))})},gmb.set_map_directions=function(a,e){},gmb.set_map_layers=function(a,e){},gmb.set_map_places_search=function(a,e){}}(jQuery,window.MapsBuilder||(window.MapsBuilder={})),jQuery(document).ready(function(){MapsBuilder.init();var a=document.createEvent("Event");a.initEvent("MapBuilderInit",!0,!0)}),window.google_maps_builder_load=function(a){return MapsBuilder.global_load(a)};