MapPress Easy Google Maps - Version 2.73.15

Version Description

  • Changed: replaced JQuery Autocomplete with new search box
Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.73.15
Comparing to
See all releases

Code changes from version 2.73.14 to 2.73.15

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={273:(t,e,i)=>{"use strict";i.r(e);const o=wp.element.createElement,{Fragment:n,useEffect:s,useLayoutEffect:a,useRef:l,useState:p}=wp.element,__=t=>wp.i18n.__(t,"mappress-google-maps-for-wordpress");function r(t){const[e,i]=p({saddr:t.saddr?t.saddr:"",daddr:t.daddr?t.daddr:""});function n(t){i((e=>({...e,...t})))}function s(i,o){switch(i){case"close":t.onClose&&t.onClose();break;case"get-directions":a();break;case"keydown":13==o?s("get-directions"):27==o&&s("close");break;case"swap":n({saddr:e.daddr,daddr:e.saddr})}}function a(){let t=mappl10n.options.directionsServer;const i=e.saddr.trim(),o=e.daddr.trim();t="https://maps.google.com"==t?"https://www.google.com":t,-1==t.toLowerCase().indexOf("http")&&(t="https://"+t),t+="/maps/dir/?api=1&origin="+encodeURIComponent(i)+"&destination="+encodeURIComponent(o),window.open(t),s("close")}return"google"==mappl10n.options.directions?(a(),null):o("div",{className:"mapp-directions-component"},o("div",{className:"mapp-close",onClick:()=>s("close")}),o("div",null,o("input",{className:"mapp-dir-saddr",onChange:t=>n({saddr:t.target.value}),onKeyPress:t=>s("keydown",t.which),tabIndex:"1",placeholder:__("My location"),value:e.saddr}),o("div",{className:"mapp-dir-arrows",onClick:()=>s("swap")})),o("div",null,o("input",{className:"mapp-dir-daddr",onChange:t=>n({daddr:t.target.value}),onKeyPress:t=>s("keydown",t.which),tabIndex:"2",value:e.daddr})),o("div",{className:"mapp-dir-toolbar"},o("div",{className:"mapp-submit-button",onClick:()=>s("get-directions")},__("Get Directions"))))}window.mapp=window.mapp||{};const h=wp.element.createElement,d=t=>wp.i18n.__(t,"mappress-google-maps-for-wordpress"),_n=wp.i18n._n;var c;c=jQuery,mapp.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,poiListOpen:null,poiListPageSize:null,pois:null,postid:null,query:null,search:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.isFullscreen=!1,this.iw=null,this.mapdata=t,this.opened=null,this.pagination={count:0,page:1},this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pois_=[],this.user_=null,this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.poiList=void 0!==this.poiList&&null!=this.poiList?this.poiList:mappl10n.options.poiList,this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},mapp.Map.prototype={display:function(){this.render(),this.div&&this.div.layout&&(this.sanity(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,minZoom:0,scaleControl:!0,streetViewControl:!this.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),this.div&&this.div.canvas&&("leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addGeolocateControl(),this.addMenu(),this.addPopup(),this.isFilterable()&&this.addFilters(),this.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new mapp.lib.Modal),this.places=new mapp.Places(c(".mapp-places",this.div.search),{map:this}),this.addUserLocation(),this.editable&&this.places.sel.focus(),c(this.places).on("search.mapp",((t,e)=>{this.onSearch(e)})),this.addEvents("click dragstart zoom_changed zoomstart",(t=>{"leaflet"==mappl10n.options.engine&&"click"==t.type&&t.originalEvent&&!t.originalEvent.target.matches(".mapp-canvas")||this.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(t=>{if(this.div.list&&this.div.list.length&&c.contains(this.div.list.get(0),t.target))return;const e=c(t.currentTarget),i=e.attr("data-mapp-action"),o=e.attr("data-mapp-"+i);t.preventDefault(),this.onAction(i,o,e)})),this.div.list.on("click","[data-mapp-action]",(t=>{const e=c(t.currentTarget),i=e.attr("data-mapp-action"),o=e.attr("data-mapp-"+i);this.onAction(i,o,e)})),new ResizeObserver(((t,e)=>{document.fullscreenElement?this.isFullscreen=!0:(this.isFullscreen?this.isFullscreen=!1:this.poiClose(),this.toggleView("mini"),this.resize())})).observe(this.div.layout.get(0)),mapp.event.addListener(this.map_,"maptypeid_changed baselayerchange",(()=>{this.set({dirty:!0})})),this.places.parse(this.center,(t=>{this.center=t&&t.geometry&&t.geometry.location?{lat:t.geometry.location.lat,lng:t.geometry.location.lng}:null,this.setPois(this.pois),this.initCenter()})),this.div.list.on("mouseenter","[data-mapp-poi]",(t=>{var e=c(t.currentTarget).attr("data-mapp-poi");this.poiHover(this.pois_[e])})),this.div.list.on("mouseleave","[data-mapp-poi]",(t=>{this.poiHover(null)}))))},initCenter:function(){setTimeout((()=>{this.recenter(),this.renderList(),this.isSearchable&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():mapp.event.addListenerOnce(this.map_,"idle",(()=>this.initOpen()))}),100)},initOpen:function(){const t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;t&&e&&!this.editable&&t.open()},addEvents:function(t,e){t=t.split(" ");for(var i=0;i<t.length;i++)mapp.event.addListener(this.map_,t[i],e)},addFilters:function(){c("body").on("click",(t=>{var e=c(t.target);e.hasClass("mapp-filters-toggle")||0!=e.closest(".mapp-filters-wrapper").length||this.div.layout.removeClass("mapp-view-filters")})),this.div.filters.on("change",(()=>{this.fetchPois()})),"top"==mappl10n.options.filtersPos&&new ResizeObserver(((t,e)=>{t.forEach((t=>{const e=this.div.canvas.get(0).clientHeight;c(".mapp-filters-body",this.div.layout).css({"max-height":e})}))})).observe(this.div.layout.get(0))},addGeolocateControl:function(){if(!mappl10n.options.ssl)return;const t=c(".mapp-geolocate-control-wrapper",this.div.layout).get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(t):(L.Control.Geolocate=L.Control.extend({onAdd:e=>t,onRemove:()=>{}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=c.makeArray(this.layers),e=0;e<t.length;e++){var i=t[e].trim(),o=i.split(".").pop();this.layers_[i]?this.toggleLayer(i):"kml"==o||"kmz"==o?this.layers_[i]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:i}):"json"==o&&(this.layers_[i]=new google.maps.Data({map:this.map_}).loadGeoJson(i))}},addMenu:function(){c("body").on("click",(t=>{var e=c(t.target),i=e.attr("data-mapp-action");e==this.div.menu||"menu-toggle"==i||e.closest(this.div.menu).length||this.toggleView("menu",!1)}))},addPopup:function(){var t=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(t+=" mapp-"+this.templates.popup),this.div.iw=c('<div class="'+t+'">').appendTo(this.div.canvas),this.iw=new mapp.Infobox(this.map_,{className:this.editable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(()=>{this.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){mappl10n.options.userLocation&&mappl10n.options.ssl&&this.places.geolocate((t=>{if(t&&t.geometry&&t.geometry.location){const e=t.geometry.location,i=mapp.Icons.get("geolocation");"leaflet"==mappl10n.options.engine?this.user_=L.marker([e.lat,e.lng],{icon:i}).addTo(this.map_):(this.user_=new mapp.Marker({icon:i,position:new google.maps.LatLng(e.lat,e.lng)}),this.user_.setMap(this.map_))}}),!0)},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.editable){let t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(t):(t=_.extend(t,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],t))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){var t=[];for(let e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},fetchPois:function(t){var e=new Date;this.poiClose();var i={action:"mapp_query",filters:c(":input",this.div.filters).serialize(),list:!!this.div.list.length,query:this.query,url:{href:window.location.href,search:window.location.search},debug:mappl10n.options.debug};this.xhr_&&this.xhr_.abort("cancel"),this.spinner(!0),this.xhr_=mapp.lib.ajax({data:i,callback:(i,o)=>{this.spinner(!1),i&&"OK"==i.status&&(this.setPois(i.data.pois),this.renderList(),mappl10n.options.debug&&mapp.lib.log("Results: "+i.data.pois.length+" ("+o.responseText.length/1e3+"K) AJAX: "+(new Date-e)+(i.data.timing?i.data.timing:"")),t&&t())}})},fitBounds:function(t){return this.map_.fitBounds(t)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},isFilterable:function(){return mappl10n.options.pro&&mappl10n.options.filters&&mappl10n.options.filters.length>0&&!this.editable&&this.query},isSearchable:function(){return!!this.editable},onAction:function(t,e,i){switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.renderDirections({isOpen:!0,from:null,to:this.opened});break;case"dir-from":this.renderDirections({isOpen:!0,from:this.opened,to:null});break;case"filters-reset":this.div.filters.find(":input").each(((t,e)=>{"hidden"!=e.type&&("checkbox"==e.type||"radio"==e.type?c(e).prop("checked",!1):c(e).val(""))})),this.fetchPois();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((t=>{t&&t.geometry&&t.geometry.location&&this.setView(t.geometry.location,parseInt(mappl10n.options.poiZoom))}));break;case"layer":this.toggleLayer(e),this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var o=i.attr("data-mapp-poi");this.poiOpen(this.pois_[o]);break;case"page":var n=parseInt(i.attr("data-mapp-page"));this.pagination.page=n,this.renderList();break;case"sidebar-toggle":this.toggleSidebar();break;case"view-map":this.toggleSidebar(!1);break;case"view-list":this.toggleSidebar(!0);break;default:return!0}},onSearch:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.renderDirections({isOpen:!1}),c(this).triggerHandler("mapp.close")},poiHighlight:function(t){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(c("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),t){var e=c.inArray(t,this.pois_);c('[data-mapp-poi="'+e+'"]',this.div.list).addClass("mapp-selected"),t.highlight(!0)}this.selected&&(e=c.inArray(this.selected,this.pois_),c('[data-mapp-poi="'+e+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(t,e){if(this.poiClose(),this.selected=t,this.poiHighlight(t),this.query&&t.postid&&t.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(t.url);case"postnew":return void window.open(t.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void t.fetchPost((()=>this.modal_.setContent(t.html)))}this.div.layout.hasClass("mapp-view-mini")&&this.toggleSidebar(!1),this.popupOpen(t,e,"popup"),c(this).triggerHandler("mapp.open",t)},poiRemove:function(t){var e=c.inArray(t,this.pois_);-1!=e&&(this.pois_[e].setMap(null),this.pois_.splice(e,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.renderDirections({isOpen:!1}),this.opened=null,c(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass(" mapp-thumb-"+mappl10n.options.thumbsPopup,!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)return void this.onSearch({geometry:{location:{lat:t.lat,lng:t.lng}}});if(t)return void this.setView(t,e||1);if(0==this.pois_.length)return void this.setView({lat:0,lng:0},e||1);if(1==this.pois_.length)return void this.pois_[0].center(e);let i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)},render:function(){let t=this.name?this.name+"-layout":"",e="mapp-layout",i=this.layout&&window.parent==window?this.layout:"left";if(e+="left"==i?" mapp-list-left":" mapp-inline",e+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",e+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){let t=this.alignment?this.alignment:mappl10n.options.alignment;if(t){let i=" align"+t+" mapp-align-"+t;window.parent==window?e+=i:c(window.frameElement).parent().parent().addClass(i)}}var o=mapp.lib.template("map",{map:this,layout:i});if(this.sel){if(this.div.layout=c(this.sel),this.div.layout.html(o),this.div.layout.addClass(e),this.div.layout.attr("id",t),!this.div.layout.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name)}else{let i=c('<div id="'+t+'" class="'+e+'">');i.html(o);let n=c("#"+this.name+"-layout");if(!n.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);n.replaceWith(i),this.div.layout=i}c.each(["canvas","content","controls","directions","filters","header","list","menu","search","sidebar","wrapper"],((t,e)=>{this.div[e]=c(".mapp-"+e,this.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderDirections:function(t){let{isOpen:e,from:i,to:o}=t;if(e){const t=o?o.getAddress():"",e=i?i.getAddress():"";this.toggleView("directions",!0),wp.element.render(h(r,{saddr:e,daddr:t,onClose:()=>{wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)}}),this.div.directions.get(0))}else this.div.directions.legnth&&wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)},renderList:function(){var t=this.getBounds(),e=0;if(this.editable)return void this.div.layout.trigger("mapp.render");if(!this.poiList)return;let i=parseInt(mappl10n.options.poiListPageSize);i=isNaN(i)?20:i;const o=i*(this.pagination.page-1),n=o+i;if(!this.editable)for(var s=0;s<this.pois_.length;s++){let i=this.pois_[s];i.visible=!1,this.isSearchable()?t&&t.contains(i.getPosition())&&(i.visible=!0,e++):(i.visible=!0,e++),i.visible=e>=o&&e<=n&&i.visible}this.pagination.count=e,this.pagination.countString=sprintf(_n(d("%d Result"),d("%d Results"),this.pagination.count),this.pagination.count),this.div.list.html(mapp.lib.template(this.templates.loop,{map:this,pois:this.pois_,pageSize:i,pagination:this.pagination})),c(".mapp-filters-count",this.filters).html(this.pagination.countString),mappl10n.options.thumbsList&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.thumbsList)},renderMenu:function(){for(var t in this.layers_)c('[data-mapp-layer="'+t+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[t].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){const t="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+d("MapPress Settings")+"</a>",e=jQuery&&jQuery.ui?jQuery.ui.version:"0.0",i="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+d("MapPress FAQ")+"</a>",o="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+d("contact support")+"</a>",n="<br/>"+sprintf(d("Please see the %s for help, or %s and provide this error message."),i,o),s=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",d("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(()=>{window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));let a=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:d("Leaflet library not loaded"),text:d("A theme or plugin is preventing the Leaflet library from loading.")+n},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:d("Google Maps API not loaded"),text:d("A theme or plugin is preventing Google Maps from loading.")+n},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:d("Google Maps API key required"),text:sprintf(d("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),t)+s},{condition:c('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:d("Google Maps API loaded multiple times"),text:d("A theme or plugin has loaded Google Maps twice")+n},{condition:"undefined"==typeof _,title:d("Underscore library not loaded"),text:d("A theme or plugin is preventing the underscore.js library from loading.")+n},{condition:e<"1.12",title:sprintf(d("Obsolete jQuery version: %s, must be >= 1.12"),e),text:d("A theme or plugin is loading an obsolete version of jQuery.")+n}];if(_.map(a,(t=>{if(t.condition){mappl10n.options.admin&&this.sanityOutput({title:t.title,text:t.text?t.text:""});let e=jQuery("<span>"+t.text.replace("<br/>","\n")+"</span>").text();console.error(d("Map error")+": "+t.title+" - "+e)}})),"google"==mappl10n.options.engine){const t=console.error;console.error=e=>{(e.includes("Google Maps JavaScript API")||e.includes("You have exceeded your request quota")||e.includes("You have exceeded your daily quota"))&&mappl10n.options.admin&&(e=e.replace(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi,((t,e,i)=>{let o=i;return o.match("^https?://")||(o="http://"+o),e+'<a href="'+o+'" target="_blank">'+i+"</a>"})),this.sanityOutput({title:d("Google Maps Error"),text:e})),t(e)}}},sanityOutput(t){if(!c(".mapp-errors-overlay",this.div.content).length){let t="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+d("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(t)}c(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+t.title+"</div><div class='mapp-errors-text'>"+t.text+"</div>")},set:function(t){for(let i in t){var e=t[i];switch(i){case"dirty":this.dirty=e;break;case"mapTypeId":this.mapTypeId=e,this.setMapTypeId(e);break;case"poiList":this.poiList=null==e?mappl10n.options.poiList:e,this.toggleSidebar(mappl10n.options.poiListOpen),this.toggleView("mini");break;case"search":this.search=e;break;case"style":this.setStyle(e);break;case"title":this.title=e;break;default:this[i]=e}}},setMapTypeId:function(t){const e=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.find(e,(e=>e.id==t));!mappl10n.options.style||"roadmap"!=t&&"streets"!=t&&i||(t=mappl10n.options.style);let o=_.find(e,(e=>e.id==t));o=o||e[0],this.setStyle(o)},setPois:function(t){if(this.resetPois(),t)for(var e=0;e<t.length;e++){var i=new mapp.Poi(t[e]);this.pois_.push(i),i.id=this.pois_.length-1,i.setMap(this)}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];let i={},o={};if(t&&t.hasOwnProperty("width")&&(i={width:t.width?t.width:e.width}),t&&t.hasOwnProperty("height")){let i=t.height?t.height:e.height;o="string"==typeof i&&i.includes("%")?{"padding-bottom":i,height:"auto"}:{"padding-bottom":0,height:i}}window.frameElement&&window.frameElement.classList.contains("mapp-iframe")?(c(window.frameElement).parent().parent().css(i),c(window.frameElement).parent().css(o)):this.embed?(i={height:"100%"},o={"padding-bottom":0,height:"100%"}):(this.div.layout.css(i),this.div.wrapper.css(o)),this.resize()},setStyle:function(t){if("leaflet"==mappl10n.options.engine){let e={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[t.provider],i=c.extend({},e,t);L.tileLayer(e.url,i).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==t.type?t.id:"roadmap"),t.json){let e=null;try{e=JSON.parse(t.json)}catch(t){mapp.lib.log("Invalid JSON in map style")}this.map_.setOptions({styles:e||null})}else this.map_.setOptions({styles:null})},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},spinner:function(t){this.div.layout.toggleClass("mapp-busy",t)},toggleLayer:function(t,e){e=void 0!==e?e:null==this.layers_[t].getMap(),c.each(["traffic","bicycling","transit"],((t,e)=>{this.layers_[e].setMap(null)})),e&&this.layers_[t].setMap(this.map_)},toggleSidebar:function(t){this.div.layout.toggleClass("mapp-sidebar-open",t),this.isSidebarOpen=t,setTimeout((()=>this.resize()),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){let t=this.div.layout.hasClass("mapp-view-mini"),e=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",e),void(e!=t&&this.toggleSidebar(!e))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,search:this.search,title:this.title,width:this.width,zoom:this.zoom}}}},397:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==(i="https://maps.google.com"==i?"https://www.google.com":i).toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574);window.mapp=window.mapp||{},mapp.geocoders={},o=jQuery,mapp.geocoders.algolia=function(t){this.map=t},mapp.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en";var a=this.map.getMap().getCenter();a&&(i+="&aroundLatLng="+a.lat+","+a.lng),o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){mapp.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},mapp.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){this.getPredictions(e,(e=>{e&&t.isArray(e)?this.getDetails(e[0],(t=>i(t))):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((t=>(t.value=t.description,t)))).filter((t=>t.place_id)),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){mapp.geocoders.mapbox=function(t){this.map=t},mapp.geocoders.mapbox.prototype={getDetails:function(t,e){let i=t.place_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));let s=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:i,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:s}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o;var n=this.map.getMap().getCenter();n&&(o+="&proximity="+n.lng+","+n.lat),mappl10n.options.searchBox&&(o+="&bbox="+mappl10n.options.searchBox),t.getJSON(o,(t=>{t&&t.features&&t.features.length>0?(t.features=t.features.map((t=>(t.value=t.label=t.place_name,t))),i(t.features)):i(null)}))}}}(jQuery),function(t){mapp.geocoders.nominatim=function(t){this.map=t},mapp.geocoders.nominatim.prototype={getDetails:function(t,e){let i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));let s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);if(o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,mappl10n.options.searchBox)o+="&viewbox="+mappl10n.options.searchBox,o+="&bounded=1";else{var n=this.map.getMap().getBounds();if(n){let t=n.getSouthWest(),e=n.getNorthEast();o+="&viewbox="+t.lng+","+t.lat+","+e.lng+","+e.lat}}t.getJSON(o,(function(t){t&&t.length?(t=t.map((t=>(t.value=t.display_name,t))),i(t)):i(null)}))}}}(jQuery)},282:()=>{window.mapp=window.mapp||{},mapp.Icons={},mapp.Icons.get=function(t){var e=mapp.Icons.getUrl(t);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:e,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:e}},mapp.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Infobox=function(e,i){this.map=e,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?e.getContainer():e.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},i),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null,this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(i.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?mapp.event.addListener(this.map,"move",(t=>{this.isOpen&&this.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=()=>{this.isOpen&&this.draw()}),this.node.get(0).addEventListener("load",(()=>{"leaflet"==mappl10n.options.engine?this.open({position:this.position,anchorPoint:this.anchorPoint}):mapp.event.addListenerOnce(this.map,"panend",(t=>{this.open({position:this.position,anchorPoint:this.anchorPoint})}))}),{capture:!0});var o="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(o),"leaflet"==mappl10n.options.engine&&e.on("load",(()=>{L.DomEvent.disableClickPropagation(this.wrapper.get(0))}))},mapp.Infobox.prototype={close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(document.fullscreenElement||this.map.isFullscreen)return;if(!this.position)return;let t,e,i;if(t=this.node.outerWidth(),e=this.node.outerHeight(),"leaflet"==mappl10n.options.engine)i=this.map.latLngToContainerPoint(this.position);else{const t=this.overlayView.getProjection();if(!t)return;i=t.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:i.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-i.y-this.anchorPoint.y})},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=t.anchorPoint?t.anchorPoint:{x:0,y:0},this.wrapper.addClass("mapp-open"),this.wrapper.css({left:0,bottom:0,width:"auto",height:"auto"}),this.wrapper.css({width:this.node.outerWidth(),height:this.node.outerHeight()}),this.draw(),this.pan(),this.isOpen=!0},pan:function(){const e=this.node.outerWidth(),i=this.node.outerHeight(),o=t(this.mapDiv).width(),n=t(this.mapDiv).height();if("leaflet"==mappl10n.options.engine)var s=this.map.latLngToContainerPoint(this.position);else{var a=this.overlayView.getProjection();s=a?a.fromLatLngToContainerPixel(this.position):null}if(!s)return;var l={x:s.x,y:s.y};s.x+e/2+this.anchorPoint.x>o-this.fudge?l.x=Math.max(o-e/2-this.anchorPoint.x-this.fudge,o/2-this.anchorPoint.x):s.x-e/2+this.anchorPoint.x<this.fudge&&(l.x=Math.min(e/2+this.anchorPoint.x+this.fudge,o/2-this.anchorPoint.x)),s.y+this.anchorPoint.y-i<this.fudge&&(l.y=i-this.anchorPoint.y+this.fudge),l.y>=n&&(l.y=n-this.fudge);const p={x:s.x-l.x,y:s.y-l.y};p.x<=-1||p.x>=1||p.y<=-1||p.y>=1?"leaflet"==mappl10n.options.engine?this.map.panBy([p.x,p.y]):(mapp.event.addListenerOnce(this.map,"idle",(t=>{mapp.event.trigger(this.map,"panend")})),this.map.panBy(p.x,p.y)):mapp.event.trigger(this.map,"panend")},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&i.alert(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)},jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(e,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[e]){var o=mappl10n.options.templates?mappl10n.options.template[e]:t("#mapp-tmpl-"+e).html();if(!o)return"";mapp.lib.templates[e]=_.template(o,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return mapp.lib.templates[e](i)},uniqid:function(){return void 0===mapp.lib.uniqidCounter?mapp.lib.uniqidCounter=0:mapp.lib.uniqidCounter++,mapp.lib.uniqidCounter}},mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+t.fn.jquery),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),mapp.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){mapp.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},mapp.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){if(!this.el.parent().length){const e=t("body",window.parent.document);this.el.appendTo(e)}this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:()=>{window.mapp=window.mapp||{},jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},436:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Marker=function(t){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove()},mapp.Marker.prototype={draw:function(){if(!this.div||!this.icon)return;let e=this.overlayView.getProjection();if(e){let i=e.fromLatLngToDivPixel(this.position),o=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:i.x-o.width/2,top:i.y-o.height})}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(t){let e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){let e=this.overlayView.getPanes();e&&(this.div=t('<div class="mapp-marker">'),this.div.appendTo(e.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&mapp.event.trigger(this,"click"),this.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(t){mapp.event.trigger(this,"mouseover")},onMouseleave:function(t){mapp.event.trigger(this,"mouseout")},onPointerdown:function(t){const e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)return;const e=this.map.getDiv().getBoundingClientRect();let i={x:t.clientX-e.left+this.dragging.offset.x,y:t.clientY-e.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(i)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){let i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){let t='<img draggable="false" src="'+this.icon.url+'">';this.div.html(t);let e=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:e.width,height:e.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(const e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Places=function(e,i){var o=this;this.sel=t(e),this.opts=t.extend({map:null},i);let n="";n="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new mapp.geocoders[n](this.opts.map),this.sel.on("keydown",(function(e){13==e.which&&(e.preventDefault(),e.stopImmediatePropagation(),o.sel.autocomplete("close"),o.parse(o.sel.val(),(function(e){e&&t(o).triggerHandler("search.mapp",e)})))})),t(".mapp-search-button",this.sel.parent()).on("click",(function(){o.parse(o.sel.val(),(function(e){e&&(o.sel.autocomplete("close"),t(o).triggerHandler("search.mapp",e))}))})),this.initAutocomplete()},mapp.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("string"!=typeof i||"http"!=i.substring(0,4))if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(i);else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t,e){var i=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var o={lat:e.coords.latitude,lng:e.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),i.sel.val("")}),(function(i){if(!e){var o=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+o)}t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:0,source:(t,i)=>{e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Poi=function(e){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,e),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),e.viewport&&e.viewport.sw&&e.viewport.ne&&e.viewport.sw.lat){var i=e.viewport.sw,o=e.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(i.lat,i.lng),L.latLng(o.lat,o.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(i.lat,i.lng),new google.maps.LatLng(o.lat,o.lng))}var n=[],s=[];if(!e.overlay)switch(this.type){case"polygon":if(e.poly&&e.poly.paths)for(var a=0;a<e.poly.paths.length;a++){n=[];for(var l=0;l<e.poly.paths[a].length;l++)n.push(new google.maps.LatLng(e.poly.paths[a][l].lat,e.poly.paths[a][l].lng));s.push(new google.maps.MVCArray(n))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)}),this.setColors(e.poly);break;case"polyline":if(e.poly&&e.poly.path)for(a=0;a<e.poly.path.length;a++)n.push(new google.maps.LatLng(e.poly.path[a].lat,e.poly.path[a].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(n)}),this.setColors(e.poly);break;case"circle":var p=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(e.poly);break;case"kml":var r=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(r):new google.maps.KmlLayer({url:r,preserveViewport:!0,suppressInfoWindows:!0});break;default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new mapp.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)})}e.type||this.set({iconid:e.iconid})},mapp.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return t&&t.pixelOffset?{x:t.pixelOffset.width,y:t.pixelOffset.height}:{x:0,y:0};case"poly":return{x:0,y:0};default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32}}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(e){if(!this.type){var i="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(i){switch(this.editable?"circle":mappl10n.options.highlight){case"circle":i.toggleClass("mapp-marker-circle",e);break;case"icon":var o=e?mapp.Icons.get(mappl10n.options.highlightIcon):mapp.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==o.options.iconUrl)return;this.overlay.setIcon(o);break;case"scale":i.addClass("mapp-marker"),i.toggleClass("mapp-marker-scale",e)}this.setZIndex(e?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){this.html?t():mapp.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:e=>{this.html=e,t()}})},render:function(t,e){var i={};return i=_.extend(i,this,{icon:mapp.Icons.getUrl(this.iconid)}),e&&(i.body=e.description,i.title=e.name),i.thumbnail=mappl10n.options.thumbsPopup&&"popup"==t||mappl10n.options.thumbsList&&"item"==t?i.thumbnail:null,mapp.lib.template(this.map.templates[t],{poi:i,colors:this.getTemplateColors()})},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.map.set({dirty:i});break;case"iconid":this.type||(this.iconid=i,this.overlay.setIcon(mapp.Icons.get(i)));break;default:this[e]=i}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var e=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay,"dragstart"),t&&(mapp.event.addListener(this.overlay,"dragstart",(function(){e.viewport=null,e.map.poiClose()})),mapp.event.addListener(this.overlay,"dragend",(function(){e.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(mapp.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&e.overlay.getPath().getLength()>2&&e.overlay.getPath().removeAt(t.vertex)})),mapp.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),mapp.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){e.map.set({dirty:!0})})))))},setMap:function(t){var e=this;this.map=t,mapp.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(mapp.event.addListenerOnce(this.overlay,"ready",(function(){e.viewport=e.overlay.getBounds()})),mapp.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(mapp.event.addListener(this.overlay,"defaultviewport_changed",(function(){e.viewport=e.overlay.getDefaultViewport()})),mapp.event.addListener(this.overlay,"status_changed",(function(){var t=e.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),mapp.event.addListener(this.overlay,"click",(function(t){e.open(t)})),mapp.event.addListener(this.overlay,"mouseover",(function(t){e.map.poiHover(e)})),mapp.event.addListener(this.overlay,"mouseout",(function(t){e.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){let{color:e,opacity:i,weight:o}=t;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,p=t.rawAnswer;try{var h=i.locale_names[0],d=i.country,c=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,g=i.city&&i.city[0]!==h?i.city[0]:void 0,m=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,u=i.county&&i.county[0]!==h?i.county[0]:void 0,v=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},f=v.postcode,y=v.highlightedPostcode,w={name:r(i._highlightResult.locale_names),city:g?r(i._highlightResult.city):void 0,administrative:c?r(i._highlightResult.administrative):void 0,country:d?i._highlightResult.country.value:void 0,suburb:m?r(i._highlightResult.suburb):void 0,county:u?r(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:c,county:u,city:g,suburb:m,country:d,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:f,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:p,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){p(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(273),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)})();
1
+ (()=>{var t={658:(t,e,i)=>{"use strict";i.r(e);const o=wp.element.createElement,{Fragment:n,useEffect:s,useLayoutEffect:a,useRef:l,useState:p}=wp.element,__=t=>wp.i18n.__(t,"mappress-google-maps-for-wordpress");function r(t){const[e,i]=p({saddr:t.saddr?t.saddr:"",daddr:t.daddr?t.daddr:""});function n(t){i((e=>({...e,...t})))}function s(i,o){switch(i){case"close":t.onClose&&t.onClose();break;case"get-directions":a();break;case"keydown":13==o?s("get-directions"):27==o&&s("close");break;case"swap":n({saddr:e.daddr,daddr:e.saddr})}}function a(){let t=mappl10n.options.directionsServer;const i=e.saddr.trim(),o=e.daddr.trim();t="https://maps.google.com"==t?"https://www.google.com":t,-1==t.toLowerCase().indexOf("http")&&(t="https://"+t),t+="/maps/dir/?api=1&origin="+encodeURIComponent(i)+"&destination="+encodeURIComponent(o),window.open(t),s("close")}return"google"==mappl10n.options.directions?(a(),null):o("div",{className:"mapp-directions-component"},o("div",{className:"mapp-close",onClick:()=>s("close")}),o("div",null,o("input",{className:"mapp-dir-saddr",onChange:t=>n({saddr:t.target.value}),onKeyPress:t=>s("keydown",t.which),tabIndex:"1",placeholder:__("My location"),value:e.saddr}),o("div",{className:"mapp-dir-arrows",onClick:()=>s("swap")})),o("div",null,o("input",{className:"mapp-dir-daddr",onChange:t=>n({daddr:t.target.value}),onKeyPress:t=>s("keydown",t.which),tabIndex:"2",value:e.daddr})),o("div",{className:"mapp-dir-toolbar"},o("div",{className:"mapp-submit-button",onClick:()=>s("get-directions")},__("Get Directions"))))}wp.element.createElement;const{Fragment:c,useCallback:h,useEffect:d,useLayoutEffect:g,useMemo:u,useRef:m,useState:f}=wp.element;const v=wp.element.createElement,{Fragment:y,useCallback:w,useEffect:b,useLayoutEffect:k,useMemo:x,useRef:P,useState:C}=wp.element;function O(t){t={buttonLabel:null,className:"",delay:null,focus:!1,onFetch:null,onSelect:null,placeholder:"",selected:null,suggestions:[],title:"",...t};const e=P(null),i=P(null),o=t.delay?function(t,e){const i=React.useRef(t);return React.useLayoutEffect((()=>{i.current=t})),React.useMemo((()=>_.debounce((function(){return i.current(...arguments)}),e)),[e])}(t.onFetch,t.delay):t.onFetch,[n,s]=C({isOpen:!1,value:""});function a(t){s((e=>({...e,...t})))}function l(e){switch(e.stopPropagation(),e.code){case"Backspace":a({isOpen:n.value.length>1});break;case"Enter":!function(){if(a({isOpen:!1}),t.suggestions){let e=null==n.selected?t.suggestions[0]:t.suggestions[n.selected];e&&t.onSelect(n.value,e)}}();break;case"Escape":a({isOpen:!1});break;case"ArrowUp":if(e.preventDefault(),t.suggestions&&0!=n.selected){const e=null==n.selected?t.suggestions.length-1:n.selected-1;t.suggestions[e]&&a({isOpen:!0,selected:e})}else a({selected:null});break;case"ArrowDown":if(t.suggestions&&n.selected<t.suggestions.length-1){const e=null==n.selected?0:n.selected+1;t.suggestions[e]&&a({isOpen:!0,selected:e})}else a({selected:null});break;case"Tab":case"AltLeft":case"AltRight":case"ControlLeft":case"ControlRight":case"MetaLeft":case"MetaRight":break;default:a({isOpen:!0})}}!function(t,e){const i=i=>{t.current&&!t.current.contains(i.target)&&e()};document.addEventListener("mousedown",i),document.addEventListener("touchstart",i)}(e,(()=>{n.isOpen&&a({isOpen:!1})})),b((()=>{t.focus&&i.current&&i.current.focus()}),[i.current]),b((()=>{n.map&&setMapTypeId(t.mapTypeId)}),[t.mapTypeId,n.map]);const p=n.selected>=0&&t.suggestions&&t.suggestions[n.selected]?t.suggestions[n.selected].value:n.value;return v("div",{className:"mapp-autocomplete",ref:e},v("div",{className:"mapp-autocomplete-wrapper"},v("input",{className:t.className,onChange:function(t){a({value:t.target.value,selected:null}),o(t.target.value.trim())},onKeyDownCapture:t=>l(t),placeholder:t.placeholder,ref:i,title:t.title,type:"text",value:p}),n.isOpen&&v("div",{className:"mapp-autocomplete-list"},_.map(t.suggestions,((e,i)=>{const o="mapp-autocomplete-item"+(n.selected==i?" mapp-selected":"");return v("div",{className:o,key:i,onClick:()=>function(e,i){a({isOpen:!1,selected:i}),t.onSelect(n.value,e)}(e,i)},e.value)})))),t.buttonLabel&&v("div",{className:"mapp-submit-button",onClick:()=>onSelect()},t.buttonLabel))}wp.element.createElement;const{Fragment:S,useCallback:M,useEffect:I,useLayoutEffect:E,useRef:T,useState:A}=wp.element,D={google:function(){this.token=null;const t=document.createElement("div");this.placesService=new google.maps.places.PlacesService(t),this.autocompleteService=new google.maps.places.AutocompleteService}};D.google.prototype={getDetails:function(t){let{suggestion:e,callback:i}=t;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var o={fields:["formatted_address","name","geometry"],placeId:e.place_id,sessionToken:this.token};this.placesService.getDetails(o,(function(t,e){if("OK"==e&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}i(t)}else i(null)}))},getFirstPrediction:function(t){let{map:e,value:i,callback:o}=t;this.getPredictions({map:e,value:i,callback:t=>{t&&Array.isArray(t)?this.getDetails({suggestion:t[0],callback:t=>o(t)}):o(null)}})},getPredictions:function(t){let{map:e,value:i,includeBusinesses:o,callback:n}=t;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var s=e?e.getBounds():null;"leaflet"==mappl10n.options.engine&&(s=new google.maps.LatLngBounds(new google.maps.LatLng(s.getSouthWest().lat,s.getSouthWest().lng),new google.maps.LatLng(s.getNorthEast().lat,s.getNorthEast().lng)));var a={input:i,bounds:s=s||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:o?null:["geocode"]};this.autocompleteService.getPlacePredictions(a,(function(t,e){"OK"==e&&t&&t.length?(t=(t=t.map((t=>(t.value=t.description,t)))).filter((t=>t.place_id)),n(t)):(e==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):e==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),n(null))}))}},D.mapbox=function(){},D.mapbox.prototype={getDetails:function(t){let{suggestion:e,callback:i}=t,o=e.place_name,n=o.indexOf(","),s=o.indexOf(",",n+1);n>0&&(o=parseInt(o.substr(0,n))?o.substr(0,s).replace(",",""):o.substr(0,n));let a=e.bbox&&4==e.bbox.length?{sw:{lat:e.bbox[1],lng:e.bbox[0]},ne:{lat:e.bbox[3],lng:e.bbox[2]}}:null;i({formatted_address:e.place_name,name:o,geometry:{location:{lat:e.center[1],lng:e.center[0]},viewport:a}})},getFirstPrediction:function(t){let{map:e,value:i,callback:o}=t;this.getPredictions({map:e,value:i,callback:t=>{t&&t.length?this.getDetails({suggestion:t[0],callback:t=>o(t)}):o(null)}})},getPredictions:function(t){let{map:e,value:i,callback:o}=t;var n="https://api.mapbox.com/geocoding/v5/mapbox.places/"+i+".json?access_token="+mappl10n.options.mapbox;n=mappl10n.options.country?n+"&country="+mappl10n.options.country.toLowerCase():n,n=mappl10n.options.language?n+"&language="+mappl10n.options.language.toLowerCase():n;var s=e?e.getMap().getCenter():null;s&&(n+="&proximity="+s.lng+","+s.lat),mappl10n.options.searchBox&&(n+="&bbox="+mappl10n.options.searchBox),fetch(n).then((t=>t.json())).then((t=>{t&&t.features&&t.features.length>0?(t.features=t.features.map((t=>(t.value=t.label=t.place_name,t))),o(t.features)):o(null)}))}},D.nominatim=function(){},D.nominatim.prototype={getDetails:function(t){let{suggestion:e,callback:i}=t,o=e.display_name,n=o.indexOf(","),s=o.indexOf(",",n+1);n>0&&(o=parseInt(o.substr(0,n))?o.substr(0,s).replace(",",""):o.substr(0,n));let a=e.boundingbox&&4==e.boundingbox.length?{sw:{lat:e.boundingbox[0],lng:e.boundingbox[2]},ne:{lat:e.boundingbox[1],lng:e.boundingbox[3]}}:null;i({formatted_address:e.display_name,name:o,geometry:{location:{lat:e.lat,lng:e.lon},viewport:a}})},getFirstPrediction:function(t){let{map:e,value:i,callback:o}=t;this.getPredictions({map:e,value:i,callback:t=>{t&&t.length?this.getDetails({suggestion:t[0],callback:t=>o(t)}):o(null)}})},getPredictions:function(t){let{map:e,value:i,callback:o}=t;var n="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(i);if(n=mappl10n.options.country?n+"&countrycodes="+mappl10n.options.country.toLowerCase():n,n=mappl10n.options.language?n+"&accept-language="+mappl10n.options.language.toLowerCase():n,mappl10n.options.searchBox)n+="&viewbox="+mappl10n.options.searchBox,n+="&bounded=1";else{var s=e?e.getMap().getBounds():null;if(s){let t=s.getSouthWest(),e=s.getNorthEast();n+="&viewbox="+t.lng+","+t.lat+","+e.lng+","+e.lat}}fetch(n).then((t=>t.json())).then((t=>{t&&t.length?(t=t.map((t=>(t.value=t.display_name,t))),o(t)):o(null)}))}};const V=t=>{let{includeBusinesses:e}=t;function i(){let t="";return t="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"nominatim",new D[t]}function o(t,e){navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var i={lat:e.coords.latitude,lng:e.coords.longitude};t({name:i.lat+", "+i.lng,geometry:{location:i}})}),(function(i){if(!e){var o=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+o)}t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)}return{geocode:function(t){let{map:n,suggestion:s,value:a,callback:l}=t;const p=i();a="string"==typeof a?a.trim():"",function(t){let{map:e,value:i,suggestion:n,callback:s}=t;if("string"==typeof name&&"http"==name.substring(0,4))return void s(name);if("user"==name)return void o((function(t){s(t)}));const a=name.split(",");if(2==a.length){const t=parseFloat(a[0]),e=parseFloat(a[1]);if(!isNaN(t)&&!isNaN(e))return void s({name:t+", "+e,geometry:{location:{lat:t,lng:e}}})}s(null)}({map:n,suggestion:s,value:a,callback:t=>{t?l(t):s?p.getDetails({suggestion:s,callback:l}):a?p.getFirstPrediction({map:n,suggestion:s,value:a,includeBusinesses:e,callback:l}):l(null)}})},geolocate:o,getPredictions:function(t){let{map:e,value:o,callback:n}=t;i().getPredictions({map:e,value:o,callback:n})}}},N=wp.element.createElement,{Fragment:j,useCallback:B,useEffect:R,useLayoutEffect:z,useRef:F,useState:q}=wp.element,G=t=>wp.i18n.__(t,"mappress-google-maps-for-wordpress");function J(t){t={buttonLabel:null,focus:!1,includeBusinesses:!1,map:null,onSearch:null,...t};const{geocode:e,getPredictions:i}=V({map:t.map,includeBusinesses:t.includeBusinesses}),[o,n]=q({suggestions:[]});return N(O,{buttonLabel:t.buttonLabel,className:"mapp-places",debounce:"nominatim"===mappl10n.options.geocoder?500:300,delay:"nominatim"==mappl10n.options.geocoder?500:10,focus:t.focus,onFetch:function(e){i({map:t.map,value:e,callback:t=>{var e;e={suggestions:t},n((t=>({...t,...e})))}})},onSelect:function(i,o){e({map:t.map,value:i,suggestion:o,callback:e=>{e&&t.onSearch(e)}})},placeholder:G("Search"),suggestions:o.suggestions,title:G("Enter an address, place, KML file URL, or lat,lng")})}window.mapp=window.mapp||{};const H=wp.element.createElement,U=t=>wp.i18n.__(t,"mappress-google-maps-for-wordpress"),_n=wp.i18n._n;var Z;Z=jQuery,mapp.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,poiListOpen:null,poiListPageSize:null,pois:null,postid:null,query:null,search:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.isFullscreen=!1,this.iw=null,this.mapdata=t,this.opened=null,this.pagination={count:0,page:1},this.selected=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.modal_=null,this.pois_=[],this.user_=null,this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.poiList=void 0!==this.poiList&&null!=this.poiList?this.poiList:mappl10n.options.poiList,this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid},mapp.Map.prototype={display:function(){const{geocode:t}=V({withBusinesses:this.editable});if(this.render(),!this.div||!this.div.layout)return;if(this.sanity(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,minZoom:0,scaleControl:!0,streetViewControl:!this.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),!this.div||!this.div.canvas)return;"leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addGeolocateControl(),this.addMenu(),this.addPopup(),this.isFilterable()&&this.addFilters(),this.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new mapp.lib.Modal);const e=Z(".mapp-search-container",this.div.layout);e.length&&wp.element.render(H(J,{buttonLabel:this.editable?U("Add to map"):H("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:this.editable,includeBusinesses:this.editable,map:this,onSearch:t=>{this.onSearch(t)}}),e.get(0)),this.addUserLocation(),this.addEvents("click dragstart zoom_changed zoomstart",(t=>{"leaflet"==mappl10n.options.engine&&"click"==t.type&&t.originalEvent&&!t.originalEvent.target.matches(".mapp-canvas")||this.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(t=>{if(this.div.list&&this.div.list.length&&Z.contains(this.div.list.get(0),t.target))return;const e=Z(t.currentTarget),i=e.attr("data-mapp-action"),o=e.attr("data-mapp-"+i);t.preventDefault(),this.onAction(i,o,e)})),this.div.list.on("click","[data-mapp-action]",(t=>{const e=Z(t.currentTarget),i=e.attr("data-mapp-action"),o=e.attr("data-mapp-"+i);this.onAction(i,o,e)})),new ResizeObserver(((t,e)=>{document.fullscreenElement?this.isFullscreen=!0:(this.isFullscreen?this.isFullscreen=!1:this.poiClose(),this.toggleView("mini"),this.resize())})).observe(this.div.layout.get(0)),mapp.event.addListener(this.map_,"maptypeid_changed baselayerchange",(()=>{this.set({dirty:!0})})),t({map:null,value:this.center,callback:t=>{this.center=t&&t.geometry&&t.geometry.location?{lat:t.geometry.location.lat,lng:t.geometry.location.lng}:null,this.setPois(this.pois),this.initCenter()}}),this.div.list.on("mouseenter","[data-mapp-poi]",(t=>{var e=Z(t.currentTarget).attr("data-mapp-poi");this.poiHover(this.pois_[e])})),this.div.list.on("mouseleave","[data-mapp-poi]",(t=>{this.poiHover(null)}))},initCenter:function(){setTimeout((()=>{this.recenter(),this.renderList(),this.isSearchable&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():mapp.event.addListenerOnce(this.map_,"idle",(()=>this.initOpen()))}),100)},initOpen:function(){const t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;t&&e&&!this.editable&&t.open()},addEvents:function(t,e){t=t.split(" ");for(var i=0;i<t.length;i++)mapp.event.addListener(this.map_,t[i],e)},addFilters:function(){Z("body").on("click",(t=>{var e=Z(t.target);e.hasClass("mapp-filters-toggle")||0!=e.closest(".mapp-filters-wrapper").length||this.div.layout.removeClass("mapp-view-filters")})),this.div.filters.on("change",(()=>{this.fetchPois()})),"top"==mappl10n.options.filtersPos&&new ResizeObserver(((t,e)=>{t.forEach((t=>{const e=this.div.canvas.get(0).clientHeight;Z(".mapp-filters-body",this.div.layout).css({"max-height":e})}))})).observe(this.div.layout.get(0))},addGeolocateControl:function(){if(!mappl10n.options.ssl)return;const t=Z(".mapp-geolocate-control-wrapper",this.div.layout).get(0);"google"==mappl10n.options.engine?this.map_.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(t):(L.Control.Geolocate=L.Control.extend({onAdd:e=>t,onRemove:()=>{}}),new L.Control.Geolocate({position:"bottomright"}).addTo(this.map_))},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=Z.makeArray(this.layers),e=0;e<t.length;e++){var i=t[e].trim(),o=i.split(".").pop();this.layers_[i]?this.toggleLayer(i):"kml"==o||"kmz"==o?this.layers_[i]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:i}):"json"==o&&(this.layers_[i]=new google.maps.Data({map:this.map_}).loadGeoJson(i))}},addMenu:function(){Z("body").on("click",(t=>{var e=Z(t.target),i=e.attr("data-mapp-action");e==this.div.menu||"menu-toggle"==i||e.closest(this.div.menu).length||this.toggleView("menu",!1)}))},addPopup:function(){var t=this.editable?"mapp-iw-edit":"mapp-iw";this.editable||(t+=" mapp-"+this.templates.popup),this.div.iw=Z('<div class="'+t+'">').appendTo(this.div.canvas),this.iw=new mapp.Infobox(this.map_,{className:this.editable?"mapp-ib-edit":""}),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(()=>{this.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){const{geolocate:t}=V({withBusinesses:this.editable});mappl10n.options.userLocation&&mappl10n.options.ssl&&t((t=>{if(t&&t.geometry&&t.geometry.location){const e=t.geometry.location,i=mapp.Icons.get("geolocation");"leaflet"==mappl10n.options.engine?this.user_=L.marker([e.lat,e.lng],{icon:i}).addTo(this.map_):(this.user_=new mapp.Marker({icon:i,position:new google.maps.LatLng(e.lat,e.lng)}),this.user_.setMap(this.map_))}}),!0)},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.editable){let t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(t):(t=_.extend(t,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}),this.clusterer=new MarkerClusterer(this.map_,[],t))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){var t=[];for(let e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},fetchPois:function(t){var e=new Date;this.poiClose();var i={action:"mapp_query",filters:Z(":input",this.div.filters).serialize(),list:!!this.div.list.length,query:this.query,url:{href:window.location.href,search:window.location.search},debug:mappl10n.options.debug};this.xhr_&&this.xhr_.abort("cancel"),this.spinner(!0),this.xhr_=mapp.lib.ajax({data:i,callback:(i,o)=>{this.spinner(!1),i&&"OK"==i.status&&(this.setPois(i.data.pois),this.renderList(),mappl10n.options.debug&&mapp.lib.log("Results: "+i.data.pois.length+" ("+o.responseText.length/1e3+"K) AJAX: "+(new Date-e)+(i.data.timing?i.data.timing:"")),t&&t())}})},fitBounds:function(t){return this.map_.fitBounds(t)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},isFilterable:function(){return mappl10n.options.pro&&mappl10n.options.filters&&mappl10n.options.filters.length>0&&!this.editable&&this.query},isSearchable:function(){return!!this.editable},onAction:function(t,e,i){switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.renderDirections({isOpen:!0,from:null,to:this.opened});break;case"dir-from":this.renderDirections({isOpen:!0,from:this.opened,to:null});break;case"filters-reset":this.div.filters.find(":input").each(((t,e)=>{"hidden"!=e.type&&("checkbox"==e.type||"radio"==e.type?Z(e).prop("checked",!1):Z(e).val(""))})),this.fetchPois();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":const{geolocate:t}=V({withBusinesses:this.editable});t((t=>{t&&t.geometry&&t.geometry.location&&this.setView(t.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1);break;case"layer":this.toggleLayer(e),this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var o=i.attr("data-mapp-poi");this.poiOpen(this.pois_[o]);break;case"page":var n=parseInt(i.attr("data-mapp-page"));this.pagination.page=n,this.renderList();break;case"sidebar-toggle":this.toggleSidebar();break;case"view-map":this.toggleSidebar(!1);break;case"view-list":this.toggleSidebar(!0);break;default:return!0}},onSearch:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,this.iw.close(),this.renderDirections({isOpen:!1}),Z(this).triggerHandler("mapp.close")},poiHighlight:function(t){if("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable){if(Z("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.hovered&&this.hovered.highlight(!1),t){var e=Z.inArray(t,this.pois_);Z('[data-mapp-poi="'+e+'"]',this.div.list),t.highlight(!0)}this.selected&&(e=Z.inArray(this.selected,this.pois_),Z('[data-mapp-poi="'+e+'"]',this.div.list).addClass("mapp-selected"))}},poiHover:function(t){t&&this.opened==t||(mappl10n.options.tooltips||(this.poiHighlight(null),this.hovered=null),t&&(this.poiHighlight(t),this.hovered=t,mappl10n.options.tooltips&&!this.editable&&this.popupOpen(t,null,"popup")))},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.set({dirty:!0})},poiOpen:function(t,e){if(this.poiClose(),this.selected=t,this.poiHighlight(t),this.query&&t.postid&&t.url&&!this.editable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(t.url);case"postnew":return void window.open(t.url);case"postmodal":return this.modal_.open(),this.modal_.setContent('<div class="mapp-modal-spinner">'),void t.fetchPost((()=>this.modal_.setContent(t.html)))}this.div.layout.hasClass("mapp-view-mini")&&this.toggleSidebar(!1),this.popupOpen(t,e,"popup"),Z(this).triggerHandler("mapp.open",t)},poiRemove:function(t){var e=Z.inArray(t,this.pois_);-1!=e&&(this.pois_[e].setMap(null),this.pois_.splice(e,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||(this.iw.close(),this.renderDirections({isOpen:!1}),this.opened=null,Z(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"popup",o=null;this.popupClose(),e&&e.featureData?o=e.featureData:e&&e.propagatedFrom&&e.propagatedFrom.feature&&e.propagatedFrom.feature.properties&&(o=e.propagatedFrom.feature.properties),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass(" mapp-thumb-"+mappl10n.options.thumbsPopup,!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)}),this.opened=t},recenter:function(){var t=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)return void this.onSearch({geometry:{location:{lat:t.lat,lng:t.lng}}});if(t)return void this.setView(t,e||1);if(0==this.pois_.length)return void this.setView({lat:0,lng:0},e||1);if(1==this.pois_.length)return void this.pois_[0].center(e);let i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)},render:function(){let t=this.name?this.name+"-layout":"",e="mapp-layout",i=this.layout&&window.parent==window?this.layout:"left";if(e+="left"==i?" mapp-list-left":" mapp-inline",e+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",e+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){let t=this.alignment?this.alignment:mappl10n.options.alignment;if(t){let i=" align"+t+" mapp-align-"+t;window.parent==window?e+=i:Z(window.frameElement).parent().parent().addClass(i)}}var o=mapp.lib.template("map",{map:this,layout:i});if(this.sel){if(this.div.layout=Z(this.sel),this.div.layout.html(o),this.div.layout.addClass(e),this.div.layout.attr("id",t),!this.div.layout.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name)}else{let i=Z('<div id="'+t+'" class="'+e+'">');i.html(o);let n=Z("#"+this.name+"-layout");if(!n.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);n.replaceWith(i),this.div.layout=i}Z.each(["canvas","content","controls","directions","filters","header","list","menu","search","sidebar","wrapper"],((t,e)=>{this.div[e]=Z(".mapp-"+e,this.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderDirections:function(t){let{isOpen:e,from:i,to:o}=t;if(e){const t=o?o.getAddress():"",e=i?i.getAddress():"";this.toggleView("directions",!0),wp.element.render(H(r,{saddr:e,daddr:t,onClose:()=>{wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)}}),this.div.directions.get(0))}else this.div.directions.length&&wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)},renderList:function(){var t=this.getBounds(),e=0;if(this.editable)return void this.div.layout.trigger("mapp.render");if(!this.poiList)return;let i=parseInt(mappl10n.options.poiListPageSize);i=isNaN(i)?20:i;const o=i*(this.pagination.page-1),n=o+i;if(!this.editable)for(var s=0;s<this.pois_.length;s++){let i=this.pois_[s];i.visible=!1,this.isSearchable()?t&&t.contains(i.getPosition())&&(i.visible=!0,e++):(i.visible=!0,e++),i.visible=e>=o&&e<=n&&i.visible}this.pagination.count=e,this.pagination.countString=sprintf(_n(U("%d Result"),U("%d Results"),this.pagination.count),this.pagination.count),this.div.list.html(mapp.lib.template(this.templates.loop,{map:this,pois:this.pois_,pageSize:i,pagination:this.pagination})),Z(".mapp-filters-count",this.filters).html(this.pagination.countString),mappl10n.options.thumbsList&&this.div.list.addClass(" mapp-thumb-"+mappl10n.options.thumbsList)},renderMenu:function(){for(var t in this.layers_)Z('[data-mapp-layer="'+t+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[t].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){const t="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+U("MapPress Settings")+"</a>",e="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+U("MapPress FAQ")+"</a>",i="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+U("contact support")+"</a>",o="<br/>"+sprintf(U("Please see the %s for help, or %s and provide this error message."),e,i),n=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",U("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(()=>{window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));let s=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:U("Leaflet library not loaded"),text:U("A theme or plugin is preventing the Leaflet library from loading.")+o},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:U("Google Maps API not loaded"),text:U("A theme or plugin is preventing Google Maps from loading.")+o},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:U("Google Maps API key required"),text:sprintf(U("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),t)+n},{condition:Z('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:U("Google Maps API loaded multiple times"),text:U("A theme or plugin has loaded Google Maps twice")+o},{condition:"undefined"==typeof _,title:U("Underscore library not loaded"),text:U("A theme or plugin is preventing the underscore.js library from loading.")+o}];_.map(s,(t=>{if(t.condition){mappl10n.options.admin&&this.sanityOutput({title:t.title,text:t.text?t.text:""});let e=jQuery("<span>"+t.text.replace("<br/>","\n")+"</span>").text();console.error(U("Map error")+": "+t.title+" - "+e)}}))},sanityOutput(t){if(!Z(".mapp-errors-overlay",this.div.content).length){let t="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+U("Oops! Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(t)}Z(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+t.title+"</div><div class='mapp-errors-text'>"+t.text+"</div>")},set:function(t){for(let i in t){var e=t[i];switch(i){case"dirty":this.dirty=e;break;case"mapTypeId":this.mapTypeId=e,this.setMapTypeId(e);break;case"poiList":this.poiList=null==e?mappl10n.options.poiList:e,this.toggleSidebar(mappl10n.options.poiListOpen),this.toggleView("mini");break;case"search":this.search=e;break;case"style":this.setStyle(e);break;case"title":this.title=e;break;default:this[i]=e}}},setMapTypeId:function(t){const e=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.find(e,(e=>e.id==t));!mappl10n.options.style||"roadmap"!=t&&"streets"!=t&&i||(t=mappl10n.options.style);let o=_.find(e,(e=>e.id==t));o=o||e[0],this.setStyle(o)},setPois:function(t){if(this.resetPois(),t)for(var e=0;e<t.length;e++){var i=new mapp.Poi(t[e]);this.pois_.push(i),i.id=this.pois_.length-1,i.setMap(this)}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];let i={},o={};if(t&&t.hasOwnProperty("width")&&(i={width:t.width?t.width:e.width}),t&&t.hasOwnProperty("height")){let i=t.height?t.height:e.height;o="string"==typeof i&&i.includes("%")?{"padding-bottom":i,height:"auto"}:{"padding-bottom":0,height:i}}window.frameElement&&window.frameElement.classList.contains("mapp-iframe")?(Z(window.frameElement).parent().parent().css(i),Z(window.frameElement).parent().css(o)):this.embed?(i={height:"100%"},o={"padding-bottom":0,height:"100%"}):(this.div.layout.css(i),this.div.wrapper.css(o)),this.resize()},setStyle:function(t){if("leaflet"==mappl10n.options.engine){let e={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[t.provider],i=Z.extend({},e,t);L.tileLayer(e.url,i).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==t.type?t.id:"roadmap"),t.json){let e=null;try{e=JSON.parse(t.json)}catch(t){mapp.lib.log("Invalid JSON in map style")}this.map_.setOptions({styles:e||null})}else this.map_.setOptions({styles:null})},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},spinner:function(t){this.div.layout.toggleClass("mapp-busy",t)},toggleLayer:function(t,e){e=void 0!==e?e:null==this.layers_[t].getMap(),Z.each(["traffic","bicycling","transit"],((t,e)=>{this.layers_[e].setMap(null)})),e&&this.layers_[t].setMap(this.map_)},toggleSidebar:function(t){this.div.layout.toggleClass("mapp-sidebar-open",t),this.isSidebarOpen=t,setTimeout((()=>this.resize()),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){let t=this.div.layout.hasClass("mapp-view-mini"),e=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",e),void(e!=t&&this.toggleSidebar(!e))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,search:this.search,title:this.title,width:this.width,zoom:this.zoom}}}},397:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==(i="https://maps.google.com"==i?"https://www.google.com":i).toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574);window.mapp=window.mapp||{},mapp.geocoders={},o=jQuery,mapp.geocoders.algolia=function(t){this.map=t},mapp.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en";var a=this.map.getMap().getCenter();a&&(i+="&aroundLatLng="+a.lat+","+a.lng),o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){mapp.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},mapp.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){this.getPredictions(e,(e=>{e&&t.isArray(e)?this.getDetails(e[0],(t=>i(t))):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=(t=t.map((t=>(t.value=t.description,t)))).filter((t=>t.place_id)),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){mapp.geocoders.mapbox=function(t){this.map=t},mapp.geocoders.mapbox.prototype={getDetails:function(t,e){let i=t.place_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));let s=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:i,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:s}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o;var n=this.map.getMap().getCenter();n&&(o+="&proximity="+n.lng+","+n.lat),mappl10n.options.searchBox&&(o+="&bbox="+mappl10n.options.searchBox),t.getJSON(o,(t=>{t&&t.features&&t.features.length>0?(t.features=t.features.map((t=>(t.value=t.label=t.place_name,t))),i(t.features)):i(null)}))}}}(jQuery),function(t){mapp.geocoders.nominatim=function(t){this.map=t},mapp.geocoders.nominatim.prototype={getDetails:function(t,e){let i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));let s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction(t,e){this.getPredictions(t,(t=>{t&&t.length?this.getDetails(t[0],(t=>e(t))):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);if(o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,mappl10n.options.searchBox)o+="&viewbox="+mappl10n.options.searchBox,o+="&bounded=1";else{var n=this.map.getMap().getBounds();if(n){let t=n.getSouthWest(),e=n.getNorthEast();o+="&viewbox="+t.lng+","+t.lat+","+e.lng+","+e.lat}}t.getJSON(o,(function(t){t&&t.length?(t=t.map((t=>(t.value=t.display_name,t))),i(t)):i(null)}))}}}(jQuery)},282:()=>{window.mapp=window.mapp||{},mapp.Icons={},mapp.Icons.get=function(t){var e=mapp.Icons.getUrl(t);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:e,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:e}},mapp.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Infobox=function(e,i){this.map=e,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?e.getContainer():e.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},i),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null,this.wrapper=t('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.addClass(i.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?mapp.event.addListener(this.map,"move",(t=>{this.isOpen&&this.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=()=>{this.isOpen&&this.draw()}),this.node.get(0).addEventListener("load",(()=>{"leaflet"==mappl10n.options.engine?this.open({position:this.position,anchorPoint:this.anchorPoint}):mapp.event.addListenerOnce(this.map,"panend",(t=>{this.open({position:this.position,anchorPoint:this.anchorPoint})}))}),{capture:!0});var o="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(o),"leaflet"==mappl10n.options.engine&&e.on("load",(()=>{L.DomEvent.disableClickPropagation(this.wrapper.get(0))}))},mapp.Infobox.prototype={close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(document.fullscreenElement||this.map.isFullscreen)return;if(!this.position)return;let t,e,i;if(t=this.node.outerWidth(),e=this.node.outerHeight(),"leaflet"==mappl10n.options.engine)i=this.map.latLngToContainerPoint(this.position);else{const t=this.overlayView.getProjection();if(!t)return;i=t.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:i.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-i.y-this.anchorPoint.y})},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=t.anchorPoint?t.anchorPoint:{x:0,y:0},this.wrapper.addClass("mapp-open"),this.wrapper.css({left:0,bottom:0,width:"auto",height:"auto"}),this.wrapper.css({width:this.node.outerWidth(),height:this.node.outerHeight()}),this.draw(),this.pan(),this.isOpen=!0},pan:function(){const e=this.node.outerWidth(),i=this.node.outerHeight(),o=t(this.mapDiv).width(),n=t(this.mapDiv).height();if("leaflet"==mappl10n.options.engine)var s=this.map.latLngToContainerPoint(this.position);else{var a=this.overlayView.getProjection();s=a?a.fromLatLngToContainerPixel(this.position):null}if(!s)return;var l={x:s.x,y:s.y};s.x+e/2+this.anchorPoint.x>o-this.fudge?l.x=Math.max(o-e/2-this.anchorPoint.x-this.fudge,o/2-this.anchorPoint.x):s.x-e/2+this.anchorPoint.x<this.fudge&&(l.x=Math.min(e/2+this.anchorPoint.x+this.fudge,o/2-this.anchorPoint.x)),s.y+this.anchorPoint.y-i<this.fudge&&(l.y=i-this.anchorPoint.y+this.fudge),l.y>=n&&(l.y=n-this.fudge);const p={x:s.x-l.x,y:s.y-l.y};p.x<=-1||p.x>=1||p.y<=-1||p.y>=1?"leaflet"==mappl10n.options.engine?this.map.panBy([p.x,p.y]):(mapp.event.addListenerOnce(this.map,"idle",(t=>{mapp.event.trigger(this.map,"panend")})),this.map.panBy(p.x,p.y)):mapp.event.trigger(this.map,"panend")},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.lib={ajax:function(e){var i=this,o={callback:null,data:null,dataType:"json",silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"json"==e.dataType&&e.url==mappl10n.options.ajaxurl&&"OK"!=t.status&&i.alert(t.status),"json"==e.dataType&&t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)},jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(e,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[e]){var o=mappl10n.options.templates?mappl10n.options.template[e]:t("#mapp-tmpl-"+e).html();if(!o)return"";mapp.lib.templates[e]=_.template(o,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return mapp.lib.templates[e](i)},uniqid:function(){return void 0===mapp.lib.uniqidCounter?mapp.lib.uniqidCounter=0:mapp.lib.uniqidCounter++,mapp.lib.uniqidCounter}},mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+t.fn.jquery),jQuery,"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),mapp.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}},function(t){mapp.lib.Modal=function(){this.el=null;var e=this;this.el=t('<div class="mapp-modal" tabindex="0">').append('<div class="mapp-modal-backdrop">').append('<div class="mapp-modal-content" tabindex="1">'),this.el.hide(),this.el.on("click",".mapp-modal-backdrop",(function(){e.close()})),this.el.on("click",".mapp-modal-close",(function(){e.close()})),this.el.on("keydown",(function(t){27==t.which&&e.close()}))},mapp.lib.Modal.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),t("body").removeClass("mapp-modal-noscroll"))},focus:function(){t(".mapp-modal-focus",this.el).attr("tabindex",0),t(".mapp-modal-focus",this.el).focus()},open:function(){if(!this.el.parent().length){const e=t("body",window.parent.document);this.el.appendTo(e)}this.el.show(),t("body").addClass("mapp-modal-noscroll"),this.focus()},setContent:function(e){t(".mapp-modal-content",this.el).empty(),t(".mapp-modal-content",this.el).append('<div class="mapp-modal-close">&times;').append(e),this.focus()}}}(jQuery)},692:()=>{window.mapp=window.mapp||{},jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},436:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Marker=function(t){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove()},mapp.Marker.prototype={draw:function(){if(!this.div||!this.icon)return;let e=this.overlayView.getProjection();if(e){let i=e.fromLatLngToDivPixel(this.position),o=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:i.x-o.width/2,top:i.y-o.height})}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(t){let e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){let e=this.overlayView.getPanes();e&&(this.div=t('<div class="mapp-marker">'),this.div.appendTo(e.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&mapp.event.trigger(this,"click"),this.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(t){mapp.event.trigger(this,"mouseover")},onMouseleave:function(t){mapp.event.trigger(this,"mouseout")},onPointerdown:function(t){const e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)return;const e=this.map.getDiv().getBoundingClientRect();let i={x:t.clientX-e.left+this.dragging.offset.x,y:t.clientY-e.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(i)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){let i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){let t='<img draggable="false" src="'+this.icon.url+'">';this.div.html(t);let e=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:e.width,height:e.height}),this.setZIndex(),this.draw()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(const e in t)this.set(e,t[e])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visible":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Places=function(e,i){var o=this;this.sel=t(e),this.opts=t.extend({map:null},i);let n="";n="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new mapp.geocoders[n](this.opts.map),this.sel.on("keydown",(function(e){13==e.which&&(e.preventDefault(),e.stopImmediatePropagation(),o.sel.autocomplete("close"),o.parse(o.sel.val(),(function(e){e&&t(o).triggerHandler("search.mapp",e)})))})),t(".mapp-search-button",this.sel.parent()).on("click",(function(){o.parse(o.sel.val(),(function(e){e&&(o.sel.autocomplete("close"),t(o).triggerHandler("search.mapp",e))}))})),this.initAutocomplete()},mapp.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("string"!=typeof i||"http"!=i.substring(0,4))if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(i);else e(null)},parseLatLng:function(t){var e;if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng"))e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t,e){var i=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var o={lat:e.coords.latitude,lng:e.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),i.sel.val("")}),(function(i){if(!e){var o=i&&i.message?" : "+i.message:"";alert(mappl10n.no_geolocate+o)}t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:0,source:(t,i)=>{e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:()=>{var t;window.mapp=window.mapp||{},t=jQuery,mapp.Poi=function(e){if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,e),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),e.viewport&&e.viewport.sw&&e.viewport.ne&&e.viewport.sw.lat){var i=e.viewport.sw,o=e.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(i.lat,i.lng),L.latLng(o.lat,o.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(i.lat,i.lng),new google.maps.LatLng(o.lat,o.lng))}var n=[],s=[];if(!e.overlay)switch(this.type){case"polygon":if(e.poly&&e.poly.paths)for(var a=0;a<e.poly.paths.length;a++){n=[];for(var l=0;l<e.poly.paths[a].length;l++)n.push(new google.maps.LatLng(e.poly.paths[a][l].lat,e.poly.paths[a][l].lng));s.push(new google.maps.MVCArray(n))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)}),this.setColors(e.poly);break;case"polyline":if(e.poly&&e.poly.path)for(a=0;a<e.poly.path.length;a++)n.push(new google.maps.LatLng(e.poly.path[a].lat,e.poly.path[a].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(n)}),this.setColors(e.poly);break;case"circle":var p=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(e.poly);break;case"kml":var r=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(r):new google.maps.KmlLayer({url:r,preserveViewport:!0,suppressInfoWindows:!0});break;default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new mapp.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)})}e.type||this.set({iconid:e.iconid})},mapp.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return t&&t.pixelOffset?{x:t.pixelOffset.width,y:t.pixelOffset.height}:{x:0,y:0};case"poly":return{x:0,y:0};default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32}}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},highlight:function(e){if(!this.type){var i="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(i){switch(this.editable?"circle":mappl10n.options.highlight){case"circle":i.toggleClass("mapp-marker-circle",e);break;case"icon":var o=e?mapp.Icons.get(mappl10n.options.highlightIcon):mapp.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==o.options.iconUrl)return;this.overlay.setIcon(o);break;case"scale":i.addClass("mapp-marker"),i.toggleClass("mapp-marker-scale",e)}this.setZIndex(e?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},fetchPost:function(t){this.html?t():mapp.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:e=>{this.html=e,t()}})},render:function(t,e){var i={};return i=_.extend(i,this,{icon:mapp.Icons.getUrl(this.iconid)}),e&&(i.body=e.description,i.title=e.name),i.thumbnail=mappl10n.options.thumbsPopup&&"popup"==t||mappl10n.options.thumbsList&&"item"==t?i.thumbnail:null,mapp.lib.template(this.map.templates[t],{poi:i,colors:this.getTemplateColors()})},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.map.set({dirty:i});break;case"iconid":this.type||(this.iconid=i,this.overlay.setIcon(mapp.Icons.get(i)));break;default:this[e]=i}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var e=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay,"dragstart"),t&&(mapp.event.addListener(this.overlay,"dragstart",(function(){e.viewport=null,e.map.poiClose()})),mapp.event.addListener(this.overlay,"dragend",(function(){e.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(mapp.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&e.overlay.getPath().getLength()>2&&e.overlay.getPath().removeAt(t.vertex)})),mapp.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),mapp.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){e.map.set({dirty:!0})})))))},setMap:function(t){var e=this;this.map=t,mapp.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(mapp.event.addListenerOnce(this.overlay,"ready",(function(){e.viewport=e.overlay.getBounds()})),mapp.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(mapp.event.addListener(this.overlay,"defaultviewport_changed",(function(){e.viewport=e.overlay.getDefaultViewport()})),mapp.event.addListener(this.overlay,"status_changed",(function(){var t=e.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),mapp.event.addListener(this.overlay,"click",(function(t){e.open(t)})),mapp.event.addListener(this.overlay,"mouseover",(function(t){e.map.poiHover(e)})),mapp.event.addListener(this.overlay,"mouseout",(function(t){e.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){let{color:e,opacity:i,weight:o}=t;i=i?i/100:void 0;var n="polyline"==this.type?{strokeColor:e,strokeOpacity:i,strokeWeight:o}:{fillColor:e,fillOpacity:i,strokeColor:e,strokeWeight:o,strokeOpacity:1};this.setColors(n)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,p=t.rawAnswer;try{var c=i.locale_names[0],h=i.country,d=i.administrative&&i.administrative[0]!==c?i.administrative[0]:void 0,g=i.city&&i.city[0]!==c?i.city[0]:void 0,u=i.suburb&&i.suburb[0]!==c?i.suburb[0]:void 0,m=i.county&&i.county[0]!==c?i.county[0]:void 0,f=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},v=f.postcode,y=f.highlightedPostcode,w={name:r(i._highlightResult.locale_names),city:g?r(i._highlightResult.city):void 0,administrative:d?r(i._highlightResult.administrative):void 0,country:h?i._highlightResult.country.value:void 0,suburb:u?r(i._highlightResult.suburb):void 0,county:m?r(i._highlightResult.county):void 0,postcode:y},b={name:c,administrative:d,county:m,city:g,suburb:u,country:h,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:v,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:p,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){p(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(658),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)})();
css/mappress.css CHANGED
@@ -298,6 +298,18 @@ only screen and (min-device-pixel-ratio: 2) {
298
  padding: 10px;
299
  }
300
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  .mapp-list .mapp-info {
302
  align-items: center;
303
  display: flex;
@@ -309,18 +321,6 @@ only screen and (min-device-pixel-ratio: 2) {
309
  padding: 10px;
310
  }
311
 
312
- .mapp-list .mapp-item.mapp-selected {
313
- background-color: #f6f6f6;
314
- }
315
-
316
- .mapp-list .mapp-item.mapp-selected .mapp-title {
317
- font-weight: 500;
318
- }
319
-
320
- .mapp-list .mapp-item:hover {
321
- background-color: #f6f6f6;
322
- }
323
-
324
  .mapp-list .mapp-item .mapp-icon {
325
  border: none; /* 2011 */
326
  max-width: 32px !important; /* 2012 tries to override */
@@ -419,22 +419,39 @@ only screen and (min-device-pixel-ratio: 2) {
419
  Search
420
  -----------------------------------------------------------------------------------
421
  */
422
- .mapp-search {
423
  display: flex;
424
  flex: 1;
425
- max-width: 700px;
426
  position: relative;
427
  }
428
 
429
- .mapp-search input.mapp-error {
430
- outline: 1px solid red !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
 
433
- .mapp-search input.mapp-places {
434
  background-color: white !important; /* Algolia uses 240,240,240 */
 
435
  border: 1px solid #bbb ;
436
  box-shadow: none ;
437
  color: black ;
 
 
438
  line-height: 100%;
439
  margin: 0 ;
440
  padding: 5px 10px;
@@ -442,46 +459,20 @@ only screen and (min-device-pixel-ratio: 2) {
442
  width: 100% ;
443
  }
444
 
445
- .mapp-search ::placeholder {
446
- color: black !important; /* Themes */
447
- }
448
-
449
- /* GT editor interferes w/image */
450
- .mapp-search .mapp-search-button img {
451
- max-width: none;
452
- padding: 0;
453
- border: none;
454
- }
455
-
456
-
457
- /*
458
- -----------------------------------------------------------------------------------
459
- Jquery autocomplete (WP doesn't include any styles)
460
- -----------------------------------------------------------------------------------
461
- */
462
- .ui-helper-hidden-accessible {
463
- display: none;
464
- }
465
-
466
- .mapp-search .ui-autocomplete {
467
- background: none;
468
  background-color: white;
469
  border: 1px solid lightgray;
470
  box-shadow: 0px 1px 2px grey;
471
- color: inherit;
472
  cursor: pointer;
473
- font: inherit;
474
- list-style: none;
475
- margin: 0;
476
- max-width: 100%;
477
  overflow-x: hidden;
478
  overflow-y: auto;
479
- padding: 0;
480
  position: absolute;
 
 
481
  z-index: 10000;
482
  }
483
 
484
- .mapp-search .ui-autocomplete li.ui-menu-item {
485
  background-color: inherit;
486
  border-bottom: 1px solid lightgray;
487
  border-top: none;
@@ -492,24 +483,19 @@ only screen and (min-device-pixel-ratio: 2) {
492
  cursor: inherit;
493
  font: inherit;
494
  margin: 0;
495
- padding: 5px;
496
  }
497
 
498
- .mapp-search .ui-autocomplete li.ui-menu-item:hover {
499
- background-color: #fafafa;
500
  }
501
 
502
- .mapp-search .ui-autocomplete div.ui-menu-item-wrapper {
503
  text-overflow: ellipsis;
504
  overflow: hidden;
505
  white-space: nowrap;
506
  }
507
 
508
- .mapp-search .ui-autocomplete li.ui-state-focus {
509
- background-image: none;
510
- background-color: #f6f6f6;
511
- }
512
-
513
  /*
514
  -----------------------------------------------------------------------------------
515
  Filters
298
  padding: 10px;
299
  }
300
 
301
+ .mapp-list .mapp-item.mapp-selected {
302
+ background-color: #eaeaea;
303
+ }
304
+
305
+ .mapp-list .mapp-item.mapp-selected .mapp-title {
306
+ font-weight: bold;
307
+ }
308
+
309
+ .mapp-list .mapp-item:hover {
310
+ background-color: #eaeaea;
311
+ }
312
+
313
  .mapp-list .mapp-info {
314
  align-items: center;
315
  display: flex;
321
  padding: 10px;
322
  }
323
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  .mapp-list .mapp-item .mapp-icon {
325
  border: none; /* 2011 */
326
  max-width: 32px !important; /* 2012 tries to override */
419
  Search
420
  -----------------------------------------------------------------------------------
421
  */
422
+ .mapp-search-container {
423
  display: flex;
424
  flex: 1;
 
425
  position: relative;
426
  }
427
 
428
+ /*
429
+ -----------------------------------------------------------------------------------
430
+ React autocomplete
431
+ -----------------------------------------------------------------------------------
432
+ */
433
+
434
+ .mapp-autocomplete {
435
+ align-items: center;
436
+ display: flex;
437
+ flex: 1;
438
+ }
439
+
440
+ .mapp-autocomplete-wrapper {
441
+ display: flex;
442
+ flex: 1;
443
+ height: 100%;
444
+ position: relative;
445
  }
446
 
447
+ .mapp-autocomplete input.mapp-places {
448
  background-color: white !important; /* Algolia uses 240,240,240 */
449
+ border: none;
450
  border: 1px solid #bbb ;
451
  box-shadow: none ;
452
  color: black ;
453
+ flex: 1;
454
+ height: 35px;
455
  line-height: 100%;
456
  margin: 0 ;
457
  padding: 5px 10px;
459
  width: 100% ;
460
  }
461
 
462
+ .mapp-autocomplete-list {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  background-color: white;
464
  border: 1px solid lightgray;
465
  box-shadow: 0px 1px 2px grey;
 
466
  cursor: pointer;
 
 
 
 
467
  overflow-x: hidden;
468
  overflow-y: auto;
 
469
  position: absolute;
470
+ top: 100%;
471
+ width: 100%;
472
  z-index: 10000;
473
  }
474
 
475
+ .mapp-autocomplete-item {
476
  background-color: inherit;
477
  border-bottom: 1px solid lightgray;
478
  border-top: none;
483
  cursor: inherit;
484
  font: inherit;
485
  margin: 0;
486
+ padding: 8px;
487
  }
488
 
489
+ .mapp-autocomplete-item:hover, .mapp-autocomplete-item.mapp-selected {
490
+ background-color: #eaeaea;
491
  }
492
 
493
+ .mapp-autocomplete-item {
494
  text-overflow: ellipsis;
495
  overflow: hidden;
496
  white-space: nowrap;
497
  }
498
 
 
 
 
 
 
499
  /*
500
  -----------------------------------------------------------------------------------
501
  Filters
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Maps for WordPress 2.73.14\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-02-23T17:44:08+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -260,7 +260,7 @@ msgstr ""
260
 
261
  #: mappress_settings.php:423
262
  #: mappress_settings.php:454
263
- #: templates/map.php:72
264
  msgid "Get help"
265
  msgstr ""
266
 
@@ -398,16 +398,6 @@ msgstr ""
398
  msgid "Map ID"
399
  msgstr ""
400
 
401
- #: templates/map-directions.php:5
402
- msgid "My location"
403
- msgstr ""
404
-
405
- #: templates/map-directions.php:14
406
- #: templates/map-popup.php:5
407
- #: templates/mashup-popup.php:6
408
- msgid "Get Directions"
409
- msgstr ""
410
-
411
  #: templates/map-filters.php:4
412
  msgid "Filter"
413
  msgstr ""
@@ -428,47 +418,40 @@ msgstr ""
428
  msgid "%d of %d"
429
  msgstr ""
430
 
431
- #: templates/map.php:13
432
- msgid "Your Location"
433
- msgstr ""
434
-
435
- #: templates/map.php:33
436
- msgid "Search"
437
- msgstr ""
438
-
439
- #: templates/map.php:33
440
- msgid "Enter an address, place, KML file URL, or lat,lng"
441
  msgstr ""
442
 
443
- #: templates/map.php:36
444
- msgid "Add to map"
445
  msgstr ""
446
 
447
- #: templates/map.php:63
448
  msgid "Menu"
449
  msgstr ""
450
 
451
- #: templates/map.php:65
452
  msgid "Center map"
453
  msgstr ""
454
 
455
- #: templates/map.php:68
456
  msgid "Traffic"
457
  msgstr ""
458
 
459
- #: templates/map.php:69
460
  msgid "Bicycling"
461
  msgstr ""
462
 
463
- #: templates/map.php:70
464
  msgid "Transit"
465
  msgstr ""
466
 
467
- #: templates/map.php:81
468
  msgid "List"
469
  msgstr ""
470
 
471
- #: templates/map.php:82
472
  msgid "Map"
473
  msgstr ""
474
 
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Maps for WordPress 2.73.15\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-03-04T04:03:41+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
260
 
261
  #: mappress_settings.php:423
262
  #: mappress_settings.php:454
263
+ #: templates/map.php:63
264
  msgid "Get help"
265
  msgstr ""
266
 
398
  msgid "Map ID"
399
  msgstr ""
400
 
 
 
 
 
 
 
 
 
 
 
401
  #: templates/map-filters.php:4
402
  msgid "Filter"
403
  msgstr ""
418
  msgid "%d of %d"
419
  msgstr ""
420
 
421
+ #: templates/map-popup.php:5
422
+ #: templates/mashup-popup.php:6
423
+ msgid "Get Directions"
 
 
 
 
 
 
 
424
  msgstr ""
425
 
426
+ #: templates/map.php:13
427
+ msgid "Your Location"
428
  msgstr ""
429
 
430
+ #: templates/map.php:54
431
  msgid "Menu"
432
  msgstr ""
433
 
434
+ #: templates/map.php:56
435
  msgid "Center map"
436
  msgstr ""
437
 
438
+ #: templates/map.php:59
439
  msgid "Traffic"
440
  msgstr ""
441
 
442
+ #: templates/map.php:60
443
  msgid "Bicycling"
444
  msgstr ""
445
 
446
+ #: templates/map.php:61
447
  msgid "Transit"
448
  msgstr ""
449
 
450
+ #: templates/map.php:72
451
  msgid "List"
452
  msgstr ""
453
 
454
+ #: templates/map.php:73
455
  msgid "Map"
456
  msgstr ""
457
 
languages/texts.php CHANGED
@@ -89,17 +89,13 @@ __("Show POI list");
89
  __("Other Settings");
90
  __("Example: initialopeninfo=\"true\"");
91
  __("Map ID");
92
- __("My location");
93
- __("Get Directions");
94
  __("Filter");
95
  __("Reset");
96
  __("Done");
97
  __("Results");
98
  __("%d of %d");
 
99
  __("Your Location");
100
- __("Search");
101
- __("Enter an address, place, KML file URL, or lat,lng");
102
- __("Add to map");
103
  __("Menu");
104
  __("Center map");
105
  __("Traffic");
89
  __("Other Settings");
90
  __("Example: initialopeninfo=\"true\"");
91
  __("Map ID");
 
 
92
  __("Filter");
93
  __("Reset");
94
  __("Done");
95
  __("Results");
96
  __("%d of %d");
97
+ __("Get Directions");
98
  __("Your Location");
 
 
 
99
  __("Menu");
100
  __("Center map");
101
  __("Traffic");
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com
5
  Author URI: https://www.mappresspro.com
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.73.14
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Scott DeJonge for his wonderful icons
@@ -36,7 +36,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
36
  }
37
 
38
  class Mappress {
39
- const VERSION = '2.73.14';
40
 
41
  static
42
  $baseurl,
@@ -726,7 +726,7 @@ class Mappress {
726
  wp_register_script('mappress-leaflet-markercluster', $lib . "/Leaflet.markercluster/leaflet.markercluster.js", null, '1.4.1', $footer);
727
 
728
  // Dependencies
729
- $deps = array('jquery', 'jquery-ui-autocomplete', 'underscore', 'wp-element', 'wp-i18n');
730
  if (self::$options->engine == 'leaflet')
731
  $deps = array_merge(array('mappress-leaflet', 'mappress-omnivore'), $deps);
732
  if (self::$options->engine != 'leaflet' || self::$options->geocoder == 'google')
4
  Plugin URI: https://www.mappresspro.com
5
  Author URI: https://www.mappresspro.com
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.73.15
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Scott DeJonge for his wonderful icons
36
  }
37
 
38
  class Mappress {
39
+ const VERSION = '2.73.15';
40
 
41
  static
42
  $baseurl,
726
  wp_register_script('mappress-leaflet-markercluster', $lib . "/Leaflet.markercluster/leaflet.markercluster.js", null, '1.4.1', $footer);
727
 
728
  // Dependencies
729
+ $deps = array('jquery', 'underscore', 'wp-element', 'wp-i18n');
730
  if (self::$options->engine == 'leaflet')
731
  $deps = array_merge(array('mappress-leaflet', 'mappress-omnivore'), $deps);
732
  if (self::$options->engine != 'leaflet' || self::$options->geocoder == 'google')
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: maps, google maps, map, map markers, google map, leaflet maps, leaflet map
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.9
8
- Stable tag: 2.73.14
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interactive Google and Leaflet maps to WordPress.
@@ -89,6 +89,9 @@ Please see the plugin documentation pages:
89
 
90
  == Changelog ==
91
 
 
 
 
92
  = 2.73.14 =
93
  * Fixed: check for wp-config settings preventing file changes
94
 
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.9
8
+ Stable tag: 2.73.15
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interactive Google and Leaflet maps to WordPress.
89
 
90
  == Changelog ==
91
 
92
+ = 2.73.15 =
93
+ * Changed: replaced JQuery Autocomplete with new search box
94
+
95
  = 2.73.14 =
96
  * Fixed: check for wp-config settings preventing file changes
97
 
templates/map-directions.php DELETED
@@ -1,18 +0,0 @@
1
- <# if (!map.editable && mappl10n.options.directions != 'google') { #>
2
- <div class='mapp-directions'>
3
- <span class='mapp-close' data-mapp-action='dir-cancel'></span>
4
- <div>
5
- <input class='mapp-dir-saddr' tabindex='1' placeholder='<?php _e("My location", 'mappress-google-maps-for-wordpress');?>' />
6
- <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
7
- </div>
8
-
9
- <div>
10
- <input class='mapp-dir-daddr' tabindex='2'/>
11
- </div>
12
-
13
- <div class='mapp-dir-toolbar'>
14
- <span class='mapp-submit-button' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
- </div>
16
- <div class='mapp-dir-renderer'></div>
17
- </div>
18
- <# } #>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/map.php CHANGED
@@ -29,16 +29,7 @@
29
  <# if (isSearchable || isFilterable) { #>
30
  <div class='mapp-header'>
31
  <# if (isSearchable) { #>
32
- <div class='mapp-search'>
33
- <input class='mapp-places' type='text' placeholder='<?php _e('Search', 'mappress-google-maps-for-wordpress'); ?>' title='<?php _e('Enter an address, place, KML file URL, or lat,lng', 'mappress-google-maps-for-wordpress');?>'/>
34
- <div class='mapp-submit-button mapp-search-button'>
35
- <# if (map.editable) { #>
36
- + <?php _e('Add to map', 'mappress-google-maps-for-wordpress'); ?>
37
- <# } else { #>
38
- <img src='<# print(mappl10n.options.baseurl + "/images/search.png"); #>'>
39
- <# } #>
40
- </div>
41
- </div>
42
  <# } #>
43
  <# if (isFilterable && mappl10n.options.filtersPos == 'top') { #>
44
  <# print(mapp.lib.template('map-filters', { map : map })); #>
29
  <# if (isSearchable || isFilterable) { #>
30
  <div class='mapp-header'>
31
  <# if (isSearchable) { #>
32
+ <div class='mapp-search-container'></div>
 
 
 
 
 
 
 
 
 
33
  <# } #>
34
  <# if (isFilterable && mappl10n.options.filtersPos == 'top') { #>
35
  <# print(mapp.lib.template('map-filters', { map : map })); #>