PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
plugins
/
geo-my-wp
/
assets
/
js
var GMW={options:gmwVars.settings,geocode_provider:gmwVars.geocodingProvider||"google_maps",hooks:{action:{},filter:{}},map_elements:{},navigator_timeout:1e4,autocomplete_fields:void 0!==typeof gmwAutocompleteFields?{}:gmwAutocompleteFields,navigator_error_messages:{1:"User denied the request for Geolocation.",2:"Location information is unavailable.",3:"The request to get user location timed out.",4:"An unknown error occurred"},vars:{auto_locator:{status:!1,type:!1,callback:!1},locator_button:{status:!1,element:!1,id:!1,loader:!1,submit:!1},form_submission:{status:!1,form:!1,id:!1,submit:!1}},current_location_fields:["lat","lng","address","formatted_address","street","city","region_name","region_code","postcode","country_name","country_code"],init:function(){GMW.add_action("gmw_init"),jQuery("div.gmw-map-wrapper.gmw-expanded-map").length&&jQuery("body, html").addClass("gmw-scroll-disabled"),jQuery("div.gmw-form-wrapper, ul.gmw-form-wrapper").length&&GMW.form_functions(),navigator.geolocation&&1==GMW.options.general.auto_locate&&1!=GMW.get_cookie("gmw_autolocate")&&(GMW.set_cookie("gmw_autolocate",1,1),GMW.auto_locator("page_locator",GMW.page_locator_success,!1)),"undefined"!=typeof google&&jQuery("input.gmw-address-autocomplete").each(function(){jQuery(this).is("[id]")&&GMW.address_autocomplete(jQuery(this).attr("id"),jQuery(this).data())}),"undefined"!=typeof jQuery.ui&&jQuery.ui.draggable&&GMW.draggable_element(),GMW.toggle_element(),GMW.rangeslider(),GMW.date_picker()},add_action:function(o,e,t,a){GMW.add_hook("action",o,e,t,a)},add_filter:function(o,e,t,a){GMW.add_hook("filter",o,e,t,a)},do_action:function(o){GMW.do_hook("action",o,arguments)},apply_filters:function(o){return GMW.do_hook("filter",o,arguments)},remove_action:function(o,e){GMW.remove_hook("action",o,e)},remove_filter:function(o,e,t){GMW.remove_hook("filter",o,e,t)},add_hook:function(o,e,t,a,r){void 0==GMW.hooks[o][e]&&(GMW.hooks[o][e]=[]);var n=GMW.hooks[o][e];void 0==r&&(r=e+"_"+n.length),void 0==a&&(a=10),GMW.hooks[o][e].push({tag:r,callable:t,priority:a})},do_hook:function(o,e,t){if(t=Array.prototype.slice.call(t,1),void 0!=GMW.hooks[o][e]){var a,r=GMW.hooks[o][e];r.sort(function(o,e){return o.priority-e.priority});for(var n=0;n<r.length;n++)a=r[n].callable,"function"!=typeof a&&(a=window[a]),"action"==o?a.apply(null,t):t[0]=a.apply(null,t)}return"filter"==o?t[0]:void 0},remove_hook:function(o,e,t,a){if(void 0!=GMW.hooks[o][e])for(var r=GMW.hooks[o][e],n=r.length-1;n>=0;n--)void 0!=a&&a!=r[n].tag||void 0!=t&&t!=r[n].priority||r.splice(n,1)},set_cookie:function(o,e,t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3);var r=escape(encodeURIComponent(e))+(null==t?"":"; expires="+a.toUTCString());document.cookie=o+"="+r+"; path=/"},get_cookie:function(o){var e=document.cookie.match("(^|;) ?"+o+"=([^;]*)(;|$)");return e?decodeURIComponent(e[2]):null},delete_cookie:function(o){document.cookie=encodeURIComponent(o)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"},navigator:function(o,e){function t(t){GMW.geocoder([t.coords.latitude,t.coords.longitude],o,e)}function a(o){return e(GMW.navigator_error_messages[o.code])}return navigator.geolocation?void navigator.geolocation.getCurrentPosition(t,a,{timeout:GMW.navigator_timeout}):e("Sorry! Geolocation is not supported by this browser.")},geocoder:function(o,e,t){var a="undefined"!=typeof GMW.options.general.country_code?GMW.options.general.country_code:"us",r="undefined"!=typeof GMW.options.general.language_code?GMW.options.general.language_code:"en",n=new GMW_Geocoder(GMW.geocode_provider),s="object"==typeof o?"reverseGeocode":"geocode",i={q:o,region:a,language:r};n[s](i,function(o,a){return"OK"==a?"undefined"!=typeof e?e(o.result,o):GMW.geocoder_success(o.result,o):"undefined"!=typeof t?t(a,o):GMW.geocoder_failed(a,o)})},geocode:function(o,e,t,a,r){var n=new GMW_Geocoder(o);"reverse"==e&&(e="reverseGeocode"),n[e](t,function(o,e){return"OK"==e?"undefined"!=typeof a?a(o):GMW.geocoder_success(o):"undefined"!=typeof r?r(e,o):GMW.geocoder_failed(e,o)})},geocoder_success:function(){},geocoder_failed:function(o){alert("We could not find the address you entered for the following reason: "+o)},address_autocomplete:function(o,e){var t=document.getElementById(o);if(null!=t){var a={};"undefined"!=typeof e.autocomplete_countries&&(a.componentRestrictions={country:e.autocomplete_countries.split(",")}),"undefined"!=typeof e.autocomplete_types&&(a.types=[e.autocomplete_types]),a=GMW.apply_filters("gmw_address_autocomplete_options",a,o,t,GMW);var r=new google.maps.places.Autocomplete(t,a);google.maps.event.addListener(r,"place_changed",function(){var e=r.getPlace();if(GMW.do_action("gmw_address_autocomplete_place_changed",e,r,o,t,a),e.geometry){var n=jQuery(t.closest("form"));1==e.address_components.length&&"country"==e.address_components[0].types[0]?n.find(".gmw-country").val(e.address_components[0].short_name).prop("disabled",!1):2==e.address_components.length&&"administrative_area_level_1"==e.address_components[0].types[0]&&(n.find(".gmw-state").val(e.address_components[0].long_name).prop("disabled",!1),n.find(".gmw-country").val(e.address_components[1].short_name).prop("disabled",!1)),n.find(".gmw-lat").val(e.geometry.location.lat().toFixed(6)),n.find(".gmw-lng").val(e.geometry.location.lng().toFixed(6))}})}},save_location_fields:function(o){var e=jQuery("form#gmw-current-location-hidden-form");GMW.do_action("gmw_save_location_fields",o);for(fieldName in o)-1!==jQuery.inArray(fieldName,GMW.current_location_fields)&&GMW.set_cookie("gmw_ul_".fieldName,o[fieldName],7),e.find("input#gmw_cl_"+fieldName).val(o[fieldName]),GMW.do_action("gmw_save_location_field",o[fieldName],o);return o},auto_locator:function(o,e,t){GMW.vars.auto_locator.status=!0,GMW.vars.auto_locator.type=o,GMW.vars.auto_locator.success=e,GMW.vars.auto_locator.failed=t,GMW.navigator(GMW.auto_locator_success,GMW.auto_locator_failed)},auto_locator_success:function(o){address_fields=GMW.save_location_fields(o),0!=GMW.vars.auto_locator.success?GMW.vars.auto_locator.success(address_fields,o):(GMW.vars.auto_locator.status=!1,GMW.vars.auto_locator.type=!1,GMW.vars.auto_locator.success=!1,GMW.vars.auto_locator.failed=!1)},auto_locator_failed:function(o){0!=GMW.vars.auto_locator.failed?GMW.vars.auto_locator.failed(o):(alert(o),GMW.vars.auto_locator.status=!1,GMW.vars.auto_locator.type=!1,GMW.vars.auto_locator.success=!1,GMW.vars.auto_locator.failed=!1)},page_locator_success:function(o,e){GMW.vars.auto_locator.status=!1,GMW.vars.auto_locator.callback=!1,GMW.vars.auto_locator.type=!1,setTimeout(function(){jQuery("form#gmw-current-location-form").submit()},500)},form_functions:function(){GMW.enable_smartbox(),jQuery("form").find("input.gmw-address").keyup(function(o){if(13!=o.which){var e=jQuery(this).closest("form");e.find("input.gmw-lat, input.gmw-lng").val(""),e.find("input.gmw-state, input.gmw-country").val("").prop("disabled",!0)}}),jQuery("form").find(".gmw-locator-button").click(function(){GMW.locator_button(jQuery(this),jQuery(this).closest("form"))}),jQuery("form.gmw-form").submit(function(o){GMW.form_submission(jQuery(this),o)})},enable_smartbox:function(){jQuery().chosen?jQuery("form").find("select.gmw-smartbox").chosen({width:"100%"}):jQuery().select2&&jQuery("form").find("select.gmw-smartbox").select2()},form_submission:function(o,e){if(GMW.vars.form_submission.status=!0,GMW.vars.form_submission.form=o,GMW.vars.form_submission.id=GMW.vars.form_submission.form.find(".gmw-form-id").val(),1==GMW.vars.form_submission.submit)return!0;var t=o.find("input.gmw-address"),a="";return e.preventDefault(),o.find("input.gmw-paged").val("1"),t=GMW.apply_filters("gmw_search_form_address_pre_geocoding",t,GMW),a=t.map(function(){return jQuery(this).val()}).get().join(" "),jQuery.trim(a).length?""!=o.find("input.gmw-lat").val()&&""!=o.find("input.gmw-lng").val()?(GMW.vars.form_submission.submit=!0,GMW.vars.form_submission.form.submit(),!1):void GMW.geocoder(a,GMW.form_geocoder_success,GMW.geocoder_failed):t.hasClass("mandatory")?(t.hasClass("gmw-no-address-error")||(t.addClass("gmw-no-address-error").on("focus keypress",function(){jQuery(this).removeClass("gmw-no-address-error").off("focus keypress")}),setTimeout(function(){t.removeClass("gmw-no-address-error").off("focus keypress")},4e3)),!1):(GMW.vars.form_submission.submit=!0,GMW.vars.form_submission.form.submit(),!1)},form_geocoder_success:function(o){var e=GMW.vars.form_submission.form;return"country"==o.level?e.find(".gmw-country").val(o.country_code).prop("disabled",!1):"region"==o.level&&(e.find(".gmw-state").val(o.region_name).prop("disabled",!1),e.find(".gmw-country").val(o.country_code).prop("disabled",!1)),e.find(".gmw-lat").val(parseFloat(o.lat).toFixed(6)),e.find(".gmw-lng").val(parseFloat(o.lng).toFixed(6)),setTimeout(function(){GMW.vars.form_submission.submit=!0,GMW.vars.form_submission.form.submit()},300),!1},locator_button:function(o,e){var t;t="undefined"==typeof e?o.closest("form"):e,jQuery("form.gmw-form").find('input[type="text"], .gmw-submit').attr("disabled","disabled"),GMW.vars.locator_button.status=!0,GMW.vars.locator_button.form=t,GMW.vars.locator_button.element=o,GMW.vars.locator_button.form_id=o.data("form_id"),GMW.vars.locator_button.loader=o.next(),GMW.vars.locator_button.submit=1==o.attr("data-locator_submit")?!0:!1,t.find("input.gmw-lat, input.gmw-lng").val(""),t.find("input.gmw-state, input.gmw-country").val("").prop("disabled",!0),o.hasClass("inside")?o.addClass("animate-spin"):o.hasClass("text")?GMW.vars.locator_button.loader.fadeIn("fast"):o.fadeOut("fast",function(){GMW.vars.locator_button.loader.fadeIn("fast")}),setTimeout(function(){GMW.auto_locator("locator_button",GMW.locator_button_success,GMW.locator_button_failed)},500)},locator_button_success:function(o){var e=GMW.vars.locator_button.form,t=e.find("input.gmw-address");jQuery("form.gmw-form").find('input[type="text"], .gmw-submit').removeAttr("disabled"),e.find("input.gmw-lat").val(parseFloat(o.lat).toFixed(6)),e.find("input.gmw-lng").val(parseFloat(o.lng).toFixed(6)),t.hasClass("gmw-full-address")?t.val(o.formatted_address):(e.find(".gmw-address.street").val(o.street),e.find(".gmw-address.city").val(o.city),e.find(".gmw-address.state").val(o.region_name),e.find(".gmw-address.zipcode").val(o.postcode),e.find(".gmw-address.country").val(o.country_code)),GMW.vars.locator_button.submit?setTimeout(function(){e.find(".gmw-submit").click(),GMW.locator_button_done()},500):GMW.locator_button_done()},locator_button_failed:function(o){alert("Geocoder failed due to: "+o),GMW.locator_button_done()},locator_button_done:function(){var o=GMW.vars.locator_button.element;jQuery("form.gmw-form").find('input[type="text"], .gmw-submit').removeAttr("disabled"),o.hasClass("inside")?o.removeClass("animate-spin"):GMW.vars.locator_button.loader.fadeOut("fast",function(){o.fadeIn("fast")}),setTimeout(function(){GMW.vars.locator_button.status=!1,GMW.vars.locator_button.element=!1,GMW.vars.locator_button.form_id=!1,GMW.vars.locator_button.loader=!1,GMW.vars.locator_button.submit=!1},500)},rangeslider:function(){jQuery("form").find("input.gmw-range-slider").on("input change",function(){jQuery(this).prev("span, label").find("output").html(jQuery(this).val())})},date_picker:function(){var o=jQuery(".gmw-date-field"),e=jQuery(".gmw-time-field");o.length>0&&"undefined"!=typeof jQuery.fn.pickadate&&o.each(function(){var o=jQuery(this).data("date_type");jQuery(this).pickadate({format:o||"yyyy/mm/dd"})}),e.length>0&&"undefined"!=typeof jQuery.fn.pickatime&&e.each(function(){jQuery(this).pickatime({interval:1})})},draggable_element:function(){jQuery(".gmw-draggable.remote-toggle").each(function(){var o=jQuery(this).data(),e=jQuery(o.handle);e.addClass("gmw-draggable").attr("data-draggable",o.draggable).attr("data-containment",o.containment)}),jQuery(document).on("mouseenter",".gmw-draggable",function(o){if(!jQuery(this).hasClass("enabled")){jQuery(this).addClass("enabled");var e=jQuery(this).data();"global_map"==e.draggable&&(e.draggable=jQuery(this).closest(".gmw-form-wrapper"),e.containment=jQuery(this).closest(".gmw-global-map-wrapper")),jQuery(e.draggable).draggable({containment:e.containment,handle:jQuery(this)})}})},toggle_element:function(){jQuery(document).on("click",".gmw-element-toggle-button",function(o){var e=jQuery(this),t=jQuery(this).data(),a=jQuery(t.target),r={};e.toggleClass(t.show_icon).toggleClass(t.hide_icon),"expand"==e.attr("data-state")?(r[t.animation]=t.close_length,e.attr("data-state","collapse"),a.attr("data-state","collapse")):(r[t.animation]=t.open_length,e.attr("data-state","expand"),a.attr("data-state","expand")),"height"==t.animation||"width"==t.animation?a.animate(r,t.duration):a.addClass("gmw-toggle-element").css(t.animation,r[t.animation])})},get_field_by_string:function(o,e){e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");for(var t=e.split("."),a=0,r=t.length;r>a;++a){var n=t[a];if(!(n in o))return"";o=o[n]}return"undefined"!==o?o:""}};
[+]
..
[-] gmw.directions.min.js
[edit]
[-] gmw.core.js
[edit]
[-] gmw.min.js
[edit]
[-] gmw.core.min.js
[edit]
[-] gmw.current.location.js
[edit]
[-] gmw.admin.js
[edit]
[-] gmw.map.min.js
[edit]
[-] gmw.geocoder.js
[edit]
[-] gmw.extensions.min.js
[edit]
[-] gmw.admin.min.js
[edit]
[-] gmw.js
[edit]
[-] gmw.map.js
[edit]
[-] gmw.directions.js
[edit]
[-] gmw.extensions.js
[edit]