jQuery(function($){var core={MARKER_PULL_DATABASE:"0",MARKER_PULL_XML:"1",PAGE_MAP_LIST:"map-list",PAGE_MAP_EDIT:"map-edit",PAGE_SETTINGS:"map-settings",PAGE_STYLING:"map-styling",PAGE_SUPPORT:"map-support",PAGE_INSTALLER:"installer",PAGE_CATEGORIES:"categories",PAGE_ADVANCED:"advanced",PAGE_CUSTOM_FIELDS:"custom-fields",PAGE_INSIGHTS:"insights",PAGE_PRO_FEATURES:"pro-features",MOBILE_RESOLUTION_THRESHOLD:1e3,maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'
...
',preloaderHTML:"
",getCurrentPage:function(){switch(WPGMZA.getQueryParamValue("page")){case"wp-google-maps-menu":return window.location.href.match(/action=edit/)&&window.location.href.match(/map_id=\d+/)?WPGMZA.PAGE_MAP_EDIT:window.location.href.match(/action=installer/)?WPGMZA.PAGE_INSTALLER:WPGMZA.PAGE_MAP_LIST;case"wp-google-maps-menu-settings":return WPGMZA.PAGE_SETTINGS;case"wp-google-maps-menu-styling":return WPGMZA.PAGE_STYLING;case"wp-google-maps-menu-support":return WPGMZA.PAGE_SUPPORT;case"wp-google-maps-menu-categories":return WPGMZA.PAGE_CATEGORIES;case"wp-google-maps-menu-advanced":return WPGMZA.PAGE_ADVANCED;case"wp-google-maps-menu-custom-fields":return WPGMZA.PAGE_CUSTOM_FIELDS;case"wp-google-maps-menu-insights":return WPGMZA.PAGE_INSIGHTS;case"wp-google-maps-menu-pro-features":return WPGMZA.PAGE_PRO_FEATURES;default:return null}},getScrollAnimationOffset:function(){return(WPGMZA.settings.scroll_animation_offset||0)+($("#wpadminbar").height()||0)},getScrollAnimationDuration:function(){return WPGMZA.settings.scroll_animation_milliseconds||500},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},extend:function(child,parent){var constructor=child;child.prototype=Object.create(parent.prototype),child.prototype.constructor=constructor},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(colour,opacity){colour=parseInt(colour.replace(/^#/,""),16);return[(16711680&colour)>>16,(65280&colour)>>8,255&colour,parseFloat(opacity)]},hexOpacityToString:function(colour,opacity){colour=WPGMZA.hexOpacityToRGBA(colour,opacity);return"rgba("+colour[0]+", "+colour[1]+", "+colour[2]+", "+colour[3]+")"},hexToRgba:function(hex){return/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)?{r:(hex="0x"+(hex=3==(hex=hex.substring(1).split("")).length?[hex[0],hex[0],hex[1],hex[1],hex[2],hex[2]]:hex).join(""))>>16&255,g:hex>>8&255,b:255&hex,a:1}:0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(str){return"string"==typeof str&&(str=(str=str.match(/^\(.+\)$/)?str.replace(/^\(|\)$/,""):str).match(WPGMZA.latLngRegexp))?new WPGMZA.LatLng({lat:parseFloat(str[1]),lng:parseFloat(str[3])}):null},stringToLatLng:function(str){str=WPGMZA.isLatLngString(str);if(str)return str;throw new Error("Not a valid latLng")},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){var img;WPGMZA.imageDimensionsCache[src]?callback(WPGMZA.imageDimensionsCache[src]):((img=document.createElement("img")).onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src)},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback,config){var file_frame;file_frame?file_frame.uploader.uploader.param("post_id",set_to_post_id):(file_frame=wp.media.frames.file_frame=config?wp.media(config):wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){file_frame.state().get("selection").each(function(attachment_model){attachment_model=attachment_model.toJSON();callback(attachment_model.id,attachment_model.url,attachment_model)})}),file_frame.open()},getCurrentPosition:function(callback,error,watch){var nativeFunction="getCurrentPosition";if(WPGMZA.userLocationDenied)error&&error({code:1,message:"Location unavailable"});else if(watch&&(nativeFunction="watchPosition"),navigator.geolocation){let highPrecision=!0;var options={enableHighAccuracy:highPrecision=WPGMZA.settings&&WPGMZA.settings.userLocationPrecision&&"low"===WPGMZA.settings.userLocationPrecision?!1:highPrecision};navigator.geolocation[nativeFunction]?navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){console.warn(err.code,err.message),1==err.code&&(WPGMZA.userLocationDenied=!0),error&&error(err)},options)},options):console.warn(nativeFunction+" is not available")}else console.warn("No geolocation available on this device")},watchPosition:function(callback,error){return WPGMZA.getCurrentPosition(callback,error,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){callback=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(callback.element),$(friendlyErrorContainer).show()}},capitalizeWords:function(string){return(string+"").replace(/^(.)|\s+(.)/g,function(m){return m.toUpperCase()})},pluralize:function(string){return WPGMZA.singularize(string)+"s"},singularize:function(string){return string.replace(/s$/,"")},assertInstanceOf:function(instance,instanceName){var engine,pro=WPGMZA.isProVersion()?"Pro":"";switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":engine="OL";break;case"leaflet":case"leaflet-azure":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-locationiq":case"leaflet-zerocost":engine="Leaflet";break;default:engine="Google"}if("OLFeature"!=(pro=WPGMZA[engine+pro+instanceName]&&engine+instanceName!="OLFeature"&&engine+instanceName!="LeafletFeature"&&engine+instanceName!="GoogleFeature"?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]&&WPGMZA[engine+instanceName].prototype?engine+instanceName:instanceName)&&"LeafletFeature"!=pro&&"GoogleFeature"!=pro&&!(instance instanceof WPGMZA[pro]))throw new Error("Object must be an instance of "+pro+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){for(var i=0;i${text}`;jQuery(container).append(anchor),0{jQuery(container).find(".wpgmza-popup-notification").addClass("animate-end")},time-300),setTimeout(()=>{jQuery(container).find(".wpgmza-popup-notification").remove()},time)},initMaps:function(){$(document.body).find(".wpgmza_map:not(.wpgmza-initialized)").each(function(index,el){if(el.wpgmzaMap)return WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code?void 0:void console.warn("Element missing class wpgmza-initialized but does have wpgmzaMap property. No new instance will be created");try{el.wpgmzaMap=WPGMZA.Map.createInstance(el)}catch(ex){WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(el.wpgmzaMap=!1)}}),WPGMZA.Map.nextInitTimeoutID=setTimeout(WPGMZA.initMaps,2e3)},initCapsules:function(){WPGMZA.capsuleModules=WPGMZA.CapsuleModules.createInstance()},onScroll:function(){$(".wpgmza_map").each(function(index,el){var isInView=WPGMZA.isElementInView(el);el.wpgmzaScrollIntoViewTriggerFlag?isInView||(el.wpgmzaScrollIntoViewTriggerFlag=!1):isInView&&($(el).trigger("mapscrolledintoview.wpgmza"),el.wpgmzaScrollIntoViewTriggerFlag=!0)})},initInstallerRedirect:function(url){$(".wpgmza-wrap").hide(),window.location.href=url},delayedReloader(){setTimeout(()=>{try{WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.accessibility=WPGMZA.Accessibility.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document.body).trigger("preinit.wpgmza"),WPGMZA.initMaps(),WPGMZA.onScroll(),WPGMZA.initCapsules(),$(document.body).trigger("postinit.wpgmza")}catch(ex){WPGMZA.delayedReloader()}},1e3)}},wpgmzaisFullScreen=!1;for(key in[]){console.warn("It appears that the built in JavaScript Array has been extended, this can create issues with for ... in loops, which may cause failure.");break}for(key in window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,window.uc&&window.uc.reloadOnOptIn&&(window.uc.reloadOnOptIn("S1pcEj_jZX"),window.uc.reloadOnOptOut("S1pcEj_jZX")),WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}var apiKeyIndex;for(apiKeyIndex of["googleMapsApiKey","wpgmza_google_maps_api_key","google_maps_api_key"])WPGMZA.settings[apiKeyIndex]&&(WPGMZA.settings[apiKeyIndex]=atob(WPGMZA.settings[apiKeyIndex]));var key,wpgmzaisFullScreen=!1;for(key in[]){console.warn("It appears that the built in JavaScript Array has been extended, this can create issues with for ... in loops, which may cause failure.");break}window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,window.uc&&window.uc.reloadOnOptIn&&(window.uc.reloadOnOptIn("S1pcEj_jZX"),window.uc.reloadOnOptOut("S1pcEj_jZX"));try{if(WPGMZA&&WPGMZA.settings&&WPGMZA.settings.disable_google_fonts){const _wpgmzaGoogleFontDisabler={head:document.getElementsByTagName("head")[0]};_wpgmzaGoogleFontDisabler.head&&(_wpgmzaGoogleFontDisabler.insertBefore=_wpgmzaGoogleFontDisabler.head.insertBefore,_wpgmzaGoogleFontDisabler.head.insertBefore=(nElem,rElem)=>{var excl;if(nElem.href&&-1!==nElem.href.indexOf("//fonts.googleapis.com/css"))for(excl of["Roboto","Google"])if(-1!==nElem.href.indexOf("?family="+excl))return;_wpgmzaGoogleFontDisabler.insertBefore.call(_wpgmzaGoogleFontDisabler.head,nElem,rElem)})}}catch(_wpgmzaDisableFontException){}for(key in WPGMZA_localized_data){value=WPGMZA_localized_data[key];WPGMZA[key]=value}WPGMZA.settings.useLegacyGlobals=!0,$(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange",function(){wpgmzaisFullScreen=!!document.fullscreenElement,$(document.body).trigger("fullscreenchange.wpgmza")}),$("body").on("click","#wpgmzaCloseChat",function(e){e.preventDefault(),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_hide_chat",nonce:WPGMZA_localized_data.ajaxnonce}}),$(".wpgmza-chat-help").remove()}),$(window).on("scroll",WPGMZA.onScroll),$(document.body).on("click","button.wpgmza-api-consent",function(event){Cookies.set("wpgmza-api-consent-given",!0),window.location.reload()}),$(document.body).on("keydown",function(event){event.altKey&&(WPGMZA.altKeyDown=!0)}),$(document.body).on("keyup",function(event){event.altKey||(WPGMZA.altKeyDown=!1)}),$(document.body).on("preinit.wpgmza",function(){$(window).trigger("ready.wpgmza"),$(document.body).trigger("ready.body.wpgmza"),$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var key,elements=$("script[src]").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});1

'+WPGMZA.localized_strings.unsecure_geolocation+"

",$(".wpgmza-geolocation-setting").first().after($(elements))),WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code&&jQuery(".wpgmza-gdpr-compliance").length<=0&&($(".wpgmza-inner-stack").hide(),$("button.wpgmza-api-consent").on("click",function(event){Cookies.set("wpgmza-api-consent-given",!0),window.location.reload()}))}),function($){$(function(){try{WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.accessibility=WPGMZA.Accessibility.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document.body).trigger("preinit.wpgmza"),WPGMZA.initMaps(),WPGMZA.onScroll(),WPGMZA.initCapsules(),$(document.body).trigger("postinit.wpgmza")}catch(ex){WPGMZA&&"function"==typeof WPGMZA.delayedReloader&&WPGMZA.delayedReloader()}})}($)}),jQuery(function($){WPGMZA.Accessibility=function(){this.bind(),$(document.body).trigger("init.accessibility.wpgmza")},WPGMZA.Accessibility.createInstance=function(){return new WPGMZA.Accessibility},WPGMZA.Accessibility.prototype.bind=function(){var event,ariaEventGroupings={keydown:{keys:["Enter"],prevent:[" "]},keyup:{keys:[" "]}};for(event in ariaEventGroupings){const config=ariaEventGroupings[event];$(document.body).on(event,".wpgmza_map .wpgmza-aria-bridge, .wpgmza-standalone-component .wpgmza-aria-bridge",function(event){event&&event.key&&(config.keys&&-1!==config.keys.indexOf(event.key)&&(event.preventDefault(),$(this).trigger("click")),config.prevent)&&-1!==config.prevent.indexOf(event.key)&&event.preventDefault()})}$(document.body).on("focusin",".wpgmza_map .grouping:not(.visible)",function(event){$(this).parent().find(".grouping-handle .icon").click()}),$(document.body).on("keyup",".wpgmza_map .grouping.visible",function(event){event&&event.key&&"Escape"===event.key&&$(this).parent().find(".grouping-handle .icon").click()})}}),jQuery(function($){function L(key,fallback){return WPGMZA.localized_strings&&WPGMZA.localized_strings[key]||fallback}"map-edit"==WPGMZA.currentPage&&document.querySelector(".wpgmza-atlas-major")&&(WPGMZA.AtlasMajorAutoSave=function(){var self=this;if(this.form=$("#wpgmaps_options"),this.form.length){this.pill=$(".am-save-pill"),this.pauseToggle=$(".am-autosave-pause-toggle"),this.saveButtons=$('label[for="wpgmza_savemap"]'),this.saveButtonOriginalText=this.saveButtons.first().text(),this.pollIntervalMs=1e4,this.paused=!0;try{window.localStorage&&"1"===localStorage.getItem("wpgmza_autosave_enabled")&&(this.paused=!1)}catch(e){}var self2=this;this.saveButtons.on("click",function(e){if($(this).hasClass("is-disabled"))return e.preventDefault(),e.stopImmediatePropagation(),!1;self2.setSaveButtonState("saving")}),this.fallbackDelayMs=3e3,this.changeDebounceMs=1500,this.gracePeriodMs=3e3,this.inFlight=!1,this.pendingFlush=!1,this.fallbackTimer=null,this.changeTimer=null,this.ready=!1,setTimeout(function(){self.lastHash=self.hashForm(),self.ready=!0,self.attachListeners()},this.gracePeriodMs),this.attachPauseToggle(),this.refreshPauseToggleUI(),this.attachReminderPillTimer()}},WPGMZA.AtlasMajorAutoSave.prototype.attachReminderPillTimer=function(){var last,self=this,pillEl=document.getElementById("wpgmaps_save_reminder"),latEl=document.querySelector('input[name="map_start_lat"]'),lngEl=document.querySelector('input[name="map_start_lng"]'),zoomEl=document.querySelector('input[name="map_start_zoom"]');pillEl&&latEl&&lngEl&&zoomEl?(last={lat:latEl.value,lng:lngEl.value,zoom:zoomEl.value},setInterval(function(){var cur={lat:latEl.value,lng:lngEl.value,zoom:zoomEl.value},panZoomChanged=cur.lat!==last.lat||cur.lng!==last.lng||cur.zoom!==last.zoom,cur=(panZoomChanged&&(last=cur),!1);self.ready&&void 0!==self.lastHash&&self.hashForm()!==self.lastHash&&(cur=!0),(panZoomChanged||cur)&&(self.setPillState("unsaved"),self.paused)&&panZoomChanged&&(pillEl.style.display="block",(cur=pillEl.firstElementChild)&&(cur.style.display=""),clearTimeout(self._reminderPillTimer),self._reminderPillTimer=setTimeout(function(){pillEl.style.display="none"},8e3))},250)):setTimeout(function(){self.attachReminderPillTimer()},250)},WPGMZA.AtlasMajorAutoSave.prototype.attachPauseToggle=function(){var self=this;this.pauseToggle.length&&this.pauseToggle.on("click",function(e){e.preventDefault(),self.setPaused(!self.paused)})},WPGMZA.AtlasMajorAutoSave.prototype.refreshPauseToggleUI=function(){var label,title;this.pauseToggle.length&&(this.pauseToggle.toggleClass("is-paused",!!this.paused),label=this.paused?L("atlas_major_autosave_paused_label","Autosave off"):L("atlas_major_autosave_active_label","Autosave on"),title=this.paused?L("atlas_major_autosave_resume_tip","Click to enable autosave"):L("atlas_major_autosave_pause_tip","Click to disable autosave (manual Save Map still works)"),this.pauseToggle.attr({"aria-label":label,title:title}),this.pauseToggle.find(".am-autosave-pause-text").text(label),$("body").toggleClass("wpgmza-autosave-on",!this.paused),this.paused||(clearTimeout(this._reminderPillTimer),$("#wpgmaps_save_reminder").hide()))},WPGMZA.AtlasMajorAutoSave.prototype.setPaused=function(paused){this.paused=!!paused;try{this.paused?localStorage.removeItem("wpgmza_autosave_enabled"):localStorage.setItem("wpgmza_autosave_enabled","1")}catch(e){}this.refreshPauseToggleUI()},WPGMZA.AtlasMajorAutoSave.prototype.attachListeners=function(){var self=this;this.form.on("change input",function(){self.setPillState("unsaved")}),this.form.on("change",function(e){self.paused||(clearTimeout(self.changeTimer),self.changeTimer=setTimeout(function(){self.changeTimer=null,self.paused||self.inFlight||self.flush(!1)},self.changeDebounceMs))}),this.form.on("submit",function(e){e.preventDefault(),self.flush(!0)}),setInterval(function(){self.paused||self.inFlight||self.hashForm()!==self.lastHash&&self.flush(!1)},this.pollIntervalMs)},WPGMZA.AtlasMajorAutoSave.prototype.resolveMapId=function(){var val=parseInt(this.form.find('input[name="map_id"]').val()||0,10);return val||(WPGMZA.mapEditPage&&WPGMZA.mapEditPage.map&&WPGMZA.mapEditPage.map.id?parseInt(WPGMZA.mapEditPage.map.id,10):(val=window.location.search.match(/[?&]map_id=(\d+)/))?parseInt(val[1],10):0)},WPGMZA.AtlasMajorAutoSave.prototype.hashForm=function(){for(var pairs=this.form.serializeArray(),str=JSON.stringify(pairs),hash=0,i=0;i]*>/g,"").trim()).length?feature.substring(0,60)+"...":feature:""},WPGMZA.AtlasMajorFeatureList.prototype.render=function(){if(this.container){var features=this.getFeatures(),total=features.length,totalPages=Math.ceil(total/this.perPage),totalPages=(this.page>totalPages&&(this.page=Math.max(1,totalPages)),(this.page-1)*this.perPage),pageItems=features.slice(totalPages,totalPages+this.perPage),html="";if(0===total)html='
No '+this.featureType+"s yet
";else{for(var html='