var generic=generic||{},Model=Model||{},google=google||{},site=site||{},Drupal=Drupal||{};!function(e){var o;Model.MapApi=o={loaded:!1,locatorData:null,init:function(t){if(t=t||"MapApi:init:complete",o.loaded||google&&google.maps)return e(document).trigger(t,o.loaded),null;o.loaded=!0,Drupal.settings.perlgem.pg_reqs;var a="en\tENGLISH".substring(0,"en\tENGLISH".indexOf("\t")),l="https:"==window.location.protocol?"https:":"http:",n=Drupal.settings.globals_variables.google_api_key??Drupal.settings.generic_google_api_key;e.when(e.getScript(l+"//maps.googleapis.com/maps/api/js?key="+n+"&sensor=false&language="+a+"&v=3.8")).done((function(){o.loaded=!0,o.locatorData=site&&site.locator&&site.locator.locationData?site.locator.locationData:null,e(document).trigger(t,o.data)}))},getLocatorData:function(){return o.locatorData},textToLatLng:function(o){(new google.maps.Geocoder).geocode({address:""+_.trim(o)},(function(o,t){if("OK"==t){var a=o.geometry.location;e(document).trigger("MapApi:textToLatLng:complete",a)}else alert("Geocode was not successful for the following reason: "+t)}))}}}(jQuery); //# sourceMappingURL=map_api_v1.min.js.map