MapPress Easy Google Maps - Version 2.61

Version Description

  • Added: default sizes are now responsive (%) based, pixel and viewport sizes are still supported
  • Added: default sizes are now editable and sortable
  • Added: new settings have been added for users of the free version
  • Added: support for the new block-based widget editor
  • Changed: plugin setttings screen moved from jQuery to React
  • Changed: POI editor icon picker and color picker have been converted to React
  • Fixed: POI list not updating when POI is changed
  • Fixed: conflict with Yoast preview slug temporarily appearing blank
  • Fixed: Gutenberg editor setting map alignment on settings screen prevents blocks from being selected
  • Fixed: React error for duplicate keys in multiselect
Download this release

Release Info

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

Code changes from version 2.58 to 2.61

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={854:()=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.iw=null,this.tt=null,this.opened=null,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.pois_=[],this.xhr_,this.zindex_=0,_.extend(this,this.defaults,t,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.poiList=this.poiList?this.poiList:mappl10n.options.poiList,this.postid=this.postid?this.postid:mappl10n.options.postid},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(this.render(),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",tooltip:"mashup-tooltip"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup",tooltip:"map-tooltip"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.query},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),"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.addStyles(),this.addMenu(),this.addPopup(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(e){"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).resize((function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())})))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.selected);break;case"dir-from":this.directionsOpen(this.selected,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=t[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addPopup:function(){var t=this,o=this.editable?"mapp-iw-edit":"mapp-iw";if(o+=" mapp-"+this.templates.popup,this.div.iw=e('<div class="'+o+'">').appendTo(this.div.canvas),"ib"==mappl10n.options.iwType||this.editable){var n=this.editable?"mapp-ib-popup mapp-ib-edit":"mapp-ib-popup";this.iw=new i.Infobox(this.map_,{className:n,clip:!0,pan:!0})}else this.iw="leaflet"==mappl10n.options.engine?L.popup({maxWidth:"auto"}):new google.maps.InfoWindow;this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){t.poiClose()})),e(window).resize((function(){t.poiClose()})),mappl10n.options.tooltips&&!this.editable&&(o="mapp-iw mapp-"+this.templates.popup,this.div.tt=e('<div class="'+o+'">').appendTo(this.div.canvas),this.tt=new i.Infobox(this.map_,{className:"mapp-ib-tooltip",clip:!0,pan:!1}),this.tt.setContent(this.div.tt.get(0)),this.tt&&(this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");o&&t.poiOpenTooltip(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiCloseTooltip()}))))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.mapOpts.mapTypeControl){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],p=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,p),p.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var r=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];for(var u in h&&"object"==t(r[h])&&this.map_.setOptions({styles:r[h]}),r)this.map_.mapTypes.set(u,new google.maps.StyledMapType(r[u],{name:u})),c.push(u);this.mapOpts.mapTypeControl&&this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}}),i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},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(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],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)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?t.open():e&&e.open(),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.opened=null,"ib"==mappl10n.options.iwType||this.editable?this.iw.close():"leaflet"==mappl10n.options.engine?this.map_.closePopup():this.iw.close(),this.dir_&&this.dir_.close(),this.select(null),e(this).triggerHandler("mapp.close")},poiCloseTooltip:function(){var t=mappl10n.options.debugTooltips;this.tt&&!t&&this.tt.close()},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.select(t),this.set({dirty:!0})},poiOpen:function(t,i){var o=null;if(this.poiClose(),this.poiCloseTooltip(),this.select(t),this.opened=t,"poi"!=mappl10n.options.mashupClick&&t.postid&&t.url)"post"==mappl10n.options.mashupClick?window.location.assign(t.url):window.open(t.url);else{this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),i&&i.featureData?o=i.featureData:i&&i.propagatedFrom&&i.propagatedFrom.feature&&i.propagatedFrom.feature.properties&&(o=i.propagatedFrom.feature.properties),this.poiSetMaxSize(t),this.div.iw.html(t.render("popup",o));var n=this.clusterGetLatLng(t),s=n||t.getPosition(i);if("ib"==mappl10n.options.iwType||this.editable)this.iw.open({position:s,anchorPoint:t.getAnchorPoint(i)});else if("leaflet"==mappl10n.options.engine)this.iw.setLatLng(s),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw);else{var a=new google.maps.MVCObject;a.setValues({position:s,anchorPoint:t.getAnchorPoint(i)}),this.iw.open(this.map_,a)}e(this).triggerHandler("mapp.open",t)}},poiOpenTooltip:function(t){if(!(this.div.layout.hasClass("mapp-view-mini")&&this.div.layout.hasClass("mapp-list-open")||this.opened)){this.div.tt.html(t.render("tooltip"));var e=this.clusterGetLatLng(t),i=e||t.getPosition();this.tt.open({position:i,anchorPoint:t.getAnchorPoint()})}},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},poiSetMaxSize:function(t){if("ib"!=mappl10n.options.iwType&&"leaflet"==mappl10n.options.engine){var e=t.getAnchorPoint();this.div.iw.css({"max-height":this.div.canvas.height()+e[1]-50,"max-width":this.div.canvas.width()-e[0]-50})}},recenter:function(){var t=this.center&&this.center.lat&&this.center.lng?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,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)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=i.lib.template("map",{map:this});if(this.sel?(this.sel.html(o),this.div.layout=e(".mapp-layout",this.sel)):(e("#"+this.name+"-layout").replaceWith(o),this.div.layout=e("#"+this.name+"-layout")),!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible="kml"!=this.pois_[s].type,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),this.editable&&e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})},renderMenu:function(){for(layer in this.layers_)e('[data-mapp-layer="'+layer+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[layer].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.zindex_=0,this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){if("undefined"==typeof _)return i.lib.alert("ERROR: underscore.js not loaded. Check cacheing / optimizing plugins.");if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("ERROR: Unable to load Leaflet")}else{if("undefined"==typeof google)return i.lib.alert("ERROR: Google Maps API not loaded");e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")}))}return!0},search: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)}},select:function(t){if(e(".mapp-item",this.div.list).removeClass("mapp-selected"),t){var o=e.inArray(t,this.pois_),n=e('[data-mapp-poi="'+o+'"]',this.div.list);i.lib.scrollTo(this.div.list,n),t.setZIndex(++this.zindex_),n.addClass("mapp-selected")}this.selected=t},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setHighlight:function(t){this.highlight&&("leaflet"==mappl10n.options.engine?this.highlight.remove():this.highlight.setMap(null)),t&&("leaflet"==mappl10n.options.engine?this.highlight=new L.Marker(t.getPosition()).addTo(this.map_):(this.highlight=new google.maps.Marker({position:t.getPosition()}),this.highlight.setMap(this.map_)))},setMapTypeId:function(i){if("leaflet"==mappl10n.options.engine){i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var o=0;o<mappl10n.options.baseLayers.length;o++){var n=mappl10n.options.baseLayers[o],s=mappl10n.options.providers[n.provider];if(n.name==i){var a=e.extend({},s,n);L.tileLayer(a.url,a).addTo(this.map_)}}}else i=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"])||"object"==t(mappl10n.options.styles[i])?i:"roadmap",this.map_.setMapTypeId(i)},setPois:function(t){if(this.resetPois(),t){for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this),o.setZIndex(this.zindex_+t.length-1-e)}this.zindex_+=t.length-1}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},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))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.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){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}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,title:this.title,width:this.width,zoom:this.zoom}},ajaxSave:function(t){var e=this;this.postid&&"0"!=this.postid||(this.postid=mappl10n.options.postid),i.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(this),nonce:mappl10n.options.nonce},callback:function(i){i&&"OK"==i.status&&(e.mapid||(e.mapid=i.data.mapid),t&&t())}})}},i.Map.ajaxGet=function(t,e){i.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){"OK"==t.status&&e(t.data)}})},i.Map.ajaxDelete=function(t,e){i.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&e&&e()}})}},397:()=>{var t,e=window.mapp||{};t=jQuery,e.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-addr",this.sel).removeClass("mapp-error"),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.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),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return 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",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){a.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()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={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){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return 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.map((function(t){return t.value=t.description,t})),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){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=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:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return 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,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var 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));var 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:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:()=>{var t=window.mapp||{};t.Icons={},t.Icons.get=function(t){var e="https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png";return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:e,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:e}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t,e=window.mapp||{};t=jQuery,e.Infobox=function(e,i){this.map=e,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,"leaflet"!=mappl10n.options.engine&&(this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){},this.overlayView.setMap(this.map));var o='<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div>';this.node=this.opts.clip?t(o).appendTo(this.mapDiv):t(o).appendTo("body"),this.node.addClass(i.className)},e.Infobox.prototype={close:function(){this.isOpen=!1,this.node.removeClass("mapp-open")},getCanvasOffset:function(){if(this.opts.clip)return{x:0,y:0};var t=this.mapDiv.getBoundingClientRect();return t.x+=window.scrollX,t.y+=window.scrollY,{x:t.x,y:t.y}},getContent:function(){return t(".mapp-ib",this.node)},getOverlayXY:function(t){if("leaflet"==mappl10n.options.engine)return this.map.latLngToContainerPoint(t);var e=this.overlayView.getProjection();return e?e.fromLatLngToContainerPixel(t):null},open:function(e){var i=e.anchorPoint,o=this.getOverlayXY(e.position),n=t(this.mapDiv).width(),s=t(this.mapDiv).height(),a=this.getCanvasOffset();if(null!==o){"leaflet"==mappl10n.options.engine&&(i={x:e.anchorPoint[0],y:e.anchorPoint[1]-10}),this.node.addClass("mapp-open"),this.node.css({left:0,top:0});var l=this.node.outerWidth(),p=this.node.outerHeight();if(this.opts.pan){var r={x:o.x,y:o.y};o.x+l/2+i.x>n?r.x=Math.max(n-l/2-i.x,n/2-i.x):o.x-l/2+i.x<0&&(r.x=Math.min(l/2+i.x,n/2-i.x)),o.y+i.y-p<0&&(r.y=Math.min(p-i.y,p-i.y)),r.y>=s&&(r.y=s-1),"leaflet"==mappl10n.options.engine?this.map.panBy([o.x-r.x,o.y-r.y]):this.map.panBy(o.x-r.x,o.y-r.y),o=r}var h=o.y-p+i.y,c=o.x-l/2+i.x;this.opts.clip||(h+=a.y,c+=a.x);var u=this.opts.clip?n:document.body.clientWidth;c+l>u&&(c=u-l),c<0&&(c=0),this.node.css({left:c}),p=this.node.outerHeight(),h=o.y-p+i.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&h<0&&h<s-(o.y+p)&&(h=o.y,this.node.addClass("mapp-ib-flip")),this.node.css({top:h});var g=t(".mapp-ib-tip",this.node),d=parseInt(window.getComputedStyle(document.querySelector(".mapp-ib-tip"),":before").getPropertyValue("width")),m=o.x-c+a.x;m<d/2&&(m=d/2),g.css({left:m}),this.isOpen=!0}},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"OK"!=t.status&&console.log(t.status),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){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((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(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&(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}),e.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)}}},692:()=>{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()},510:()=>{var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i=t&&t.name?t.name.trim():t.trim()),i)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(null)},parseLatLng:function(e){var i;if(e.lat&&e.lng)i=e;else{var o=(e&&e.name?t.trim(e.name):t.trim(e)).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(i={lat:n,lng:s})}}return i?{name:i.lat+", "+i.lng,geometry:{location:i}}:null},geolocate:function(t){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;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:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}})}}},548:()=>{var t,e=window.mapp||{};t=jQuery,e.Poi=function(e){if(this.defaults={address:null,body: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(r,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new google.maps.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)})}e.type||this.setIcon(e.iconid)},e.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"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return"leaflet"==mappl10n.options.engine?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:void 0!==this.overlay.anchorPoint?this.overlay.anchorPoint:new google.maps.Point(0,-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}},open:function(t){this.map.poiOpen(this,t)},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(att in t){var e=t[att];switch(att){case"dirty":this.map.set({dirty:e});break;case"iconid":this.setIcon(e);break;default:this[att]=e}}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 i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setIcon:function(t){this.type||void 0===e.Icons||(this.iconid=t,"leaflet"==mappl10n.options.engine||this.overlay.setIcon(null),this.overlay.setIcon(e.Icons.get(t)))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+t)})))),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),mappl10n.options.tooltips&&!this.map.editable&&(e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiOpenTooltip(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiCloseTooltip()}))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t,e,i){var o="polyline"==this.type?{strokeColor:t,strokeOpacity:e/100,strokeWeight:i}:{fillColor:t,fillOpacity:e/100,strokeColor:t,strokeWeight:i,strokeOpacity:1};this.setColors(o)},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],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,g=i.city&&i.city[0]!==h?i.city[0]:void 0,d=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?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},y=f.postcode,v=f.highlightedPostcode,w={name:r(i._highlightResult.locale_names),city:g?r(i._highlightResult.city):void 0,administrative:u?r(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:d?r(i._highlightResult.suburb):void 0,county:m?r(i._highlightResult.county):void 0,postcode:v},b={name:h,administrative:u,county:m,city:g,suburb:d,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:y,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){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.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(854),i(397),i(442),i(282),i(689),i(510),i(548),i(692)})();
1
+ !function(){var t={854:function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:mappl10n.options.poiList,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.hovered=null,this.iw=null,this.mapdata=t,this.opened=null,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.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.postid=this.postid?this.postid:mappl10n.options.postid,mappl10n.options.iwType="ib"},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(this.render(),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,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.query},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),"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.addStyles(),this.addMenu(),this.addPopup(),this.setMapTypeId(this.mapTypeId),this.clustering(),"postmodal"==mappl10n.options.mashupClick&&(this.modal_=new i.lib.Modal),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(e){"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).on("resize",(function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");t.poiHover(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiHover(null)})))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.opened);break;case"dir-from":this.directionsOpen(this.opened,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=t[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addPopup:function(){var t=this,o=this.editable?"mapp-iw-edit":"mapp-iw";if(this.editable||(o+=" mapp-"+this.templates.popup,o+=mappl10n.options.thumbs?" mapp-thumb-"+mappl10n.options.thumbStyle:""),this.div.iw=e('<div class="'+o+'">').appendTo(this.div.canvas),"ib"==mappl10n.options.iwType||this.editable){var n=this.editable?"mapp-ib-popup mapp-ib-edit":"mapp-ib-popup";this.iw=new i.Infobox(this.map_,{className:n,clip:!0,pan:!0})}else this.iw="leaflet"==mappl10n.options.engine?L.popup({maxWidth:"auto"}):new google.maps.InfoWindow;this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){t.poiClose()}))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.mapOpts.mapTypeControl){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],r=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,r),r.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var p=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];for(var u in h&&"object"==t(p[h])&&this.map_.setOptions({styles:p[h]}),p)this.map_.mapTypes.set(u,new google.maps.StyledMapType(p[u],{name:u})),c.push(u);this.mapOpts.mapTypeControl&&this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}}),i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},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(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m",maxZoom:21}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],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)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?this.popupOpen(t):e&&this.popupOpen(e),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.poiHighlight(null),this.selected=null,this.opened=null,this.hovered=null,"ib"==mappl10n.options.iwType||this.editable?this.iw.close():"leaflet"==mappl10n.options.engine?this.map_.closePopup():this.iw.close(),this.dir_&&this.dir_.close(),e(this).triggerHandler("mapp.close")},poiHighlight:function(t){if(("icon"!=mappl10n.options.highlight||"leaflet"!=mappl10n.options.engine||!this.editable)&&(e("[data-mapp-poi]",this.div.list).removeClass("mapp-selected"),this.selected&&this.selected.highlight(!1),this.hovered&&this.hovered.highlight(!1),t)){var i=e.inArray(t,this.pois_);e('[data-mapp-poi="'+i+'"]',this.div.list).addClass("mapp-selected"),t.highlight(!0)}},poiHover:function(t){t&&this.opened==t||(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,i){var o=this;if(this.poiClose(),this.selected=t,this.poiHighlight(t),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((function(){return o.modal_.setContent(t.html)}))}this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),this.popupOpen(t,i,"popup"),e(this).triggerHandler("mapp.open",t)},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.editable||("ib"==mappl10n.options.iwType||this.editable?this.iw.close():"leaflet"==mappl10n.options.engine?this.map_.closePopup():this.iw.close(),this.dir_&&this.dir_.close(),this.opened=null,e(this).triggerHandler("mapp.close"))},popupOpen:function(t,e){var 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.poiSetMaxSize(t),this.div.iw.html(t.render(i,o)),this.div.iw.toggleClass("mapp-has-image",!!t.thumbnail);var n=this.clusterGetLatLng(t),s=n||t.getPosition(e);if("ib"==mappl10n.options.iwType||this.editable)this.iw.open({position:s,anchorPoint:t.getAnchorPoint(e)});else if("leaflet"==mappl10n.options.engine)this.iw.setLatLng(s),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw);else{var a=new google.maps.MVCObject;a.setValues({position:s,anchorPoint:t.getAnchorPoint(e)}),this.iw.open(this.map_,a)}this.opened=t},poiSetMaxSize:function(t){if("ib"!=mappl10n.options.iwType&&"leaflet"==mappl10n.options.engine){var e=t.getAnchorPoint();this.div.iw.css({"max-height":this.div.canvas.height()+e[1]-50,"max-width":this.div.canvas.width()-e[0]-50})}},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)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,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)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=i.lib.template("map",{map:this});if(this.sel?(this.sel.html(o),this.div.layout=e(".mapp-layout",this.sel)):(e("#"+this.name+"-layout").replaceWith(o),this.div.layout=e("#"+this.name+"-layout")),!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible=!0,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),this.editable&&(this.div.list.trigger("render"),e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}}))},renderMenu:function(){for(var t in this.layers_)e('[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():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var t="Please see the MapPress FAQ Troubleshooting section to resolve.";if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("MAPPRESS ERROR: Unable to load Leaflet. "+t),!1}else{if("undefined"==typeof google)return i.lib.alert("MAPPRESS ERROR: Google Maps API not loaded. "+t),!1;e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("MAPPRESS ERROR: Google Maps API key loaded multiple times. "+t)}))}return"undefined"==typeof _?(i.lib.log("MAPPRESS ERROR: plugin conflict, underscore.js not loaded. "+t),!1):!(void 0===jQuery.ui||jQuery.ui.version<"1.12")||(i.lib.log("MAPPRESS WARNING: plugin conflict, Outdated jQuery version: "+jQuery.ui.version+" should be >= 1.12 "+t),!0)},search: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)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(i){if("leaflet"==mappl10n.options.engine){i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var o=0;o<mappl10n.options.baseLayers.length;o++){var n=mappl10n.options.baseLayers[o],s=mappl10n.options.providers[n.provider];if(n.name==i){var a=e.extend({},s,n);L.tileLayer(a.url,a).addTo(this.map_)}}}else i=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"])||"object"==t(mappl10n.options.styles[i])?i:"roadmap",this.map_.setMapTypeId(i)},setPois:function(t){if(this.resetPois(),t)for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.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];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},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))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.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){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}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,title:this.title,width:this.width,zoom:this.zoom}}}},397:function(){var t,e=window.mapp||{};t=jQuery,e.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-addr",this.sel).removeClass("mapp-error"),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.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:function(t,e,i){"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return 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",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){a.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()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={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){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return 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((function(t){return t.value=t.description,t}))).filter((function(t){return 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){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=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:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return 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,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var 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));var 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:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:function(){var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:function(){var t,e=window.mapp||{};t=jQuery,e.Infobox=function(i,o){var n=this;this.map=i,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?i.getContainer():i.getDiv(),this.node=null,this.opts=_.extend({popout:!1},o),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null;var s=this;if(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(o.className),this.node=t(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?e.event.addListener(this.map,"move",(function(t){s.isOpen&&s.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=function(){s.isOpen&&s.draw()}),this.node.get(0).addEventListener("load",(function(){n.open({position:n.position,anchorPoint:n.anchorPoint})}),{capture:!0}),s.opts.popout)var a="body";else a="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();s.wrapper.appendTo(a)},e.Infobox.prototype={clipToWindow:function(){var t=p.y,e=p.x-w/2+this.anchorPoint.x,i=this.mapDiv.getBoundingClientRect(),o=i.x+window.scrollX;t+=i.y+window.scrollY,e+=o;var n=this.opts.clip?divw:document.body.clientWidth;e+w>n&&(e=n-w),e<0&&(e=0),this.wrapper.css({left:e}),h=this.node.outerHeight(),t=p.y-h+this.anchorPoint.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&t<0&&t<divh-(p.y+h)&&(t=p.y,this.node.addClass("mapp-ib-flip"))},close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.removeClass("mapp-open")},draw:function(){if(this.position){var t=this.node.outerWidth(),e=(this.node.outerHeight(),"leaflet"==mappl10n.options.engine?this.map.latLngToContainerPoint(this.position):this.overlayView.getProjection().fromLatLngToContainerPixel(this.position));this.wrapper.css({left:e.x-t/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-e.y-this.anchorPoint.y})}},getContent:function(){return t(".mapp-ib",this.node)},open:function(t){this.position=t.position,this.anchorPoint=Array.isArray(t.anchorPoint)?{x:t.anchorPoint[0],y:t.anchorPoint[1]}:t.anchorPoint,this.node.css({maxWidth:.8*this.mapDiv.clientWidth-this.fudge,maxHeight:this.mapDiv.clientHeight+this.anchorPoint.y-2*this.fudge}),this.wrapper.addClass("mapp-open"),this.draw(),this.opts.popout?this.clipToWindow():"leaflet"==mappl10n.options.engine?this.panLeaflet():this.panGoogle(),this.isOpen=!0},panGoogle:function(){var t=this.overlayView.getProjection(),e=t?t.fromLatLngToDivPixel(this.position):null;if(e){var i=this.node.outerWidth(),o=this.node.outerHeight(),n=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x-i/2-this.fudge,e.y+this.fudge)),s=this.overlayView.getProjection().fromDivPixelToLatLng(new google.maps.Point(e.x+i/2+this.fudge,e.y-o+this.anchorPoint.y-this.fudge)),a=new google.maps.LatLngBounds(n,s);this.map.panToBounds(a)}},panLeaflet:function(){var e=this.map.latLngToContainerPoint(this.position),i=t(this.mapDiv).width(),o=t(this.mapDiv).height(),n=this.node.outerWidth(),s=this.node.outerHeight(),a={x:e.x,y:e.y};e.x+n/2+this.anchorPoint.x>i-this.fudge?a.x=Math.max(i-n/2-this.anchorPoint.x-this.fudge,i/2-this.anchorPoint.x):e.x-n/2+this.anchorPoint.x<this.fudge&&(a.x=Math.min(n/2+this.anchorPoint.x+this.fudge,i/2-this.anchorPoint.x)),e.y+this.anchorPoint.y-s<this.fudge&&(a.y=s-this.anchorPoint.y+this.fudge),a.y>=o&&(a.y=o-this.fudge),this.map.panBy([e.x-a.x,e.y-a.y])},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:function(){var t,e=window.mapp||{};t=jQuery,e.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&&"OK"!=t.status&&console.log(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){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((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(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&(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}),e.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){e.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()}))},e.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(){this.el.parent().length||this.el.appendTo("body"),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:function(){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:function(){var t;t=jQuery,mapp.Marker=function(t){var e=this;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=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},mapp.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection().fromLatLngToDivPixel(this.position),i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:e.x-i.width/2,top:e.y-i.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){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var e=this,i=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(i.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!e.dragging||e.dragging&&!e.dragging.moved)&&mapp.event.trigger(e,"click"),e.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){var 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)){var e=this.map.getDiv().getBoundingClientRect(),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){var 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){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(var 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:function(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:function(){var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.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("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(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){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),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:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:function(){var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){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,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.iconid})},e.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"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return"leaflet"==mappl10n.options.engine?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:void 0!==this.overlay.anchorPoint&&this.overlay.anchorPoint?this.overlay.anchorPoint:new google.maps.Point(0,-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(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){switch(this.editable?"circle":mappl10n.options.highlight){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var n=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==n.options.iconUrl)return;this.overlay.setIcon(n);break;case"scale":this.map.editable||("leaflet"!=mappl10n.options.engine&&(o=o.parent()),o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i))}this.setZIndex(i?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){var i=this;this.html?t():e.lib.ajax({type:"GET",data:{action:"mapp_get_post",postid:this.postid,nonce:mappl10n.options.nonce},dataType:"html",callback:function(e){i.html=e,t()}})},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(var i in t){var o=t[i];switch(i){case"dirty":this.map.set({dirty:o});break;case"iconid":this.type||(this.iconid=o,this.overlay.setIcon(e.Icons.get(o)));break;default:this[i]=o}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty: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 i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.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())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t){var e=t.color,i=t.opacity,o=t.weight;i/=100;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:function(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:function(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:function(t,e,i){"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,d=i.city&&i.city[0]!==h?i.city[0]:void 0,g=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=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:p(i._highlightResult.locale_names),city:d?p(i._highlightResult.city):void 0,administrative:u?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:g?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:y},b={name:h,administrative:u,county:m,city:d,suburb:g,country:c,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:r,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){r(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 r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(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:function(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){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(436),i(510),i(548),i(692)}();
build/index_mappress_admin.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={215:(t,e,n)=>{"use strict";n.r(e);n(278);var i,a=window.mapp||{};i=jQuery,a.Editor=function(t){this.drawingManager=null,this.map=t,this.poiEditor=null;var e=this;this.initialize=function(){this.map.display(),this.poiEditor=new a.PoiEditor(this.map),this.initDrawingManager(),i(this.map.places).off("search.mapp"),i(this.map.places).on("search.mapp",(function(t,n){e.insert(n)}))},this.insert=function(t){if(t)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),t.geometry){var e=t.formatted_address?t.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,n=t.name==e?"":e,i=new a.Poi({address:e,body:n,iconid:this.poiEditor.lastIcon,point:t.geometry.location,title:t.name,viewport:t.geometry.viewport?t.geometry.viewport:null});this.map.poiInsert(i),i.center()}else t.overlay?(i=new a.Poi({body:"",iconid:"marker"==t.type?null:"poly",overlay:t.overlay,title:"marker"==t.type?t.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:"marker"==t.type?null:t.type}),this.map.poiInsert(i)):"string"==typeof t&&t.substring(0,4)},this.initDrawingManager=function(){},this.initialize.apply(this)},a.PoiEditor=function(t){this.map=t,this.poi=null,this.sel=null,this.lastIcon=null;var e=this;this.initialize=function(){this.sel=i(this.map.iw.getContent()),i(this.map).on("mapp.open",(function(t,n){e.render(n)})),i(this.map).on("mapp.close",(function(){e.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(t){t.preventDefault();var n=i(this).attr("data-mapp-poi");e[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(t){var n=i(this).hasClass("mapp-poi-visual");e.mce(n)})),this.sel.on("keydown",(function(t){13==t.which&&"mapp-poi-body"!=t.target.id&&(t.preventDefault(),e.save())})),this.sel.on("change","[data-mapp-iconpicker]",(function(){e.poi.set({dirty:!0,iconid:i("[data-mapp-iconpicker]").attr("data-mapp-iconid")}),e.lastIcon=e.poi.iconid,e.map.renderList()})),this.sel.on("change","[data-mapp-colorpicker]",(function(){e.poi.setTemplateColors(i("[data-mapp-colorpicker]").attr("data-mapp-color"),i("[data-mapp-colorpicker]").attr("data-mapp-opacity"),i("[data-mapp-colorpicker]").attr("data-mapp-weight")),e.map.renderList()}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var t="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var e=window.tinyMCEPreInit.mceInit.content;t=void 0!==e.language?e.language:"en"}var n={mode:"none",height:"100%",convert_urls:!1,language:t,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(n),this.mce(!0)}},this.mce=function(t){var n=t?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!1,"mapp-poi-body"),i(".mapp-poi-visual, .mapp-poi-html",e.sel).removeClass("mapp-active"),t?i(".mapp-poi-visual",e.sel).addClass("mapp-active"):i(".mapp-poi-html",e.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(t){this.poi=t,i("[data-mapp-iconpicker]").trigger("refresh"),i("[data-mapp-colorpicker]").trigger("refresh"),this.initMCE()},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:i(".mapp-poi-title").val(),body:i(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},999:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect),m=(c.useLayoutEffect,c.useRef),d=c.useState,h=wp.components,f=h.Button,g=h.Modal,b=(h.Popover,h.Spinner,h.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(d({isFetchingMap:!!t.mapid,isSavingMap:!1,map:null}),2),n=e[0],i=e[1],o=m(null);function p(t){i((function(e){return a(a({},e),t)}))}function c(e,i){switch(e){case"change-title":n.map.set({dirty:!0,title:i}),p({map:n.map});break;case"close":t.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(s.store.destroyMap({mapid:t.mapid}),t.onAction("edit-destroy"));break;case"save":s.store.saveMap({mapdata:n.map.toJSON(),success:function(e){n.map.set({dirty:!1}),t.onAction("edit-save",e.mapid)}})}}return u((function(){var e=function(e){p({mapdata:e.maps[t.mapid],isFetchingMap:e.isFetchingMap,isSavingMap:e.isSavingMap})};return s.store.subscribe(e),function(){return s.store.unsubscribe(e)}})),u((function(){t.mapid&&s.store.fetchMap({mapid:t.mapid})}),[]),u((function(){n.isFetchingMap||function(t){var e=new s.Map(t,{center:null,editable:!0,embed:!0,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(o.current),zoom:null});new s.Editor(e);p({map:e})}(n.mapdata)}),[n.mapdata]),l(g,{className:"mapp-edit-modal",focusOnMount:!0,isDismissible:!1,title:function(){if(n.map&&!n.isFetchingMap){var t=n.map.title?n.map.title:"";return l(b,{className:"mapp-edit-title",placeholder:__("Untitled"),value:t,onChange:function(t){return c("change-title",t)}})}}(),shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,onRequestClose:function(){c("close")}},l("div",{className:"mapp-edit",ref:o,onKeyDown:function(t){return t.stopPropagation()},tabIndex:-1}),l("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(t){return t.stopPropagation()}},l(f,{isPrimary:!0,isBusy:n.isSavingMap,onClick:function(){return c("save")}},__("Save")),l(f,{disabled:n.isSavingMap,onClick:function(){return c("close")}},__("Cancel")),l(f,{disabled:!t.mapid||n.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return c("destroy")}},__("Delete"))))}},938:(t,e,n)=>{"use strict";n.r(e);var i=n(926),a=n(999);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}window.mapp;var c=wp.element.createElement,u=wp.element,m=u.Fragment,d=u.render,h=u.useEffect,f=(u.useLayoutEffect,u.useRef,u.useState),g=wp.components,b=g.Button,__=(g.Modal,function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")});document.getElementById("mapp-library")&&(mappl10n.options.postid=0,d(c((function(t){var e=s(f({mode:"list",mapid:null,scrollTop:null}),2),n=e[0],o=e[1];function p(t){o((function(e){return r(r({},e),t)}))}function l(t,e){switch(t){case"add-new":p({mode:"edit",mapid:null});break;case"edit-close":p({mode:"list"});break;case"edit-destroy":p({mode:"list",mapid:null});break;case"edit-save":p({mode:"list"});break;case"list-select":p({mode:"edit",mapid:e,scrollTop:jQuery(".mapp-pick-items").scrollTop()})}}return h((function(){}),[]),c(m,null,c("div",{className:"wrap"},c("div",null,c("h1",null,__("Map Library")),c(b,{className:"button button-default",onClick:function(){return l("add-new")}},__("Add New"))),c("div",{className:"mapp-library-wrapper"},c(i.default,{context:"library",mapid:n.mapid,onAction:l,scrollTop:n.scrollTop}))),"edit"==n.mode&&c(a.default,{context:"library",mapid:n.mapid,onAction:l}))}),null),document.getElementById("mapp-library")))},816:(t,e,n)=>{"use strict";n.r(e);var i=n(429),a=n(218),o=n(926),r=n(999);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var m=window.mapp||{},d=wp.element.createElement,h=wp.element,f=h.Fragment,g=h.useEffect,b=(h.useLayoutEffect,h.useRef),y=h.useState,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e=wp.components,n=(e.BaseControl,e.Button),p=(e.ButtonGroup,e.CheckboxControl,e.Dropdown,e.Modal,e.Panel,e.PanelBody),l=(e.PanelRow,e.Placeholder),u=(e.RadioControl,e.SelectControl,e.TextControl,e.ToggleControl,e.Toolbar),h=e.ToolbarButton,v=(e.ToolbarGroup,wp.blockEditor),w=v.BlockControls,O=v.InspectorControls,k=c(y({editMapid:null,isListOpen:!1,isEditorOpen:!1,map:null,mapdata:null}),2),C=k[0],j=k[1],S=b(null);function P(t){j((function(e){return s(s({},e),t)}))}function E(e,n){switch(e){case"add":P({isEditorOpen:!0,editMapid:null});break;case"change-settings":t.setAttributes(n);break;case"edit":P({isEditorOpen:!0,editMapid:t.attributes.mapid});break;case"edit-close":P({isEditorOpen:!1,editMapid:null});break;case"edit-destroy":case"list-destroy":t.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),P({isEditorOpen:!1,isListOpen:!1});break;case"edit-save":P({isEditorOpen:!1,editMapid:null}),t.setAttributes({mapid:n});break;case"list-close":P({isListOpen:!1});break;case"list-select":n!=t.attributes.mapid&&t.setAttributes({center:void 0,mapid:n,zoom:void 0}),E("list-close");break;case"open-list":P({isListOpen:!0})}}function _(){var e=void 0!==e?e:u,n=mappl10n.options.block?null:d(h,{icon:"portfolio",label:__("Map Library"),onClick:function(){return E("open-list")}});return d(w,null,d(e,null,d(h,{icon:"insert",label:__("New map"),onClick:function(){return E("add")}}),t.attributes.mapid&&d(h,{icon:"edit",label:__("Edit map"),onClick:function(){return E("edit")}}),n))}function M(){if(C.isEditorOpen)return d(r.default,{mapid:C.editMapid,onAction:E})}function x(){if(C.isListOpen)return d(o.default,{mapid:t.attributes.mapid,onAction:E})}return g((function(){var e=function(e){var n=e.maps[t.attributes.mapid];n&&P({mapdata:n})};return m.store.subscribe(e),function(){return m.store.unsubscribe(e)}})),g((function(){t.attributes.mapid&&m.store.fetchMap({mapid:t.attributes.mapid,failure:function(){return P({mapdata:void 0})}})}),[t.attributes.mapid]),g((function(){var e;t.attributes.mapid&&S.current&&C.mapdata&&((e=new m.Map(C.mapdata,{center:t.attributes.center,height:t.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:t.attributes.poiList,sel:jQuery(S.current),width:t.attributes.width,zoom:t.attributes.zoom})).display(),P({map:e}))}),[C.mapdata]),t.attributes.preview?d("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):t.attributes.mapid&&void 0!==C.mapdata?d(f,null,_(),function(){if(!C.map)return null;var e,o;mappl10n.options.block&&(o=d("div",null,d("p",null,__("Like the block? Upgrade to the free plugin or MapPress Pro for more features!")),d("div",null,d(n,{isPrimary:!0,target:"_blank",href:"https://mappresspro.com"},__("MapPress Pro")),d(n,{isSecondary:!0,href:"https://wordpress.org/plugins/mappress-google-maps-for-wordpress"},__("Free plugin")))),e=d(p,{title:__("MapPress options"),initialOpen:!1},d(a.MappOptions,{onAction:E})));var r=t.attributes,s=r.center,l=r.height,c=r.poiList,u=r.width,m=r.zoom;return d(O,null,d("div",{className:"mapp-gt-inspector"},d(p,{title:__("Map settings")},d(i.MappSettings,{map:C.map,context:"map",onAction:E,center:s,height:l,poiList:c,width:u,zoom:m}),o),e))}(),d("div",{className:"mapp-gt",ref:S}),x(),M()):d(f,null,d(f,null,_(),d(l,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Create a new map or choose one from the map library.")},d(n,{icon:"insert",isSecondary:!0,onClick:function(){return E("add")}},__("New map")),!mappl10n.options.block&&d(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return E("open-list")}},__("Map Library")))),x(),M())}wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:"mappress",attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["left","center","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:function(t){return t.named.center}},height:{type:"string",shortcode:function(t){return t.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(t){return"true"==t.named.initialOpenDirections||"true"==t.named.initialopendirections}},mapid:{type:"string",shortcode:function(t){return t.named.mapid}},poiList:{type:"boolean",shortcode:function(t){return"true"==t.named.poiList||"true"==t.named.poilist}},width:{type:"string",shortcode:function(t){return t.named.width}},zoom:{type:"number",shortcode:function(t){return parseInt(t.named.zoom)?parseInt(t.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(t){var e=t.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(e)},transform:function(t){var e=t.text;return wp.blocks.rawHandler({HTML:"<p>"+e+"</p>",mode:"BLOCKS"})}}]},edit:function(t){return d(v,t)},save:function(t){return t},example:{attributes:{preview:!0}}})},186:(t,e,n)=>{"use strict";n.r(e);n(429);wp.element.createElement;var i=wp.element,a=(i.Fragment,i.useEffect,i.useLayoutEffect,i.useRef,i.useState,wp.components);a.BaseControl,a.Button,a.CheckboxControl,a.Panel,a.PanelBody,a.PanelRow,a.Spinner,a.TextControl;n(308);window.mapp,wp.element.createElement;var o=wp.element,r=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.useState,wp.components);r.BaseControl,r.Button,r.ButtonGroup,r.Card,r.CardBody,r.CardFooter,r.CardHeader,r.CheckboxControl,r.ExternalLink,r.HorizontalRule,r.Panel,r.PanelBody,r.PanelRow,r.Placeholder,r.RadioControl,r.SelectControl,r.TabPanel,r.TextControl,r.TextareaControl,r.ToggleControl,r.Toolbar,wp.data.useSelect},218:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappOptions:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect,c.useLayoutEffect,c.useRef,c.useState),m=wp.components,d=m.BaseControl,h=m.Button,f=m.ButtonGroup,g=(m.Dashicon,m.Dropdown,m.ExternalLink,m.Panel,m.PanelBody,m.PanelRow),b=(m.RadioControl,m.SelectControl,m.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(u({apiKey:mappl10n.options.apiKey,engine:mappl10n.options.engine}),2),n=e[0],i=e[1];function o(t){i((function(e){return a(a({},e),t)}))}function p(t,e){switch(t){case"apikey":o({apiKey:e});break;case"engine":o({engine:e});break;case"save":s.lib.ajax({type:"POST",data:{action:"mapp_options_save",apiKey:n.apiKey,engine:n.engine,nonce:mappl10n.options.nonce},callback:function(t){wp.data.dispatch("core/notices").createNotice("success",__("Options saved."),{type:"snackbar",isDismissible:!0,actions:[{url:window.location,label:"Refresh page"}]})}})}}return l("div",{className:"mapp-options"},null,l(g,null,l(d,{label:__("Mapping Engine")}),l(d,null,l(f,null,l(h,{onClick:function(){return p("engine","leaflet")},isPressed:"google"!=n.engine,isSmall:!0},__("Leaflet")),l(h,{onClick:function(){return p("engine","google")},isPressed:"google"==n.engine,isSmall:!0},__("Google"))))),"google"!=n.engine?null:l(b,{className:"mapp-settings-apikey",label:l("a",{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"},__("Google API key")),onChange:function(t){return p("apikey",t)},value:n.apiKey}),l(h,{onClick:function(){return p("save")},isPrimary:!0},__("Save options")))}},926:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>U});var s=wp.element.createElement,l=wp.url.addQueryArgs,c=wp.element,u=c.useCallback,m=c.useEffect,d=c.useState,h=wp.components,f=h.Button,g=h.Dropdown,b=h.Spinner,y=h.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e=r(d({results:[],search:"",searchTerm:""}),2),n=e[0],i=e[1];function o(t){i((function(e){return a(a({},e),t)}))}m((function(){wp.apiFetch({path:l("/wp/v2/search",{search:n.search,per_page:20})}).then((function(t){o({results:t})}))}),[n.search]);var p=u(_.debounce((function(t){o({search:t})}),1e3),[]);function c(e,i){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(y,{autoComplete:"false",value:n.searchTerm,onChange:function(t){o({searchTerm:t}),p(t)},placeholder:__("Search")})),n.results?n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(e){return s("div",{key:e.id,className:"mapp-attach-item",onClick:function(){t.onChange(e.id,e.title)}},s("div",{className:"mapp-attach-item-title"},e.title?e.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},e.type))}))):s("div",{},__("No posts found")):s(b,null))}return s("div",{onClick:function(t){return t.stopPropagation()}},s(g,{renderToggle:function(e){e.isOpen;var n=e.onToggle;return s(f,{icon:t.icon?t.icon:"admin-links",onClick:n,title:t.title})},renderContent:function(t){t.isOpen,t.onToggle;return c()}}))}function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var S=window.mapp||{},P=wp.element.createElement,E=wp.data.select,M=wp.element,x=M.Fragment,A=M.useEffect,I=(M.useLayoutEffect,M.useRef),T=M.useState,D=wp.components,N=(D.BaseControl,D.Button),L=(D.Dashicon,D.Modal),z=(D.PanelBody,D.RadioControl),B=D.Spinner,F=D.TextControl,R=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function U(t){var e=C(T({isFetchingItems:!0,items:null,search:"",type:"library"==t.context?"all":"post"}),2),n=e[0],i=e[1],a=I(null),o=I(null);function r(t){i((function(e){return O(O({},e),t)}))}function p(t){if("post"==n.type&&t.postid!=mappl10n.options.postid)return!1;var e=n.search.toLowerCase();return!e||(t.mapid.indexOf(e)>=0||(!!(t.post_title&&t.post_title.toLowerCase().indexOf(e)>=0)||!!(t.map_title&&t.map_title.toLowerCase().indexOf(e)>=0)))}function s(e,n){switch(e){case"attach":S.store.mutateMap({mapdata:n});break;case"close":t.onAction("list-close");break;case"duplicate":S.store.duplicateMap({mapid:n,success:function(e){wp.data.dispatch("core/notices").createNotice("success",R("Map copied"),{type:"snackbar",isDismissible:!0}),t.onAction("list-select",e.mapid)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(S.store.destroyMap({mapid:n}),n==t.mapid&&t.onAction("list-destroy",n)),a.current.focus();break;case"select":t.onAction("list-select",n);break;case"shortcode":var i=jQuery("<input>");jQuery("body").append(i),i.val('[mappress mapid="'+n+'"]').select(),document.execCommand("copy"),i.remove(),alert(R("Shortcode copied"))}}function l(){var e="library"==t.context?null:P(z,{className:"mapp-pick-type",options:[{label:R("Attached to this post"),value:"post"},{label:R("All maps"),value:"all"}],onChange:function(t){return r({type:t})},selected:n.type}),i=n.isFetchingItems||n.isAttaching&&"library"!=t.context;return P("div",{className:"mapp-pick-filter"},i&&P(B,null),P(F,{ref:a,className:"mapp-pick-search",tabIndex:1,label:R("Search"),placeholder:R("post title, map title, or map id"),onChange:function(t){return r({search:t})}}),e)}function c(){var t=_.filter(n.items,p);return n.isFetchingItems?null:t.length?P("div",{className:"mapp-pick-items"},P("div",{className:"mapp-pick-header"},P("div",{className:"mapp-pick-col-map-title"},R("Map title")),P("div",{className:"mapp-pick-col-mapid"},R("Map ID")),P("div",{className:"mapp-pick-col-post-title"},R("Attached to")),P("div",{className:"mapp-pick-col-actions"},R("Action"))),_.map(t,u)):P("div",{className:"mapp-pick-items"},P("div",{className:"mapp-pick-message"},R("No maps found")))}function u(e){var n,i,a,r=e.mapid==t.mapid;i=e.postid==mappl10n.options.postid?E("core/editor").getEditedPostAttribute("title"):e.post_title,n=e.map_title?e.map_title:R("Untitled"),i=i||R("Untitled"),e.postid>0&&e.postid==mappl10n.options.postid&&(i=R("Current post")),a=e.postid>0?e.postid==mappl10n.options.postid?i:P("a",{onClick:function(t){return t.stopPropagation()},href:mappl10n.options.editurl+"?post="+e.postid+"&action=edit",target:"_blank",title:R("Edit post")},i):R("Unattached");var p=null;if(e.postid>0){var l=R("Detach map from post");p=P(N,{onClick:function(){return s("attach",{mapid:e.mapid,postid:0})},title:l,icon:"editor-unlink"})}else{var c=R("Attach map to a post");p="library"==t.context?P(v,{onChange:function(t,n){return s("attach",{mapid:e.mapid,postid:t,post_title:n})},title:c}):P(N,{onClick:function(){return s("attach",{mapid:e.mapid,postid:mappl10n.options.postid,post_title:null})},title:c,icon:"admin-links"})}var u=P("div",{className:"mapp-pick-col-actions",onClick:function(t){return t.stopPropagation()}},p,P(N,{onClick:function(t){t.stopPropagation(),s("duplicate",e.mapid)},title:R("Copy"),icon:"admin-page"}),"library"==t.context&&P(N,{onClick:function(t){t.stopPropagation(),s("shortcode",e.mapid)},title:R("Shortcode"),icon:"shortcode"}),P(N,{onClick:function(t){t.stopPropagation(),s("destroy",e.mapid)},title:R("Delete map"),icon:"trash"}));"library"==t.context&&e.mapid;return P("div",{className:"mapp-pick-item"+(r?" mapp-selected":""),ref:r?o:null,key:e.mapid+"|"+e.postid,onClick:function(t){return s("select",e.mapid)}},P("div",{className:"mapp-pick-col-map-title"},n),P("div",{className:"mapp-pick-col-mapid"},e.mapid),P("div",{className:"mapp-pick-col-post-title"},a),u)}return A((function(){var t=function(t){r({isFetchingItems:t.isFetchingItems,items:t.items})};return S.store.subscribe(t),function(){return S.store.unsubscribe(t)}})),A((function(){a.current&&a.current.focus(),S.store.fetchItems({})}),[]),A((function(){o.current&&S.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(o.current))}),[n.type]),"library"==t.context?P(x,null,l(),c()):P(L,{className:"mapp-pick-modal",title:R("Select a map"),onRequestClose:function(){return s("close")}},l(),c())}},429:(t,e,n)=>{"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappSettings:()=>g});window.mapp;var o=wp.element.createElement,r=wp.element,p=r.Fragment,s=(r.useEffect,r.useLayoutEffect,r.useRef,r.useState),l=wp.components,c=l.BaseControl,u=l.Button,m=l.ButtonGroup,d=(l.Dashicon,l.Dropdown,l.ExternalLink,l.Panel,l.PanelBody,l.PanelRow),h=(l.RadioControl,l.SelectControl),f=l.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function g(t){var e,n=i(s({}),2);n[0],n[1];function a(t){if(!t||"string"!=typeof t)return t;var e={px:2048,vw:100,vh:100,"%":100},n=parseInt(t),i=2048,a="";for(var o in e)t.includes(o)&&(a=o,i=e[o]);return n>i?i+a:t}function r(e,n){var i=null;switch(e){case"mapTypeId":t.map.set({mapTypeId:n}),i={mapTypeId:n};break;case"poiList":t.map.set({poiList:n}),i={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=a(n.height)),n.hasOwnProperty("width")&&(n.width=a(n.width)),t.map.setSize(n),i=n;break;case"viewport-reset":t.map.center=t.map.zoom=null,t.map.recenter(),i={center:void 0,zoom:void 0};break;case"viewport-save":var o=t.map.getCenter().toJSON();i={center:o.lat+","+o.lng,zoom:t.map.getZoom()},wp.data.dispatch("core/notices").createNotice("success",__("Viewport saved"),{type:"snackbar",isDismissible:!0})}i&&t.onAction("change-settings",i)}return o("div",{className:"mapp-settings"},null,"mashup"!=t.context&&(e=t.map.title?t.map.title:__("Untitled"),o(d,null,o(c,{className:"mapp-settings-title"},e),o(c,{className:"mapp-settings-id",label:__("Map ID")},t.map.mapid))),"mashup"==t.context&&function(){var e=[];if("leaflet"==mappl10n.options.engine)e=mappl10n.options.baseLayers.map((function(t){return{label:t.label,value:t.name}}));else{var n=mappl10n.options.styles?_.keys(mappl10n.options.styles):[];e=["roadmap","satellite","terrain","hybrid"].concat(n).map((function(t){return{label:t.charAt(0).toUpperCase()+t.slice(1),value:t}}))}return e.unshift({label:__("Default"),value:null}),o(h,{className:"mapp-settings-type",help:"",label:__("Map type"),value:t.map.mapTypeId,options:e,onChange:function(t){return r("mapTypeId",t)}})}(),function(){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(t,e){return{label:t.width+"x"+t.height,height:t.height,width:t.width,value:e+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var i="custom",a=0;a<n.length-1;a++)n[a].width==t.width&&n[a].height==t.height&&(i=a);return o(p,null,o(h,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:i,options:n,onChange:function(t){return r("size",{width:n[t].width,height:n[t].height})}}),o(d,null,o(f,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(t){return r("size",{width:t})},placeholder:e.width,value:t.width}),o(f,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(t){return r("size",{height:t})},placeholder:e.height,value:t.height})))}(),(t.center&&(t.center.lat,t.center.lng,__("Zoom"),t.zoom),o(d,null,o(c,{label:__("Center/Zoom")}),o(c,null,o(m,null,o(u,{onClick:function(){return r("viewport-reset")},isPressed:!t.center,isSmall:!0},__("Automatic")),o(u,{onClick:function(){return r("viewport-save")},isPressed:t.center,isSmall:!0},__("Save")))))))}},787:()=>{function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var o=window.mapp||{};o.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,maps:{},items:[]}},o.Store.prototype={createMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;o.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(delete p.state.maps[e],p.destroyItem(e),i(e)):r(),p.publish()}})},duplicateMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:e,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},fetchMap:function(t){var e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;if(void 0!==this.state.maps[e])return p.publish(),void i(this.state.maps[e]);this.state.isFetchingMap=!0,p.publish(),o.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(p.state.maps[e]=t.data,i(t.data)):r(),p.state.isFetchingMap=!1,p.publish()}})},mutateMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapdata,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.saveItem(e),this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(p.state.maps[t.data.mapid]=t.data,i(e)):r(),p.state.isSavingMap=!1,p.publish()}})},saveMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapdata,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(e),nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},destroyItem:function(t){var e=this.state.items?this.state.items:[],i=_.findIndex(e,{mapid:t});i>-1&&e.splice(i,1),this.state.items=n(e),this.publish()},fetchItems:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e,i=t.failure,a=void 0===i?function(){}:i,r=this;if(this.state.itemsFetched)return n(this.state.items),void r.publish();this.state.isFetchingItems=!0,r.publish(),o.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(r.state.items=t.data,r.sortItems(),n(r.state.items),r.state.itemsFetched=!0):a(),r.state.isFetchingItems=!1,r.sortItems(),r.publish()}})},saveItem:function(n){var i=this.state.items?this.state.items:[],a=_.findWhere(i,{mapid:n.mapid});a?(a.mapid=void 0!==n.mapid?n.mapid:a.mapid,a.map_title=void 0!==n.title?n.title:a.map_title,a.postid=void 0!==n.postid?n.postid:a.postid,a.post_title=void 0!==n.post_title?n.post_title:a.post_title,a=function(n){for(var i=1;i<arguments.length;i++){var a=null!=arguments[i]?arguments[i]:{};i%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(a,t))}))}return n}({},a)):(a={mapid:n.mapid,map_title:n.title,postid:mappl10n.options.postid,post_title:null},i.unshift(a))},sortItems:function(){var t,e=(t="Untitled",wp.i18n.__(t,"mappress-google-maps-for-wordpress"));this.state.items=_.sortBy(this.state.items,(function(t){return parseInt(t.mapid)})),this.state.items=_.sortBy(this.state.items,(function(t){return t.map_title?t.map_title:e}))},subscribe:function(t){this.subs.add(t)},unsubscribe:function(t){this.subs.delete(t)},publish:function(){var t,e=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var a=0,o=function(){};return{s:o,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(_e){throw _e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,p=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return p=t.done,t},e:function(t){s=!0,r=t},f:function(){try{p||null==n.return||n.return()}finally{if(s)throw r}}}}(n(this.subs));try{for(e.s();!(t=e.n()).done;){(0,t.value)(this.state)}}catch(t){e.e(t)}finally{e.f()}}},o.store=new o.Store},50:()=>{var t,e=window.mapp||{};t=jQuery,e.Media=function(){this.editor=null,this.map=null,this.sel=null,this.selected=null,this.items=null,this.popup=null;var n=this;this.initialize=function(){t(".mapp-media-button").length<=0||(jQuery(document).ready((function(){_.each(mappl10n.options.pointers,(function(e,n){t(".mapp-media-button").pointer({content:e,close:function(){t.post(ajaxurl,{action:"mapp_dismiss",key:n})}}).pointer("open")}))})),this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0,closeOnEsc:!1,max:!0}),this.popup.setContent(e.lib.template("mce")),this.sel=this.popup.el,t(".mapp-media-button").on("click",(function(){n.popup.open()})),this.find(),this.sel.on("change",'input[name="mapp-mce-list-type"]',(function(){t(this).val(),t(".mapp-mce-search").val(""),n.find()})),this.sel.on("keydown",".mapp-mce-search",(function(t){if(13==t.which)return!1})),this.sel.on("input",".mapp-mce-search",(function(t){n.find()})),this.sel.on("click","[data-mapp-mce]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce");n[i]()})),this.sel.on("click",".mapp-mce-item",(function(){t(".mapp-mce-list .mapp-mce-item",this.sel).removeClass("mapp-selected"),t(this).addClass("mapp-selected"),n.selected=t(this).attr("data-mapp-mapid")})),this.sel.on("click",".mapp-mce-list [data-mapp-mce-list]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce-list"),a=t(this).closest(".mapp-mce-item").attr("data-mapp-mapid");return n[i](a),!1})),this.sel.on("click",".mapp-mce-list a",(function(t){t.stopPropagation()})),this.sel.on("change",".mapp-mce-viewport",(function(){t(this).is(":checked")||(n.map.center=n.map.zoom=null,n.map.recenter())})),this.sel.on("click",".mapp-mce-size",(function(e){var n=t(this).data("width"),i=t(this).data("height");t(".mapp-mce-width").val(n),t(".mapp-mce-height").val(i),e.preventDefault()})),this.sel.on("keydown",".mapp-mce-title",(function(t){13==t.which&&(t.preventDefault(),n.save())})))},this.add=function(){this.open(null)},this.cancel=function(){this.closeEditor()},this.close=function(){this.popup.close()},this.closeEditor=function(){this.map.poiClose(),this.map=null,this.editor=null,t(".mapp-mce-edit-panel").removeClass("mapp-open"),t(".mapp-mce-list-panel").addClass("mapp-open")},this.edit=function(t){e.Map.ajaxGet(t,(function(t){n.open(t)}))},this.find=function(){var n=this;null!==this.items?this.renderList():(t(".spinner",this.sel).show(),e.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&(t(".spinner",n.sel).hide(),n.items=_.sortBy(e.data,"post_title"),n.renderList())}}))},this.insert=function(t){var e='[mappress mapid="'+(t=t||this.map.mapid)+'"]';"undefined"==typeof wpActiveEditor?alert(mappl10n.need_classic):send_to_editor(e),this.popup.close()},this.open=function(n){this.map=new e.Map(n,{editable:!0,embed:!0,height:n&&n.height?n.height:mappl10n.options.sizes[mappl10n.options.size].height,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},poiList:!0,sel:t(".mapp-edit"),width:n&&n.width?n.width:mappl10n.options.sizes[mappl10n.options.size].width});var i=this.map.mapid;i?t(".mapp-mce-mapid").text(i):t(".mapp-mce-mapid").text(""),t(".mapp-mce-title").val(this.map.title),t(".mapp-mce-width").val(this.map.width),t(".mapp-mce-height").val(this.map.height),t(".mapp-mce-viewport").prop("checked",!(!this.map.center||!this.map.zoom)),t(".mapp-mce-edit-panel").addClass("mapp-open"),t(".mapp-mce-list-panel").removeClass("mapp-open"),this.editor=new e.Editor(this.map)},this.remove=function(t){if(confirm(mappl10n.delete_map_prompt)){this.selected=null;var n=_.findIndex(this.items,{mapid:t});n>-1&&(this.items.splice(n,1),e.Map.ajaxDelete(t),this.renderList())}},this.renderList=function(){var n=null,i=t('input[name="mapp-mce-list-type"]:checked',this.sel).val(),a=t(".mapp-mce-search",this.sel).val().toLowerCase();n="all"==i?_.filter(this.items,(function(t){return t.post_title&&-1!=t.post_title.toLowerCase().indexOf(a)||t.map_title&&-1!=t.map_title.toLowerCase().indexOf(a)})):_.filter(this.items,(function(t){return t.postid==mappl10n.options.postid})),t(".mapp-mce-list",this.sel).html(e.lib.template("mce-list",{items:n,selected:this.selected,type:i}))},this.save=function(){var e=this;this.map&&(this.map.title=t(".mapp-mce-title").val().trim(),this.map.width=t(".mapp-mce-width").val(),this.map.height=t(".mapp-mce-height").val(),t(".mapp-mce-viewport").prop("checked")?(this.map.center=this.map.getMap().getCenter().toJSON(),this.map.zoom=this.map.getMap().getZoom()):(this.map.center=null,this.map.zoom=null),this.map.ajaxSave((function(){var n=e.map.mapid?e.map.mapid.toString():null,i=_.findIndex(e.items,(function(t){return t.mapid==n}));-1==i?e.items.unshift({mapid:n,map_title:e.map.title,postid:mappl10n.options.postid,post_title:t("#title").val()||t("#post-title-0").val()}):e.items[i].map_title=e.map.title,e.renderList(),e.closeEditor()})))},this.initialize.apply(this)},e.media=new e.Media},305:()=>{var t;(t=jQuery)(document).ready((function(){t('input[name="mappress_options[engine]"]').on("change",(function(){t('input[name="save"]').click()})),t('input[name="mappress_options[geocoder]"]').on("change",(function(){t('input[name="save"]').click()})),t("[data-mapp-grid]").each((function(t,e){new mapp.widgets.Grid(e)})),t(document).on("focus",".mapp-expand",(function(){t(this).parent().width("100%"),t(this).attr("rows",20)})),t(document).on("blur",".mapp-expand",(function(){t(this).parent().width("auto"),t(this).attr("rows",1)})),t(".mapp-autoicons").on("change","#mapp-autoicons-key",(function(e){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:t(this).val()},callback:function(e){e&&e.status&&(t(".mapp-autoicons").html(e.data),new mapp.widgets.Grid(t("[data-mapp-grid]",".mapp-autoicons")))}})})),t("#mapp-filters tbody").sortable({handle:".mapp-handle"}),t(".mapp-confirm").on("change",(function(){var e=t(".mapp-confirm").is(":checked");t(".mapp-import").prop("disabled",!e)}))}))},278:()=>{var t,e=window.mapp||{};e.widgets={},t=jQuery,e.widgets.ColorPicker=function(){var n=this;this.popup=null,this.toggle=null,this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-colorpicker]"}),n.popup.setContent(e.lib.template("color-picker")),t(document).on("refresh","[data-mapp-colorpicker]",(function(e){var n=t(this),i=n.attr("data-mapp-color")?n.attr("data-mapp-color"):"#000000";n.css({"background-color":i,opacity:n.attr("data-mapp-opacity")/100,"border: ":"1px solid "+i})})),this.popup.el.on("click","[data-mapp-color]",(function(e){n.toggle.attr("data-mapp-color",t(this).attr("data-mapp-color")),n.toggle.trigger("refresh"),n.toggle.trigger("change")})),this.popup.el.on("change",".mapp-opacity, .mapp-weight",(function(e){t(this).hasClass("mapp-opacity")?n.toggle.attr("data-mapp-opacity",t(this).val()):n.toggle.attr("data-mapp-weight",t(this).val()),n.toggle.trigger("change"),n.toggle.trigger("refresh")})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,t('[data-mapp-color="'+n.toggle.attr("data-mapp-color")+'"]',n.popup.el).addClass("mapp-selected"),t(".mapp-opacity",n.popup.el).val(n.toggle.attr("data-mapp-opacity")),t(".mapp-weight",n.popup.el).val(n.toggle.attr("data-mapp-weight"))}))},t((function(){new e.widgets.ColorPicker})),function(t){e.widgets.Grid=function(e,n){this.el=t(e),this.options=jQuery.extend({action:null,sortable:!1},n);var i=this;this.table=t("table",this.el),this.template=t("script",this.el).html().replace(new RegExp("'","g"),'"'),this.el.on("click",(function(e){var n=t(e.target).attr("data-mapp-action");n&&(i[n](e),e.preventDefault())}))},e.widgets.Grid.prototype={add:function(){this.table.show();var e=t(this.template).appendTo(this.table);t(":input:eq(0)",e).focus()},remove:function(e){t(e.target).closest("tr").remove();t("tbody > tr",this.table).length||this.table.hide()}}}(jQuery),function(t){e.widgets.IconEditor=function(n,i){this.popup=null;var a=this;this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0}),this.render(i),t(".mapp-icon-editor-open").on("click",(function(t){return a.popup.open(),!1})),this.popup.el.on("click","[data-mapp-action]",(function(e){var n=t(this).attr("data-mapp-action"),i=t(this).closest("[data-mapp-iconid]"),o=i?i.attr("data-mapp-iconid"):null;switch(e.preventDefault(),e.stopPropagation(),n){case"add":a.add();break;case"delete":a.destroy(o)}}))},e.widgets.IconEditor.prototype={add:function(){for(var n=t(".mapp-icon-files").prop("files"),i=new FormData,a=this,o=0;o<n.length;o++){var r=n[o];if(!r.type.match("image.*"))return void alert("File "+r.name+" is not an image.");i.append("icons[]",r)}i.append("action","mapp_icon_save"),i.append("nonce",mappl10n.options.nonce),e.lib.ajax({type:"POST",contentType:!1,processData:!1,data:i,success:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,a.render()):alert("Upload error: "+t.status)}})},destroy:function(t){var n=this;t&&confirm(mappl10n.delete_prompt)&&e.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,n.render()):alert("Upload error: "+t.status)}})},render:function(){this.popup.setContent(e.lib.template("icon-editor"))}}}(jQuery),function(t){e.widgets.IconPicker=function(){var n=this;this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-iconpicker]"}),this.toggle=null,t(document).on("refresh","[data-mapp-iconpicker]",(function(n){t(this).attr("src",e.Icons.getUrl(t(this).attr("data-mapp-iconid")))})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,n.popup.setContent(e.lib.template("icon-picker")),t("[data-mapp-iconid]",n.popup.el).removeClass("mapp-selected"),t('[data-mapp-iconid="'+n.toggle.attr("data-mapp-iconid")+'"]',n.popup.el).addClass("mapp-selected")})),this.popup.el.on("click","[data-mapp-iconid]",(function(e){var i=t(this).attr("data-mapp-iconid");n.toggle.attr("data-mapp-iconid",i),n.toggle.next('input[type="hidden"]').val(i),n.popup.close(),n.toggle.next('input[name="mappress_options[defaultIcon]"]').length?(mappl10n.options.defaultIcon=t(this).attr("data-mapp-iconid"),t("[data-mapp-iconpicker]").trigger("refresh")):n.toggle.trigger("refresh"),n.toggle.trigger("change")}))},t((function(){new e.widgets.IconPicker,t("[data-mapp-iconpicker]").trigger("refresh")}))}(jQuery),function(t){e.widgets.Popup=function(e,n){this.activeToggle=null,this.backdrop=null,this.content=t(e),this.el=null;var i=this;return this.options=t.extend({closeButton:!1,closeOnEsc:!0,max:!1,modal:!1,onRequestClose:null,position:null,toggle:null},n),this.el=t('<div class="mapp-popup">'),this.setContent(e),this.el.attr("tabindex",0),this.options.max&&this.el.addClass("mapp-popup-max"),this.el.hide(),this.options.toggle&&t(document).on("click",this.options.toggle,(function(e){i.activeToggle=t(this),i.open(),e.stopPropagation()})),this.options.modal?(this.el.addClass("mapp-popup-modal"),this.backdrop=t('<div class="mapp-popup-backdrop"></div>'),t("body").append(this.backdrop),this.options.closeOnEsc&&t(this.backdrop).on("click",(function(){i.requestClose()}))):t(document).on("click",(function(t){i.el.has(t.target).length||i.el.get(0)==t.target||i.requestClose()})),this.el.on("click",".mapp-close",(function(){i.requestClose()})),this.el.on("keydown",(function(t){27==t.which&&i.options.closeOnEsc&&i.requestClose()})),this},e.widgets.Popup.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),this.options.modal&&(this.backdrop.hide(),t("body").removeClass("mapp-popup-noscroll")),this.activeToggle&&this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),this.el.trigger("open.mapp.popup"),this.options.modal?(this.backdrop.show(),t("body").addClass("mapp-popup-noscroll")):this.el.position(t.extend({my:"center top",at:"center bottom + 5",of:this.activeToggle,collision:"flipfit"},this.options.position)),this.el.focus()},requestClose:function(){this.options.onRequestClose?this.options.onRequestClose():this.close()},setContent:function(t){this.el.empty(),this.options.closeButton&&this.el.append('<span class="mapp-close">'),this.el.append(t)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery),function(t){e.widgets.TemplateEditor=function(n,i){this.sel=t(n),this.codeStandard=null,this.codeEditor=null,this.model=null,this.popup=null,this.tokens=i;var a=this;this.sel.html(e.lib.template("tp-master")),this.popup=new e.widgets.Popup("",{modal:!0}),this.sel.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return a[n](i),!1})),this.popup.el.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return a[n](i),!1})),this.popup.el.on("click",".mapp-tab-label",(function(){return t(".mapp-tab-label",this.sel).removeClass("mapp-active"),t(this).addClass("mapp-active"),t(".mapp-tab",a.popup.el).removeClass("mapp-active"),t(".mapp-tab:eq("+t(this).index()+")",a.popup.sel).addClass("mapp-active"),a.codeStandard.codemirror.refresh(),a.codeEditor.codemirror.refresh(),!1}))},e.widgets.TemplateEditor.prototype={cancel:function(){this.popup.close()},destroy:function(){confirm(mappl10n.delete_prompt)&&(e.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:this.model.name,nonce:mappl10n.options.nonce}}),this.popup.close())},edit:function(n){var i=this;n=t(".mapp-tp-select").val();e.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:n,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&(i.model=t.data,i.renderDetail())}})},insert:function(t){var e=this.codeEditor.codemirror.getDoc(),n=e.getCursor();e.replaceRange("{{{poi."+t+"}}}",n)},renderDetail:function(){this.popup.open(),this.popup.el.html(e.lib.template("tp-detail",{model:this.model,tokens:this.tokens})),this.codeEditor=wp.codeEditor.initialize(t(".mapp-tp-content",this.popup.el)),this.codeStandard=wp.codeEditor.initialize(t(".mapp-tp-standard",this.popup.el)),this.codeStandard.codemirror.setOption("readOnly",!0),this.codeEditor.codemirror.setSize("auto","auto"),this.codeStandard.codemirror.setSize("auto","auto")},save:function(){var t=this;e.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:this.codeEditor.codemirror.getValue(),name:this.model.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&t.popup.close()}})}}}(jQuery)},308:(t,e,n)=>{"use strict";t.exports=function(t,e){var i,a,o,r,p,s,l,c,u,m,d,h,f,g=String(t).replace(/^&/,"").replace(/&$/,"").split("&"),b=g.length,y=function(t){return decodeURIComponent(t.replace(/\+/g,"%20"))},v="undefined"!=typeof window?window:n.g;v.$locutus=v.$locutus||{};var w=v.$locutus;for(w.php=w.php||{},e||(e=v),i=0;i<b&&(u=y((c=g[i].split("="))[0]),m=c.length<2?"":y(c[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));i++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(h=[],d=0,a=0;a<u.length;a++)if("["!==u.charAt(a)||d){if("]"===u.charAt(a)&&d&&(h.length||h.push(u.slice(0,d-1)),h.push(u.substr(d,a-d)),d=0,"["!==u.charAt(a+1)))break}else d=a+1;for(h.length||(h=[u]),a=0;a<h[0].length&&(" "!==(l=h[0].charAt(a))&&"."!==l&&"["!==l||(h[0]=h[0].substr(0,a)+"_"+h[0].substr(a+1)),"["!==l);a++);for(s=e,a=0,f=h.length;a<f;a++){if(p=s,(""===(u=h[a].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==a){for(r in o=-1,s)s.hasOwnProperty(r)&&+r>o&&r.match(/^\d+$/g)&&(o=+r);u=o+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}p[u]=m}}}}},e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(999),n(938),n(816),n(186),n(218),n(926),n(429),n(787),n(215),n(50),n(305)})();
1
+ !function(){var e={215:function(e,t,n){"use strict";n.r(t);var o,a=n(824),r=window.mapp||{},i=wp.element.createElement;o=jQuery,r.Editor=function(e){this.drawingManager=null,this.map=e,this.poiEditor=null;var t=this;this.initialize=function(){this.map.display(),this.poiEditor=new r.PoiEditor(this.map),this.initDrawingManager(),o(this.map.places).off("search.mapp"),o(this.map.places).on("search.mapp",(function(e,n){t.insert(n)}))},this.insert=function(e){if(e)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),e.geometry){var n=e.formatted_address?e.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,o=e.name==n?"":n,a=new r.Poi({address:n,body:o,iconid:this.poiEditor.lastIcon,point:e.geometry.location,title:e.name,viewport:e.geometry.viewport?e.geometry.viewport:null});this.map.poiInsert(a),a.center()}else e.overlay?(this.map.poiHover(null),"marker"==e.type?(a=new r.Poi({body:"",iconid:null,overlay:null,point:e.overlay.getPosition().toJSON(),title:e.overlay.getPosition().toUrlValue(6),type:null}),e.overlay.setMap(null)):a=new r.Poi({body:"",iconid:null,overlay:e.overlay,title:mappl10n.shape,type:e.type}),this.map.poiInsert(a)):"string"==typeof e&&"http"==e.substring(0,4)&&(a=new r.Poi({iconid:this.poiEditor.lastIcon,kml:{url:e},title:"KML",type:"kml"}),t.map.poiInsert(a),r.event.addListenerOnce(a.overlay,"ready defaultviewport_changed",(function(){a.center()})))},this.initDrawingManager=function(){var e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};"leaflet"==mappl10n.options.engine||(this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map.getMap()),r.event.addListener(this.drawingManager,"overlaycomplete",(function(e){t.drawingManager.get("drawingMode")&&t.insert(e)})))},this.initialize.apply(this)},r.PoiEditor=function(e){this.map=e,this.poi=null,this.sel=null,this.lastIcon=null;var t=this;this.initialize=function(){this.sel=o(this.map.iw.getContent()),o(this.map).on("mapp.open",(function(e,n){t.render(n)})),o(this.map).on("mapp.close",(function(){t.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(e){e.preventDefault();var n=o(this).attr("data-mapp-poi");t[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(e){var n=o(this).hasClass("mapp-poi-visual");t.mce(n)})),this.sel.on("keydown",(function(e){13==e.which&&"mapp-poi-body"!=e.target.id&&(e.preventDefault(),t.save())}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var e="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var t=window.tinyMCEPreInit.mceInit.content;e=void 0!==t.language?t.language:"en"}var n={mode:"none",height:"100%",convert_urls:!1,language:e,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(n),this.mce(!0)}},this.mce=function(e){var n=e?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!1,"mapp-poi-body"),o(".mapp-poi-visual, .mapp-poi-html",t.sel).removeClass("mapp-active"),e?o(".mapp-poi-visual",t.sel).addClass("mapp-active"):o(".mapp-poi-html",t.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(e){this.poi=e,this.renderColorPicker(this.poi),this.renderIconPicker(this.poi),this.initMCE()},this.renderColorPicker=function(e){var t=this;document.getElementById("mapp-poi-colorpicker")&&wp.element.render(i(a.ou,{color:e.getTemplateColors(),onChange:function(n){e.set({dirty:!0}),e.setTemplateColors(n),t.map.renderList(),t.renderColorPicker(e)}}),document.getElementById("mapp-poi-colorpicker"))},this.renderIconPicker=function(e){var t=this;document.getElementById("mapp-poi-iconpicker")&&wp.element.render(i(a.Go,{iconid:e.iconid,onChange:function(n){e.set({dirty:!0,iconid:n}),t.lastIcon=n,t.map.renderList(),t.renderIconPicker(e)}}),document.getElementById("mapp-poi-iconpicker"))},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:o(".mapp-poi-title").val(),body:o(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},999:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var o=n(429);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var p=window.mapp||{},c=wp.element.createElement,u=wp.element,m=(u.Fragment,u.useEffect),d=(u.useLayoutEffect,u.useRef),f=u.useState,h=wp.components,b=h.Button,g=(h.Dropdown,h.Modal,h.Panel,h.PanelBody),y=(h.Popover,h.Spinner,h.TextControl),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function v(e){var t,n,a=l(f({dragging:null,dragover:null,isFetchingMap:!!e.mapid,isPoiListOpen:!0,isSavingMap:!1,map:null}),2),i=a[0],s=a[1],u=d(null);function h(e){s((function(t){return r(r({},t),e)}))}function v(e){h({map:i.map})}function w(t,n){switch(t){case"change-settings":i.map.set(n),h({map:i.map});break;case"change-title":i.map.set({dirty:!0,title:n}),h({map:i.map});break;case"close":e.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(p.store.destroyMap({mapid:e.mapid}),e.onAction("edit-destroy"));break;case"save":p.store.saveMap({mapdata:i.map.toJSON(),success:function(t){i.map.set({dirty:!1}),e.onAction("edit-save",t.mapid)}})}}return m((function(){i.map&&(jQuery(i.map.div.list).off("render",v),jQuery(i.map.div.list).on("render",(function(e){return v()})))}),[i.map]),m((function(){var t=function(t){h({mapdata:t.maps[e.mapid],isFetchingMap:t.isFetchingMap,isSavingMap:t.isSavingMap})};return p.store.subscribe(t),function(){return p.store.unsubscribe(t)}})),m((function(){e.mapid&&p.store.fetchMap({mapid:e.mapid})}),[e.mapid]),m((function(){if(!i.isFetchingMap){var t={editable:!0,embed:!0,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},menu:!1,name:"media-map",poiList:!1,sel:jQuery(u.current)};"map"!=e.context&&"mashup"!=e.context||(t.center=null,t.zoom=null);var n=new p.Map(i.mapdata,t);new p.Editor(n);h({map:n})}}),[i.mapdata]),m((function(){i.map&&setTimeout((function(){return i.map.resize()}),100)}),[i.isPoiListOpen]),c("div",{className:"mapp-edit"},(t=i.map&&!i.isFetchingMap&&i.map.title?i.map.title:"",n=i.map&&!i.isFetchingMap?__("Untitled"):"",c("div",{className:"mapp-gt-modal-header"},c(y,{className:"mapp-edit-title",placeholder:n,value:t,onChange:function(e){return w("change-title",e)}}))),c("div",{className:"mapp-edit-main"},c("div",{className:"mapp-list mapp-edit-list"+(i.isPoiListOpen?" mapp-list-open":"")},function(){if("mce"!=e.context&&"library"!=e.context)return null;if(!i.map)return null;var t=i.map,n=t.center,a=t.height,r=t.poiList,l=t.width,s=t.zoom;return c("div",{className:"mapp-gt-inspector"},c(g,{initialOpen:!1,title:__("Map settings")},c(o.MappSettings,{map:i.map,context:e.context,onAction:w,center:n,height:a,poiList:r,width:l,zoom:s})))}(),function(){if(i.map){var e=function(e,t){var n=i.dragging,o=n<o?t-1:t;i.map.pois_.splice(o,0,i.map.pois_.splice(n,1)[0]),h({map:i.map,dragover:null})};return c("div",{className:"mapp-items"},_.map(i.map.pois_,(function(t,n){return c("div",{className:i.dragover==n?"mapp-item mapp-edit-dragover":"mapp-item",draggable:!0,key:n,onClick:function(){return i.map.poiOpen(i.map.pois_[n])},onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return h({dragging:n})},onDragEnter:function(e){return h({dragover:n})},onDragEnd:function(e){return h({dragging:null,dragover:null})},onDrop:function(t){return e(t,n)}},c("img",{className:"mapp-icon",src:p.Icons.getUrl(t.iconid)}),c("div",{className:"mapp-title"},t.title))})))}}(),c("div",{className:"mapp-list-toggle",onClick:function(){return h({isPoiListOpen:!i.isPoiListOpen})}})),c("div",{className:"mapp-edit-map",key:e.mapid,ref:u,onKeyDown:function(e){return e.stopPropagation()},tabIndex:-1})),c("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(e){return e.stopPropagation()}},c(b,{isPrimary:!0,isBusy:i.isSavingMap,onClick:function(){return w("save")}},__("Save")),c(b,{disabled:i.isSavingMap,onClick:function(){return w("close")}},__("Cancel")),c(b,{disabled:!e.mapid||i.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return w("destroy")}},__("Delete"))))}},800:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var p=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect,c.useLayoutEffect,c.useRef,c.useState),m=wp.components;m.Button,m.Dashicon,m.Modal;function d(e){var t=l(u({mapid:null}),2),n=t[0],a=t[1];return p(o.default,{context:"mce",mapid:n.mapid,onAction:function(t,n){switch(t){case"pick-close":o={mapid:null},a((function(e){return r(r({},e),o)})),e.onAction("pick-close",n);break;case"pick-insert":e.onAction("pick-insert",n)}var o}})}window.parent&&(window.mappIframeRender=function(e){wp.element.render(p(d,e),document.getElementById("mapp-iframe-react"))}),function(e){function t(){var t=this;this.contentWindow=null,this.iframe=null;e(".mapp-iframe-button").on("click",(function(e){e.preventDefault(),t.open()}))}t.prototype={load:function(t){var n=this;if(this.iframe)return this.iframe.show(),void t();this.iframe=e('<iframe class="mapp-iframe" allowtransparency="true"></iframe>').appendTo("body"),e("iframe").on("load",(function(){t()})),e.get(mappl10n.options.ajaxurl,{action:"mapp_iframe",nonce:mappl10n.options.nonce},(function(e){n.contentWindow=n.iframe.get(0).contentWindow,n.contentWindow.document.open("text/html","replace"),n.contentWindow.document.write(e),n.contentWindow.document.close()}))},open:function(){var e=this;this.load((function(){e.contentWindow&&e.contentWindow.mappIframeRender&&e.contentWindow.mappIframeRender({onAction:function(t,n){return e.onAction(t,n)}})}))},onAction:function(e,t){switch(e){case"pick-close":this.iframe.hide();break;case"pick-insert":var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?alert(mappl10n.need_classic):send_to_editor(n),this.iframe.hide()}}},e(".mapp-iframe-button").length&&new t(this)}(jQuery)},938:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var i=wp.element.createElement,l=wp.element,s=(l.Fragment,l.render,l.useEffect),p=(l.useLayoutEffect,l.useRef,l.useState),c=wp.components;c.Button,c.Modal;document.getElementById("mapp-library")&&(mappl10n.options.postid=0,wp.element.render(i((function(e){var t=a(p({mapid:null}),2),n=t[0];return t[1],s((function(){}),[]),i(o.default,{context:"library",mapid:n.mapid,onAction:function(e,t){switch(e){case"pick-shortcode":var n=jQuery("<input>");jQuery("body").append(n),n.val('[mappress mapid="'+t+'"]').select(),document.execCommand("copy"),n.remove(),alert((o="Shortcode copied",wp.i18n.__(o,"mappress-google-maps-for-wordpress")))}var o}})})),document.getElementById("mapp-library")))},816:function(e,t,n){"use strict";n.r(t);var o=n(429),a=n(557);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var c=window.mapp||{},u=wp.element.createElement,m=wp.element,d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useRef),b=m.useState,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function g(e){var t=wp.components,n=(t.BaseControl,t.Button),r=(t.ButtonGroup,t.CheckboxControl,t.Dropdown,t.Modal,t.Panel,t.PanelBody),l=(t.PanelRow,t.Placeholder),p=(t.RadioControl,t.SelectControl,t.TextControl,t.ToggleControl,t.Toolbar),m=t.ToolbarButton,g=(t.ToolbarGroup,wp.blockEditor),y=g.BlockControls,v=g.InspectorControls,w=s(b({isOpen:!1,map:null,mapdata:null,pickerMode:"list",pickerMapid:null}),2),O=w[0],C=w[1],k=h(null);function S(e){C((function(t){return i(i({},t),e)}))}function P(t,n){switch(t){case"add":S({isOpen:!0,pickerMapid:null,pickerMode:"edit"}),e.setAttributes({center:void 0,zoom:void 0});break;case"change-settings":e.setAttributes(n);break;case"edit":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"edit"});break;case"edit-close":S({isOpen:!1});break;case"pick-destroy":e.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),S({isOpen:!1});break;case"pick-close":S({isOpen:!1});break;case"pick-insert":case"pick-duplicate":n!=e.attributes.mapid&&e.setAttributes({center:void 0,mapid:n,zoom:void 0}),S({isOpen:!1});break;case"open":S({isOpen:!0,pickerMapid:e.attributes.mapid,pickerMode:"list"})}}function I(){var t=void 0!==t?t:p;return u(y,null,u(t,null,e.attributes.mapid&&u(m,{icon:"edit",label:__("Edit map"),onClick:function(){return P("edit")}}),u(m,{icon:"portfolio",label:__("Map Library"),onClick:function(){return P("open")}})))}function j(){if(O.isOpen)return u(a.default,{mapid:O.pickerMapid,mode:O.pickerMode,onAction:P,type:"post"})}return f((function(){var t=function(t){var n=t.maps[e.attributes.mapid];n&&S({mapdata:n})};return c.store.subscribe(t),function(){return c.store.unsubscribe(t)}})),f((function(){e.attributes.mapid&&c.store.fetchMap({mapid:e.attributes.mapid,failure:function(){return S({mapdata:void 0})}})}),[e.attributes.mapid]),f((function(){var t;e.attributes.mapid&&k.current&&O.mapdata&&((t=new c.Map(O.mapdata,{center:e.attributes.center,height:e.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:e.attributes.poiList,sel:jQuery(k.current),width:e.attributes.width,zoom:e.attributes.zoom})).display(),S({map:t}))}),[O.mapdata]),e.attributes.preview?u("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):e.attributes.mapid&&void 0!==O.mapdata?u(d,null,I(),function(){if(!O.map)return null;var t=e.attributes,n=t.center,a=t.height,i=t.poiList,l=t.width,s=t.zoom;return u(v,null,u("div",{className:"mapp-gt-inspector"},u(r,{title:__("Map settings")},u(o.MappSettings,{map:O.map,alignment:null,context:"map",onAction:P,center:n,height:a,poiList:i,width:l,zoom:s}))))}(),u("div",{className:"mapp-gt",ref:k}),j()):u(d,null,u(d,null,I(),u(l,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Use the map library to create a new map or insert an existing map.")},u(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return P("open")}},__("Map Library")))),j())}wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:"mappress",attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["left","center","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:function(e){return e.named.center}},height:{type:"string",shortcode:function(e){return e.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(e){return"true"==e.named.initialOpenDirections||"true"==e.named.initialopendirections}},mapid:{type:"string",shortcode:function(e){return e.named.mapid}},poiList:{type:"boolean",shortcode:function(e){return"true"==e.named.poiList||"true"==e.named.poilist}},width:{type:"string",shortcode:function(e){return e.named.width}},zoom:{type:"number",shortcode:function(e){return parseInt(e.named.zoom)?parseInt(e.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(e){var t=e.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(t)},transform:function(e){var t=e.text;return wp.blocks.rawHandler({HTML:"<p>"+t+"</p>",mode:"BLOCKS"})}}]},edit:function(e){return u(g,e)},save:function(e){return e},example:{attributes:{preview:!0}}})},186:function(e,t,n){"use strict";n.r(t);n(429);wp.element.createElement;var o=wp.element,a=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.useState,wp.components);a.BaseControl,a.Button,a.CheckboxControl,a.Panel,a.PanelBody,a.PanelRow,a.Spinner,a.TextControl;n(308);window.mapp,wp.element.createElement;var r=wp.element,i=(r.Fragment,r.useEffect,r.useLayoutEffect,r.useRef,r.useState,wp.components);i.BaseControl,i.Button,i.ButtonGroup,i.Card,i.CardBody,i.CardFooter,i.CardHeader,i.CheckboxControl,i.ExternalLink,i.HorizontalRule,i.Panel,i.PanelBody,i.PanelRow,i.Placeholder,i.RadioControl,i.SelectControl,i.TabPanel,i.TextControl,i.TextareaControl,i.ToggleControl,i.Toolbar,wp.data.useSelect},498:function(e,t,n){"use strict";n.r(t);var o=n(557);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}window.mapp;var p=wp.element.createElement,c=wp.element,u=c.Fragment,m=(c.useEffect,c.useLayoutEffect,c.useRef,c.useState),d=wp.components,f=(d.Button,d.Dashicon),__=(d.Modal,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function h(){var e=l(m({isOpen:!1,mapid:null}),2),t=e[0],n=e[1];function a(e){n((function(t){return r(r({},t),e)}))}function i(e,t){switch(e){case"pick-close":a({isOpen:!1,mapid:null});break;case"pick-insert":a({isOpen:!1});var n='[mappress mapid="'+t+'"]';"undefined"==typeof wpActiveEditor?__("Please select the post content to insert the map into."):send_to_editor(n);break;case"open":a({isOpen:!0,mapid:s()})}}function s(){var e=tinyMCE?tinyMCE.get("content"):null,t=e&&e.selection?e.selection.getSel():null;if(!t||void 0===t.anchorOffset||!t.anchorNode||!t.anchorNode.data)return null;for(var n=null,o=t.anchorNode.data,a=-1,r=t.anchorOffset-1;r>=0;r--){var i=o[r];if("["==i){a=r;break}if("]"==i||"<"==i||">"==i)break}return a>=0&&(n=wp.shortcode.next("mappress",o,a))?n.shortcode.attrs.named.mapid:null}return p(u,null,p("button",{className:"button",onClick:function(e){e.preventDefault(),i("open")}},p(f,{className:"wp-media-buttons-icon",icon:"location"}),__("MapPress")),t.isOpen&&p(o.default,{context:"mce",mapid:t.mapid,onAction:i}))}Array.from(document.getElementsByClassName("mapp-mce")).forEach((function(e,t){return wp.element.render(p(h),e)}))},218:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var o=n(824);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var u=wp.element.createElement,m=wp.element,d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useCallback,m.useRef),b=m.useState,g=wp.data.useSelect,y=wp.components,v=y.Button,w=y.Dashicon,O=y.ExternalLink,__=(y.Modal,y.Panel,y.PanelBody,y.PanelRow,y.Popover,y.RadioControl,y.Spinner,y.TabPanel,function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")});function C(e){var t=s(b(i({},mappress_options_state)),2),n=t[0],r=t[1];function l(e){r((function(t){return i(i({},t),e)}))}f((function(){k.current&&new mapp.Map(n.helpers.demo_map,{sel:jQuery(k.current)}).display()}),[]);var p,c,m,y,C,k=h(null);function S(e){return _.map(e,(function(e,t){return{value:t,label:e}}))}function P(e,t){switch(e){case"license-check":mapp.lib.ajax({type:"POST",data:{action:"mapp_license_check",nonce:mappl10n.options.nonce,license:settings.license},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"reset":mapp.lib.ajax({type:"POST",data:{action:"mapp_options_reset",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&window.location.reload()}});break;case"save":mapp.lib.ajax({type:"POST",data:{action:"mapp_options_save",nonce:mappl10n.options.nonce,settings:n},callback:function(e){e&&"OK"==e.status&&window.location.reload()}})}}return u("div",{className:"mapp-options"},u("form",{onSubmit:function(e){e.preventDefault(),P("save")}},u(o.$0,{title:__("Sample Map"),className:"mapp-demo-section"},u("div",{className:"mapp-options-demo",ref:k})),u(o.$0,{title:__("Basic Settings")},u(o.Tr,{title:__("Mapping API"),options:[{label:"Leaflet",value:"leaflet"},{label:"Google",value:"google"}],onChange:function(e){return l({engine:e,geocoder:"google"==e?"google":""})},checked:n.engine,help:{href:"#toc-picking-a-mapping-api",text:__("Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.")}}),"leaflet"==n.engine&&u(o.II,{title:__("Mapbox access token"),value:n.mapbox,onChange:function(e){l({mapbox:e}),"mapbox"!=n.geocoder||e||l({geocoder:""})},size:50,placeholder:__("Enter token to use Mapbox features"),help:{href:"https://www.mapbox.com/help/define-access-token/"}}),"google"==n.engine&&u(o.II,{title:__("Google API key"),name:"apiKey",value:n.apiKey,onChange:function(e){return l({apiKey:e})},size:50,help:{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"}}),"leaflet"==n.engine&&(C=[{value:"",label:__("Algolia")},{value:"nominatim",label:"Nominatim"},{value:"mapbox",label:"MapBox",disabled:!n.mapbox}],u(o.Tr,{title:__("Geocoder"),options:C,checked:n.geocoder,onChange:function(e){return l({geocoder:e})},help:{href:"#toc-picking-a-geocoder"}}))),mappl10n.options.pro&&(!n.helpers.is_multisite||n.helpers.is_super_admin||n.helpers.is_main_site)&&u(o.$0,{title:__("License")},u(o.Wx,{title:__("MapPress license key")},u(o.II,{value:n.license,onChange:function(e){return l({license:e})},size:37,placeholder:__("Enter license to enable automatic updates")}),(y=u("a",{className:"mapp-license-status",href:"https://mappresspro.com/account",target:"_blank"},__("Get license")),n.license&&n.helpers.license_status?"active"==n.helpers.license_status?u("span",{className:"mapp-license-status"},u(w,{icon:"yes"}),__("Active")):u(d,null,u(v,{type:"submit",className:"mapp-options-check-license",isSecondary:!0,onClick:function(){return P("license-check")}},__("Check now")),u("div",null,u(w,{icon:"no"}),n.helpers.license_message)):y)),u(o.XZ,{title:__("Beta versions"),label:__("Enable updates for beta versions"),checked:n.betas,onChange:function(e){return l({betas:e})}})),u(o.$0,{title:__("Map Settings")},u(o.xI,{title:__("Post types"),values:n.postTypes,options:S(n.helpers.post_types),onChange:function(e){return l({postTypes:e})}}),u(o.Tr,{title:__("Automatic display"),options:[{value:"",label:__("None")},{value:"top",label:__("Top of post")},{value:"bottom",label:__("Bottom of post")}],checked:n.autodisplay,onChange:function(e){return l({autodisplay:e})}}),u(o.Tr,{title:__("Map alignment"),options:[{value:"",label:__("Default")},{value:"center",label:__("Center")},{value:"left",label:__("Left")},{value:"right",label:__("Right")}],checked:n.alignment,onChange:function(e){return l({alignment:e})}}),u(o.Tr,{title:__("Directions"),checked:n.directions,options:[{value:"google",label:"Google"},{value:"inline",label:__("Inline")}],onChange:function(e){return l({directions:e})}}),u(o.XZ,{title:__("POI list"),checked:n.poiList,label:__("Show a list of POIs with each map"),onChange:function(e){return l({poiList:e})}}),mappl10n.options.pro&&u(o.Tr,{title:__("POI list layout"),checked:n.directions,options:[{value:"left",label:"Left of map"},{value:"inline",label:__("Below map")}],onChange:function(e){return l({directions:e})}}),u(o.II,{title:__("Mini width"),value:n.mini,onChange:function(e){return l({mini:e})},size:3,label:__("Width (px) to hide the POI list")}),u(o.XZ,{title:__("Sort"),checked:n.sort,label:__("Sort POI list by title"),onChange:function(e){return l({sort:e})}})),u(o.$0,{title:__("POI Settings")},u(o.Ph,{title:__("Default zoom"),label:__("Default zoom when displaying a single POI"),value:n.poiZoom,options:_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],(function(e){return{value:e,label:e}})),onChange:function(e){return l({zoom:e})}}),u(o.XZ,{title:__("Hover"),checked:n.tooltips,label:__("Open POIs on hover"),onChange:function(e){return l({tooltips:e})}}),u(o.XZ,{title:__("Open first POI"),checked:n.initialOpenInfo,onChange:function(e){return l({initialOpenInfo:e})},label:__("Open first POI")}),u(o.XZ,{title:__("Clustering"),checked:n.clustering,label:__("Enable marker clustering"),onChange:function(e){return l({clustering:e})}})),mappl10n.options.pro&&u(o.$0,{title:__("Mashups")},u(o.XZ,{title:__("Search"),checked:n.search,label:__("Enable search"),onChange:function(e){return l({search:e})}}),u(o.Ph,{title:__("Filter"),value:n.filter,options:S(n.helpers.taxonomies),onChange:function(e){return l({filter:e})},placeholder:""}),u(o.Tr,{title:__("Marker click"),checked:n.mashupClick,options:[{value:"poi",label:__("Open popup")},{value:"post",label:__("Open post")},{value:"postnew",label:__("Post in new tab")}],onChange:function(e){return l({mashupClick:e})}}),u(o.Tr,{title:__("Popup content"),checked:n.mashupBody,options:[{value:"poi",label:__("POI title + POI body")},{value:"post",label:__("Post title + post excerpt")}],onChange:function(e){return updatestate({mashupBody:mashupBody,val:e})}}),u(o.XZ,{title:__("KMLs"),checked:n.mashupKml,label:__("Include KML POIs in mashups"),onChange:function(e){return l({mashupKml:e})}})),mappl10n.options.pro&&u(o.$0,{title:__("Icons")},u(o.Wx,{title:__("Default icon")},u(o.Go,{iconid:n.defaultIcon,onChange:function(e){mappl10n.options.defaultIcon=e,l({defaultIcon:e})}})),u(o.Wx,{title:__("Icon directory")},u("code",null,n.helpers.icon_directory)),u(o.Wx,{title:__("Custom icons")},u(o.JK)),u(o.Wx,{title:__("Highlight selected POI")},u(o.Tr,{checked:n.highlight,options:[{value:"",label:__("None")},{value:"circle",label:__("Circle")},{value:"icon",label:__("Icon")}],onChange:function(e){return l({highlight:e})}}),u(o.Go,{defaultIcon:n.defaultIcon,iconid:n.highlightIcon,onChange:function(e){return l({highlightIcon:e})}})),(m=n.iconScale&&Array.isArray(n.iconScale)?a(n.iconScale):[0,0],u(o.Wx,{title:__("Icon scaling")},u(o.II,{value:m[0]?m[0]:"",onChange:function(e){e<=64&&(m[0]=e,l({iconScale:m}))},type:"number",min:0,max:64}),u("span",null," X "),u(o.II,{value:m[1]?m[1]:"",onChange:function(e){e<=64&&(m[1]=e,l({iconScale:m}))},type:"number",min:0,max:64}),u("span",null," (px) "))),function(){var e=S(n.helpers.taxonomies);e.unshift({value:"post_type",label:__("Post type")});var t=g((function(e){if("post_type"==n.autoicons.key)return S(n.helpers.post_types);var t=wp.data.select("core").getEntityRecords("taxonomy",n.autoicons.key,{per_page:-1,_fields:"id,name"});return t?t.map((function(e){return{value:e.id,label:e.name}})):null}),[n.autoicons.key]);return u(o.Wx,{title:__("Automatic icons")},u(o.Ph,{value:n.autoicons?n.autoicons.key:null,options:e,onChange:function(e){var t=n.autoicons?i({},n.autoicons):[];t.key=e,t.values=[],l({autoicons:t})},placeholder:""}),u(o.WM,{cols:[{id:"key",label:__("Key"),type:"select",options:t},{id:"value",label:__("Icon"),type:"icon"}],data:n.autoicons.values,onChange:function(e){var t=n.autoicons?i({},n.autoicons):[];t.values=e,l({autoicons:t})}}))}()),mappl10n.options.pro&&u(o.$0,{title:__("Styled Maps")},"leaflet"==n.engine&&u(o.Wx,{title:__("Styled maps")},u("div",null,__("Enter styles from Mapbox Studio"),u(O,{href:"https://www.mapbox.com/mapbox-studio/"})),u(o.WM,{cols:[{id:"key",label:__("Style name"),size:10},{id:"value",label:__("MapBox Share URL")}],data:n.mapboxStyles,onChange:function(e){return l({mapboxStyles:e,style:selected})},selectionColumn:"key",selectionType:"checkbox",selected:n.style})),"google"==n.engine&&u(o.Wx,{title:__("Styled maps")},u("div",null,__("Enter styles from Snazzy Maps"),u(O,{href:"https://snazzymaps.com/explore"})),u(o.WM,{cols:[{id:"key",label:__("Style name"),size:10},{id:"value",label:__("JSON"),type:"json"}],data:n.styles,onChange:function(e,t){return l({styles:e,style:t})},selectionColumn:"key",selectionType:"checkbox",selected:n.style}))),mappl10n.options.pro&&u(o.$0,{title:__("Geocoding")},u(o.Wx,{title:__("Geocoding fields")},u(o.WM,{cols:[{id:"key",label:__("Map field"),type:"select",options:S(n.helpers.meta_fields)},{id:"value",label:__("Custom field"),type:"select",options:S(n.helpers.meta_keys)}],data:n.metaKeys,onChange:function(e){return l({metaKeys:e})}})),u(o.XZ,{title:__("Overwrite"),label:__("Overwrite maps when posts are saved"),checked:n.metaSyncSave,onChange:function(e){l({metaSyncSave:e})}}),(c=__("No errors found"),n.helpers.geocoding_errors&&n.helpers.geocoding_errors.length>0&&(c=_.map(n.helpers.geocoding_errors,(function(e){return u("div",{key:e.ID},u("a",{href:mappl10n.options.editurl+"?post="+e.ID+"&action=edit"},e.post_title),u("span",null," : "+e.error))}))),u(o.Wx,{title:__("Geocoding errors")},c)),"google"==n.engine&&u(o.II,{title:__("Google Server API key"),name:"apiKeyServer",value:n.apiKeyServer,onChange:function(e){return l({apiKeyServer:e})},size:50,help:{text:__("Key secured by IP address for geocoding custom fields (optional)"),href:"https://mappresspro.com/mappress-faq"}})),mappl10n.options.pro&&u(o.$0,{title:__("Templates")},u(o.Wx,{title:__("Custom templates")},u(o.Nb)),u(o.XZ,{title:__("Mashup thumbnails"),checked:n.thumbs,label:__("Show featured image thumbnails in mashup popups and lists"),onChange:function(e){return l({thumbs:e})}}),u(o.Wx,{title:__("Thumbnail style")},u(o.Ph,{onChange:function(e){return l({thumbStyle:e})},options:[{value:"top",label:__("Top")},{value:"let",label:__("Left")},{value:"right",label:__("Right")}],value:n.thumbStyle})),u(o.Wx,{title:__("Thumbnail size")},u(o.Ph,{onChange:function(e){return l({thumbSize:e})},options:S(n.helpers.thumbnail_sizes),value:n.thumbSize}),u("span",null," "+__("or")+" "),u(o.II,{value:n.thumbWidth,onChange:function(e){return l({thumbWidth:e})},type:"number",min:0,max:9999}),u("span",null," X "),u(o.II,{value:n.thumbHeight,onChange:function(e){return l({thumbHeight:e})},type:"number",min:0,max:9999}),u("span",null," (px) "))),u(o.$0,{title:__("Localization")},(p="leaflet"==n.engine?"https://en.wikipedia.org/wiki/ISO_639-1":"http://code.google.com/apis/maps/faq.html#languagesupport",u(o.Ph,{title:__("Search language"),value:n.language,options:S(n.helpers.languages),onChange:function(e){return l({language:e})},help:{text:__("Language for searches and Google map controls"),href:p}})),u(o.Ph,{title:__("Search country"),label:__("Country code for searches"),value:n.country,options:_.map(["","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","VG","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CK","CR","HR","CU","CW","CY","CZ","CD","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","CI","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","CG","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","VI","UG","UA","AE","GB","US","UM","UY","UZ","VU","VA","VE","VN","WF","EH","YE","ZM","ZW"],(function(e){return{value:e,label:e}})),onChange:function(e){return l({country:e})},help:{href:"https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements"}}),u(o.II,{title:__("Directions server"),value:n.directionsServer,onChange:function(e){return l({directionsServer:directionsServer,val:e})},size:25})),u(o.$0,{title:__("Miscellaneous")},u(o.Wx,{title:__("Map sizes")},u(o.WM,{cols:[{id:"width",label:__("Width")+" (px, %, vw)",size:4},{id:"height",label:__("Height")+" (px, %, vh)"}],data:n.sizes,onChange:function(e,t){return l({sizes:e,size:t})},selectionColumn:"rowid",selected:n.size})),n.helpers.jetpack?null:u(o.XZ,{title:__("Scripts"),checked:n.footer,label:__("Output scripts in footer"),onChange:function(e){return l({footer:e})},help:{text:__("Disable footer scripts if maps are output using AJAX")}}),u(o.XZ,{title:"WPML",checked:n.wpml,label:__("Copy maps when overwriting a translation"),onChange:function(e){return l({wpml:e})},help:{href:"https://mappresspro.com/mappress-documentation#wpml"}}),"google"==n.engine&&u(o.XZ,{title:__("Compatiblity"),checked:n.deregister,label:__("Prevent other plugins/themes from loading the Google Maps API"),onChange:function(e){return l({deregister:e})}})),u("div",{className:"mapp-options-toolbar"},u(v,{className:"mapp-options-save",type:"submit",isPrimary:!0},__("Save")),u(v,{isSecondary:!0,onClick:function(){return P("reset")}},__("Reset Defaults")))))}document.getElementById("mapp-options-settings")&&wp.element.render(u(C),document.getElementById("mapp-options-settings"))},824:function(e,t,n){"use strict";function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,{XZ:function(){return C},xI:function(){return k},II:function(){return P},Tr:function(){return j},Ph:function(){return M},$0:function(){return E},Wx:function(){return N},ou:function(){return x},JK:function(){return D},Go:function(){return T},WM:function(){return B},Nb:function(){return L}});var u=wp.element.createElement,m=wp.element,d=m.Fragment,f=m.useEffect,h=(m.useLayoutEffect,m.useCallback),b=(m.useRef,m.useState),g=(wp.data.useSelect,wp.components),y=g.Button,v=g.Dashicon,w=(g.ExternalLink,g.Modal),O=(g.Panel,g.PanelBody,g.PanelRow,g.Popover,g.RadioControl,g.Spinner,g.TabPanel),__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function C(e){var t=e.title,n=e.label,o=e.onChange,a=e.help,r=c(e,["title","label","onChange","help"]),i=u(d,null,u("label",null,u("input",s({type:"checkbox",onChange:function(e){return o(e.target.checked)}},r)),n&&u("span",{className:"mapp-option-label"},n)),a&&u(S,a));return t?u(N,{title:t},i):i}function k(e){var t=u(d,null,_.map(e.options,(function(t,n){var o=e.values?e.values.indexOf(t.value):-1;return u(C,{key:n,label:t.label,value:t.value,checked:o>=0,onChange:function(n){var r=a(e.values);n&&-1==o&&e.onChange(r.concat(t.value)),!n&&o>=0&&(r.splice(o,1),e.onChange(r))}})})),e.help&&u(S,e.help));return e.title?u(N,{title:e.title},t):t}function S(e){var t=null;return e.href&&(t="#"==e.href.substr(0,1)?"https://mappresspro.com/mappress-documentation/"+e.href:e.href),u(d,null,t&&u("a",{className:"mapp-help-link",href:t,target:"_blank"},u(v,{icon:"editor-help"})),e.text&&u("div",{className:"mapp-help-text"},e.text))}function P(e){var t=e.title,n=e.value,o=e.label,a=e.onChange,r=e.help,i=e.type,l=c(e,["title","value","label","onChange","help","type"]),p=u(d,null,u("input",s({value:n,onChange:function(e){return a(e.target.value.trim())},type:i||"text"},l)),o&&u("span",{className:"mapp-option-label"},o),r&&u(S,r));return t?u(N,{title:t},p):p}var I=function(e){var t=e.onChange,n=e.label,o=c(e,["onChange","label"]);return u("label",null,u("input",s({type:"radio",onChange:function(e){return t(e.target.value)}},o)),n&&u("span",{className:"mapp-option-label"},n))};function j(e){var t=u(d,null,_.map(e.options,(function(t,n){return u(I,{key:n,value:t.value,checked:e.checked==t.value,onChange:function(t){return e.onChange(t)},disabled:t.disabled,label:t.label})})),e.help&&u(S,e.help));return e.title?u(N,{title:e.title},t):t}function M(e){var t=e.title,n=e.value,o=e.label,a=e.onChange,r=e.options,i=e.help,l=e.placeholder,p=c(e,["title","value","label","onChange","options","help","placeholder"]);void 0!==l&&r.unshift({value:"",label:l});var m=u(d,null,u("select",s({value:n,onChange:function(e){return a(e.target.value)}},p),_.map(r,(function(e,t){return u("option",{key:t,value:e.value},e.label)}))),o&&u("span",{className:"mapp-option-label"},o),i&&u(S,i));return t?u(N,{title:t},m):m}function A(e){var t=e.title,n=e.onChange,o=e.label,a=e.help,r=c(e,["title","onChange","label","help"]),i=u(d,null,u("textarea",s({onChange:function(e){return n(e.target.value)}},r)),o&&u("span",{className:"mapp-option-label"},o),a&&u(S,a));return t?u(N,{title:t},i):i}function E(e){var t=e.className?" "+e.className:"";return u("div",{className:"mapp-option-section"+t},u("h2",null,e.title),e.children)}function N(e){return u("div",{className:"mapp-option"},u("div",{className:"mapp-option-title"},e.title),u("div",{className:"mapp-option-value"},e.children))}function x(e){var t=o(b({isOpen:!1}),2),n=t[0],a=t[1];function r(e){a((function(t){return s(s({},t),e)}))}function i(t,n){var o=s({},e.color);switch(t){case"close":r({isOpen:!1});break;case"open":r({isOpen:!0});break;case"set-color":o.color=n,e.onChange(o);break;case"set-opacity":o.opacity=n,e.onChange(o);break;case"set-weight":o.weight=n,e.onChange(o)}}return f((function(){}),[]),u(d,null,u("span",{className:"mapp-colors-toggle",onClick:function(){return i("open",null)},style:{backgroundColor:e.color.color,border:"1px solid "+e.color.color,opacity:e.color.opacity/100},tabIndex:0}),function(){if(!n.isOpen)return null;var t=_.map([100,90,80,70,60,50,40,30,20,10,0],(function(e){return{label:e,value:e}})),o=_.map([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],(function(e){return{label:e,value:e}}));return u(w,{title:__("Select a color"),className:"mapp-colors-modal",onRequestClose:function(){return i("close")}},u("div",{className:"mapp-colors"},u("div",{className:"mapp-colors-list"},_.map(["#F4EB37","#CDDC39","#62AF44","#009D57","#0BA9CC","#4186F0","#3F5BA9","#7C3592","#A61B4A","#DB4436","#F8971B","#F4B400","#795046","#F9F7A6","#E6EEA3","#B7DBAB","#7CCFA9","#93D7E8","#9FC3FF","#A7B5D7","#C6A4CF","#D698AD","#EE9C96","#FAD199","#FFDD5E","#B29189","#FFFFFF","#CCCCCC","#777777","#000000"],(function(t,n){return u("span",{className:"mapp-color"+(t==e.color.color?" mapp-selected":""),key:t,onClick:function(){return i("set-color",t)},style:{backgroundColor:t},tabIndex:0})}))),u(M,{label:__("Opacity"),options:t,value:e.color.opacity,onChange:function(e){return i("set-opacity",e)}}),u(M,{label:__("Weight"),options:o,value:e.color.weight,onChange:function(e){return i("set-weight",e)}})))}())}function D(e){var t=o(b({isOpen:!1,userIcons:mappl10n.options.userIcons}),2),n=t[0],a=t[1];function r(e){a((function(t){return s(s({},t),e)}))}function i(e,t){switch(e){case"add":var n=new FormData;_.map(t,(function(e){e.type.match("image.*")?n.append("icons[]",e):alert("File "+e.name+" is not an image.")})),n.append("action","mapp_icon_save"),n.append("nonce",mappl10n.options.nonce),mapp.lib.ajax({type:"POST",contentType:!1,processData:!1,data:n,success:function(e){e&&"OK"==e.status?(mappl10n.options.userIcons=e.data,r({userIcons:mappl10n.options.userIcons}),alert("Icon(s) uploaded")):alert("Upload error: "+e.status)}});break;case"close":r({isOpen:!1});break;case"delete":t&&confirm(mappl10n.delete_prompt)&&mapp.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(mappl10n.options.userIcons=e.data,r({userIcons:mappl10n.options.userIcons})):alert("Delete error: "+e.status)}});break;case"open":r({isOpen:!0})}}return f((function(){}),[]),u(d,null,u(y,{isSecondary:!0,onClick:function(){return i("open",null)}},__("Edit")),n.isOpen?u(w,{title:__("Import icons"),className:"mapp-icons-editor-modal",onRequestClose:function(){return i("close")}},u("div",{className:"mapp-icons-editor"},u("div",{className:"mapp-icons-editor-wrapper"},u("ul",{className:"mapp-icons-editor-list"},n.userIcons.length?_.map(n.userIcons,(function(e){return u("li",{key:e},u("div",null,u("img",{className:"mapp-icon",title:e,alt:e,src:mappl10n.options.iconsUrl+e})),u("div",null,e),u("div",null,u(y,{icon:"trash",onClick:function(){return i("delete",e)}})))})):u("h2",null,"No custom icons have been added yet."))),u("div",{className:"mapp-icons-editor-toolbar"},u("input",{type:"file",multiple:"multiple",name:"mapp-icons-editor-files",onChange:function(e){return i("add",e.target.files)}})))):null)}function T(e){var t=o(b({defaultIcon:mappl10n.options.defaultIcon,isOpen:!1}),2),n=t[0],a=t[1];function r(e){a((function(t){return s(s({},t),e)}))}function i(t,n){switch(t){case"close":r({isOpen:!1});break;case"open":r({isOpen:!0});break;case"set":r({isOpen:!1}),e.onChange(n)}}return f((function(){}),[]),u(d,null,u("img",{className:"mapp-icon",onClick:function(){return i("open",null)},src:mapp.Icons.getUrl(e.iconid),tabIndex:0}),function(){if(!n.isOpen)return null;var t=_.map(mappl10n.options.userIcons,(function(t){return u("img",{alt:t,className:e.iconid==t?"mapp-icon mapp-selected":"mapp-icon",key:t,onClick:function(){return i("set",t)},src:mappl10n.options.iconsUrl+t,title:t})})),o=_.map(mappl10n.options.standardIcons,(function(t,n){return u("span",{alt:t,className:e.iconid==t?"mapp-icon-sprite mapp-selected":"mapp-icon-sprite",key:t,onClick:function(){return i("set",t)},style:{backgroundPosition:-24*n+"px 0px"},title:t})}));return u(w,{title:__("Select an icon"),className:"mapp-icons",onRequestClose:function(){return i("close")}},u("div",{className:"mapp-icons-list"},u("div",{className:"mapp-icons-user"},t),u("div",{className:"mapp-icons-standard"},o)),u("div",{className:"mapp-icons-toolbar"},u(y,{isSecondary:!0,onClick:function(){return i("set",null)}},__("Use default icon"))))}())}function B(e){var t,n,r=o(b({dragging:null,dragover:null}),2),i=r[0],l=r[1];function p(e){l((function(t){return s(s({},t),e)}))}function c(t,n){var o=a(e.data);switch(t){case"add":var r={};_.map(e.cols,(function(e){r[e.id]=""})),o.push(r),e.onChange(o,e.selected);break;case"change":o[n.i][n.id]=n.value,e.onChange(o,e.selected);break;case"delete":var l;o.splice(n,1),l=n==e.selected?null:n<e.selected?e.selected-1:e.selected,e.onChange(o,l);break;case"select":p({selected:n}),e.onChange(o,n);break;case"sort":var s=i.dragging,c=s<c?n-1:n;o.splice(c,0,o.splice(s,1)[0]),e.onChange(o,c),p({dragover:null})}}return f((function(){}),[]),u("div",{className:"mapp-grid"},e.data&&!!e.data.length&&u("div",{className:"mapp-grid-table"},(t=e.selectionColumn?u("div",{className:"mapp-grid-cell",key:"select"},__("Default")):null,n=u("div",{className:"mapp-grid-cell",key:"actions"},""),u("div",{className:"mapp-grid-header"},u("div",{className:"mapp-grid-row"},t,_.map(e.cols,(function(e){return u("div",{className:"mapp-grid-cell",key:e.id},e.label)})),n))),u("div",{className:"mapp-grid-body"},_.map(e.data,(function(t,n){return function(t,n){return u("div",{className:"mapp-grid-row"+(i.dragover==n?" mapp-dragover":""),draggable:!0,key:n,onDragOver:function(e){return e.preventDefault()},onDragStart:function(e){return p({dragging:n})},onDragEnter:function(e){return p({dragover:n})},onDragEnd:function(e){return p({dragging:null,dragover:null})},onDrop:function(e){return c("sort",n)}},function(t,n){if(!e.selectionColumn)return null;var o,a;switch("rowid"==e.selectionColumn?o=n:t[e.selectionColumn]?o=t[e.selectionColumn]:a=!0,e.selectionType){case"checkbox":return u("div",{className:"mapp-grid-cell"},u(C,{value:o,checked:e.selected==o,disabled:a,onChange:function(e){c("select",e?o:null)}}));case"radio":default:return u("div",{className:"mapp-grid-cell"},u(I,{checked:e.selected==o,onChange:function(){return c("select",o)}}))}}(t,n),_.map(e.cols,(function(t,o){return u("div",{className:"mapp-grid-cell",key:n+"-"+o},function(t,n){switch(n.type){case"icon":return u(T,{iconid:e.data[t][n.id],onChange:function(e){return c("change",{i:t,id:n.id,value:e})}});case"json":return u(A,{className:"mapp-option-expando",value:e.data[t][n.id],onChange:function(e){return c("change",{i:t,id:n.id,value:e})}});case"select":return u(M,{key:t+"-"+n.id,value:e.data[t][n.id],options:n.options,onChange:function(e){c("change",{i:t,id:n.id,value:e})}});case"input":default:return u(P,{key:t+"-"+n.id,size:e.data[t][n.size],value:e.data[t][n.id],onChange:function(e){return c("change",{i:t,id:n.id,value:e})}})}}(n,t))})),function(e){return u("div",{className:"mapp-grid-cell",key:"delete"},u(y,{icon:"trash",onClick:function(){return c("delete",e)}}))}(n))}(t,n)})))),u("div",{className:"mapp-grid-toolbar"},u(y,{isSecondary:!0,onClick:function(){return c("add")}},__("Add"))))}function L(e){var t=o(b({codeEditor:null,isOpen:!1,name:null,tab:"editor",template:null,tokens:null}),2),n=t[0],a=t[1];function r(e){a((function(t){return s(s({},t),e)}))}var i,l,p=h((function(e){if(null!=e){var t=wp.codeEditor.initialize(e);t.codemirror.setSize("auto","auto"),t.codemirror.setOption("readOnly","editor"!=n.tab),r({codeEditor:t})}}),[]);function c(e,t){switch(e){case"close":r({isOpen:!1});break;case"delete":confirm(mappl10n.delete_prompt)&&(mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:n.template.name,nonce:mappl10n.options.nonce}}),r({isOpen:!1}));break;case"insert":var o=n.codeEditor.codemirror.getDoc(),a=o.getCursor();o.replaceRange("{{{poi."+t+"}}}",a);break;case"open":mapp.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!0,name:t,tab:"editor",template:e.data.template,tokens:e.data.tokens})}});break;case"save":var i="editor"==n.tab?n.codeEditor.codemirror.getValue():n.template.content;mapp.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:i,name:n.template.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&r({isOpen:!1,template:null,tokens:null})}});break;case"tab-select":if("editor"!=t){var l=s({},n.template);l.content=n.codeEditor.codemirror.getValue(),r({template:l})}r({tab:t})}}return u("div",{className:"mapp-templates"},(l=[{name:"map-popup",label:__("Map popup")},{name:"map-item",label:__("Map list item")},{name:"mashup-popup",label:__("Mashup popup")},{name:"mashup-item",label:__("Mashup list item")}],u("div",{className:"mapp-templates-list"},_.map(l,(function(e,t){return u("a",{href:"#",key:e.name,className:"mapp-templates-item",onClick:function(t){t.preventDefault(),c("open",e.name)}},e.label)})))),n.isOpen&&n.template?u(w,{title:(i=n.template.name+" ("+(n.template.exists?__("Custom"):__("New"))+")",u("div",{className:"mapp-templates-name"},i)),className:"mapp-templates-modal",onRequestClose:function(){return c("close")},shouldCloseOnClickOutside:!1},u(O,{className:"mapp-templates-tabs",onSelect:function(e){return c("tab-select",e)},tabs:[{name:"editor",title:__("Editor")},{name:"standard",title:__("Default")}]},(function(e){return t=u("div",{className:"mapp-templates-tokens"},_.map(n.tokens,(function(e,t){return u("code",{onClick:function(){return c("insert",e)},key:t,title:e},e)}))),o=u("div",{className:"mapp-templates-path"},n.template.path),u(d,null,"editor"==n.tab&&o,"editor"==n.tab&&t,u("div",{className:"editor"==n.tab?"mapp-templates-editor":"mapp-templates-standard"},u("textarea",{ref:p,defaultValue:"editor"==n.tab?n.template.content:n.template.standard})));var t,o})),u("div",{className:"mapp-templates-toolbar"},u(y,{isPrimary:!0,onClick:function(){return c("save")}},__("Save")),u(y,{isSecondary:!0,onClick:function(){return c("close")}},__("Cancel")),n.template.exists&&u("a",{onClick:function(e){e.preventDefault(),c("delete")}},__("Delete")))):null)}},557:function(e,t,n){"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.r(t),n.d(t,{default:function(){return G}});var s=wp.element.createElement,p=wp.url.addQueryArgs,c=wp.element,u=c.useCallback,m=c.useEffect,d=c.useState,f=wp.components,h=(f.Button,f.Dropdown),b=f.Spinner,g=f.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function y(e){var t=i(d({results:[],search:"",searchTerm:""}),2),n=t[0],o=t[1];function r(e){o((function(t){return a(a({},t),e)}))}m((function(){wp.apiFetch({path:p("/wp/v2/search",{search:n.search,per_page:20})}).then((function(e){r({results:e})}))}),[n.search]);var l=u(_.debounce((function(e){r({search:e})}),1e3),[]);function c(t,o){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(g,{autoComplete:"false",value:n.searchTerm,onChange:function(e){r({searchTerm:e}),l(e)},placeholder:__("Search")})),n.results?n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(t){return s("div",{key:t.id,className:"mapp-attach-item",onClick:function(){e.onChange(t.id,t.title)}},s("div",{className:"mapp-attach-item-title"},t.title?t.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},t.type))}))):s("div",{},__("No posts found")):s(b,null))}return s("div",{onClick:function(e){return e.stopPropagation()}},s(h,{renderToggle:function(e){e.isOpen;var t=e.onToggle;return s("a",{href:"#",onClick:t},__("Attach"))},renderContent:function(e){e.isOpen,e.onToggle;return c()}}))}var v=n(999);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var P=window.mapp||{},I=wp.element.createElement,j=wp.data.select,M=wp.element,A=(M.Fragment,M.useEffect),E=(M.useLayoutEffect,M.useRef),N=M.useState,x=wp.components,D=(x.BaseControl,x.Button),T=x.Dashicon,B=x.Modal,L=(x.PanelBody,x.RadioControl),F=x.Spinner,z=x.TextControl,R=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function G(e){var t=k(N({isFetchingItems:!0,items:null,mode:e.mode?e.mode:"list",mapid:e.mapid?e.mapid:null,search:"",type:"all"}),2),n=t[0],o=t[1],a=E(null),r=E(null);function i(e){o((function(t){return O(O({},t),e)}))}function l(e){if("post"==n.type&&e.postid!=mappl10n.options.postid)return!1;var t=n.search.toLowerCase();return!t||(e.mapid.indexOf(t)>=0||(!!(e.post_title&&e.post_title.toLowerCase().indexOf(t)>=0)||!!(e.map_title&&e.map_title.toLowerCase().indexOf(t)>=0)))}function s(t,o){switch(t){case"attach":P.store.mutateMap({mapdata:o});break;case"add-new":i({mode:"edit",mapid:null});break;case"change-type":i({type:o});break;case"close":e.onAction("pick-close");break;case"duplicate":P.store.duplicateMap({mapid:o,success:function(e){alert(R("Map copied")),i({mapid:e.mapid}),jQuery(".mapp-pick-items").scrollTop(0)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(P.store.destroyMap({mapid:o}),o==n.mapid&&e.onAction("pick-destroy",o)),a.current.focus();break;case"edit":i({mode:"edit",mapid:o});break;case"edit-close":"edit"==e.mode?e.onAction("pick-close"):i({mode:"list"});break;case"edit-destroy":i({mode:"list",mapid:null}),e.onAction("pick-destroy",o);break;case"edit-save":"edit"==e.mode?e.onAction("pick-close",o):i({mode:"list",mapid:o});break;case"insert":e.onAction("pick-insert",o);break;case"shortcode":e.onAction("pick-shortcode",o);break;case"sort":P.store.setSort({sortBy:o,sortAsc:P.store.state.sortBy!=o||!P.store.state.sortAsc})}}function p(t){var o,a,i,l=t.mapid==n.mapid;a=t.post_title,o=t.map_title?t.map_title:R("Untitled"),("map"==e.context||"mashup"==e.context&&t.postid==mappl10n.options.postid)&&(a=j("core/editor").getEditedPostAttribute("title")),a=a||R("Untitled"),t.postid>0&&t.postid==mappl10n.options.postid&&(a=R("Current post")),i=t.postid>0?t.postid==mappl10n.options.postid?a:I("a",{href:mappl10n.options.editurl+"?post="+t.postid+"&action=edit",target:"_blank",title:R("Edit post")},a):R("Unattached");var p=[{action:"edit",label:R("Edit")},{action:"insert",label:R("Insert into post")},{action:"duplicate",label:R("Copy")},{action:"shortcode",label:R("Shortcode")},{action:"destroy",label:R("Delete")}];"library"==e.context?p.splice(1,1):p.splice(3,1),p=I("div",{className:"mapp-pick-actions"},p.map((function(e){return I("a",{href:"#",key:e.action,onClick:function(n){n.stopPropagation(),n.preventDefault(),s(e.action,t.mapid)}},e.label)})));var c=null;return c=t.postid>0?I("a",{href:"#",onClick:function(){return s("attach",{mapid:t.mapid,postid:0})}},R("Detach")):"library"==e.context?I(y,{onChange:function(e,n){return s("attach",{mapid:t.mapid,postid:e,post_title:n})}},R("Attach")):I("a",{href:"#",onClick:function(){return s("attach",{mapid:t.mapid,postid:mappl10n.options.postid,post_title:null})}},R("Attach")),I("div",{className:"mapp-pick-item"+(l?" mapp-selected":""),key:t.mapid+"|"+t.postid,ref:l?r:null},I("div",{className:"mapp-pick-col-map_title",onClick:function(e){return s("edit",t.mapid)}},I("div",null,o),I("div",null,p)),I("div",{className:"mapp-pick-col-mapid"},t.mapid),I("div",{className:"mapp-pick-col-post_title"},i,I("div",null,c)))}A((function(){var e=function(e){i({isFetchingItems:e.isFetchingItems,isSavingMap:e.isSavingMap,items:e.items})};return P.store.subscribe(e),function(){return P.store.unsubscribe(e)}})),A((function(){a.current&&a.current.focus(),P.store.fetchItems()}),[]),A((function(){r.current&&P.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(r.current))}),[n.type,n.items]);var c,u,m=I("div",{className:"mapp-list-panel"},I("div",{className:"mapp-gt-modal-header"},I("div",{className:"mapp-gt-modal-header-title"},I("h1",null,R("Select a map")),I(D,{isPrimary:!0,onClick:function(){return s("add-new")}},R("Add New"))),I(D,{onClick:function(){return s("close")},icon:"no-alt"})),(c="library"==e.context?null:I(L,{className:"mapp-pick-type",options:[{label:R("Attached to this post"),value:"post"},{label:R("All maps"),value:"all"}],onChange:function(e){return s("change-type",e)},selected:n.type}),u=n.isFetchingItems||n.isAttaching&&"library"!=e.context,I("div",{className:"mapp-pick-filter"},u&&I(F,null),I(z,{ref:a,className:"mapp-pick-search",tabIndex:1,label:R("Search"),placeholder:R("post title, map title, or map id"),onChange:function(e){return i({search:e})}}),c)),function(){var e,t=_.filter(n.items,l),o="";return o=n.isFetchingItems?null:t.length?_.map(t,p):I("div",{className:"mapp-pick-message"},R("No maps found")),I("div",{className:"mapp-pick-items"},(e={map_title:R("Map title"),mapid:R("Map ID"),post_title:R("Attached to")},I("div",{className:"mapp-pick-items-header"},_.map(e,(function(e,t){return I("div",{className:"mapp-pick-col-"+t,onClick:function(){return s("sort",t)},key:t},e,P.store.state.sortBy==t&&I(T,{icon:P.store.state.sortAsc?"arrow-up":"arrow-down"}))})))),o)}(),function(){if("library"!=e.context)return I("div",{className:"mapp-pick-toolbar"},I(D,{isSecondary:!0,onClick:function(){return s("close")}},R("Close")))}()),d=null;if("edit"==n.mode){var f=I("div",{className:"mapp-edit-panel"},I(v.default,{context:e.context,mapid:n.mapid,onAction:s}));d="library"==e.context?I(B,{className:"mapp-gt-modal",isDismissible:!1},f):f}var h="mapp-pick mapp-mode-"+n.mode+" mapp-context-"+e.context;return"library"==e.context?I("div",{className:h},m,d):I(B,{className:"mapp-gt-modal "+h,isDismissible:"list"==n.mode,onRequestClose:function(){return s("close")},shouldCloseOnEsc:"list"==n.mode,shouldCloseOnClickOutside:"list"==n.mode},m,d)}},429:function(e,t,n){"use strict";function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],_n=!0,o=!1,_e=void 0;try{for(var a,r=e[Symbol.iterator]();!(_n=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,_e=e}finally{try{_n||null==r.return||r.return()}finally{if(o)throw _e}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.r(t),n.d(t,{MappSettings:function(){return b}});window.mapp;var r=wp.element.createElement,i=wp.element,l=i.Fragment,s=(i.useEffect,i.useLayoutEffect,i.useRef,i.useState),p=wp.components,c=p.BaseControl,u=p.Button,m=p.ButtonGroup,d=(p.Dashicon,p.Dropdown,p.ExternalLink,p.Panel,p.PanelBody,p.PanelRow),f=(p.RadioControl,p.SelectControl),h=p.TextControl,__=function(e){return wp.i18n.__(e,"mappress-google-maps-for-wordpress")};function b(e){var t,n=o(s({}),2);n[0],n[1];function a(e){if(!e||"string"!=typeof e)return e;var t={px:2048,vw:100,vh:100,"%":100},n=parseInt(e),o=2048,a="";for(var r in t)e.includes(r)&&(a=r,o=t[r]);return n>o?o+a:e}function i(t,n){var o=null;switch(t){case"mapTypeId":e.map.set({mapTypeId:n}),o={mapTypeId:n};break;case"poiList":e.map.set({poiList:n}),o={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=a(n.height)),n.hasOwnProperty("width")&&(n.width=a(n.width)),e.map.setSize(n),o=n;break;case"viewport-reset":e.map.center=e.map.zoom=null,e.map.recenter(),o={center:void 0,zoom:void 0};break;case"viewport-set":var r=e.map.getCenter().toJSON();e.map.center=r,e.map.zoom=e.map.getZoom(),o={center:r.lat+","+r.lng,zoom:e.map.getZoom()},"mce"==e.context||"library"==e.context?alert(__("Viewport set")):wp.data.dispatch("core/notices").createNotice("success",__("Viewport set"),{type:"snackbar",isDismissible:!0})}o&&e.onAction("change-settings",o)}return r("div",{className:"mapp-settings"},null,(t=e.map.title?e.map.title:__("Untitled"),r(d,null,"map"==e.context&&r(c,{className:"mapp-settings-title"},t),r(c,{className:"mapp-settings-id",label:__("Map ID")},e.map.mapid))),"mashup"==e.context&&function(){var t=[];if("leaflet"==mappl10n.options.engine)t=mappl10n.options.baseLayers.map((function(e){return{label:e.label,value:e.name}}));else{var n=mappl10n.options.styles?_.keys(mappl10n.options.styles):[];t=["roadmap","satellite","terrain","hybrid"].concat(n).map((function(e){return{label:e.charAt(0).toUpperCase()+e.slice(1),value:e}}))}return t.unshift({label:__("Default"),value:null}),r(f,{className:"mapp-settings-type",help:"",label:__("Map type"),value:e.map.mapTypeId,options:t,onChange:function(e){return i("mapTypeId",e)}})}(),function(){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(e,t){return{label:e.width+" X "+e.height,height:e.height,width:e.width,value:t+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var o="custom",a=0;a<n.length-1;a++)n[a].width==e.width&&n[a].height==e.height&&(o=a);return r(l,null,r(f,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:o,options:n,onChange:function(e){return i("size",{width:n[e].width,height:n[e].height})}}),r(d,null,r(h,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(e){return i("size",{width:e})},placeholder:t.width,value:e.width?e.width:""}),r(h,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(e){return i("size",{height:e})},placeholder:t.height,value:e.height?e.height:""})))}(),(e.center&&(e.center.lat,e.center.lng,__("Zoom"),e.zoom),r(l,null,r(c,{className:"mapp-settings-viewport",label:__("Center/Zoom")},r(m,{label:__("Center/Zoom")},r(u,{onClick:function(){return i("viewport-reset")},isPressed:!e.center,isSmall:!0},__("Automatic")),r(u,{onClick:function(){return i("viewport-set")},isPressed:e.center,isSmall:!0},__("Set")))))))}},787:function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r=window.mapp||{};r.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,sortBy:"map_title",sortAsc:!0,maps:{},items:[]}},r.Store.prototype={createMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,i=void 0===a?function(){}:a,l=this;r.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(delete l.state.maps[t],l.destroyItem(t),o(t)):i(),l.publish()}})},duplicateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,i=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:t,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),o(t)}else i();l.state.isSavingMap=!1,l.publish()}})},fetchMap:function(e){var t=e.mapid,n=e.success,o=void 0===n?function(){}:n,a=e.failure,i=void 0===a?function(){}:a,l=this;if(void 0!==this.state.maps[t])return l.publish(),void o(this.state.maps[t]);this.state.isFetchingMap=!0,l.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[t]=e.data,o(e.data)):i(),l.state.isFetchingMap=!1,l.publish()}})},mutateMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,o=void 0===n?function(){}:n,a=e.failure,i=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.saveItem(t),this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:t,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(l.state.maps[e.data.mapid]=e.data,o(t)):i(),l.state.isSavingMap=!1,l.publish()}})},saveMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mapdata,n=e.success,o=void 0===n?function(){}:n,a=e.failure,i=void 0===a?function(){}:a,l=this;this.state.isSavingMap=!0,this.publish(),r.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(t),nonce:mappl10n.options.nonce},callback:function(e){if(e&&"OK"==e.status){var t=e.data,n=t.mapid;l.state.maps[n]=t,l.saveItem(t),o(t)}else i();l.state.isSavingMap=!1,l.publish()}})},destroyItem:function(e){var t=this.state.items?this.state.items:[],o=_.findIndex(t,{mapid:e});o>-1&&t.splice(o,1),this.state.items=n(t),this.publish()},fetchItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.success,n=void 0===t?function(){}:t,o=e.failure,a=void 0===o?function(){}:o,i=this;if(this.state.itemsFetched)return n(this.state.items),void i.publish();this.state.isFetchingItems=!0,i.publish(),r.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status?(i.state.items=e.data,i.sort(),n(i.state.items),i.state.itemsFetched=!0):a(),i.state.isFetchingItems=!1,i.sort(),i.publish()}})},saveItem:function(n){var o=this.state.items?this.state.items:[],a=_.findWhere(o,{mapid:n.mapid});a?(a.mapid=void 0!==n.mapid?n.mapid:a.mapid,a.map_title=void 0!==n.title?n.title:a.map_title,a.postid=void 0!==n.postid?n.postid:a.postid,a.post_title=void 0!==n.post_title?n.post_title:a.post_title,a=function(n){for(var o=1;o<arguments.length;o++){var a=null!=arguments[o]?arguments[o]:{};o%2?e(Object(a),!0).forEach((function(e){t(n,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}({},a)):(a={mapid:n.mapid,map_title:n.title,postid:mappl10n.options.postid,post_title:null},o.unshift(a))},setSort:function(e){e.sortBy&&(this.state.sortBy=e.sortBy),void 0!==e.sortAsc&&(this.state.sortAsc=e.sortAsc),this.sort(),this.publish()},sort:function(e,t){var n,o=this,a=(n="untitled",wp.i18n.__(n,"mappress-google-maps-for-wordpress"));this.state.items.sort((function(e,t){return function(e,t,n,o){if(o=o?1:-1,"mapid"==n)return o*(Number(e.mapid)-Number(t.mapid));var r=e[n]?e[n]:a,i=t[n]?t[n]:a,l=o*r.localeCompare(i);return 0==l?Number(e.mapid)-Number(t.mapid):l}(e,t,o.state.sortBy,o.state.sortAsc)}))},subscribe:function(e){this.subs.add(e)},unsubscribe:function(e){this.subs.delete(e)},publish:function(){var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(_e){throw _e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}(n(this.subs));try{for(t.s();!(e=t.n()).done;){(0,e.value)(this.state)}}catch(e){t.e(e)}finally{t.f()}}},r.store=new r.Store},308:function(e,t,n){"use strict";e.exports=function(e,t){var o,a,r,i,l,s,p,c,u,m,d,f,h,b=String(e).replace(/^&/,"").replace(/&$/,"").split("&"),g=b.length,y=function(e){return decodeURIComponent(e.replace(/\+/g,"%20"))},v="undefined"!=typeof window?window:n.g;v.$locutus=v.$locutus||{};var w=v.$locutus;for(w.php=w.php||{},t||(t=v),o=0;o<g&&(u=y((c=b[o].split("="))[0]),m=c.length<2?"":y(c[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));o++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(f=[],d=0,a=0;a<u.length;a++)if("["!==u.charAt(a)||d){if("]"===u.charAt(a)&&d&&(f.length||f.push(u.slice(0,d-1)),f.push(u.substr(d,a-d)),d=0,"["!==u.charAt(a+1)))break}else d=a+1;for(f.length||(f=[u]),a=0;a<f[0].length&&(" "!==(p=f[0].charAt(a))&&"."!==p&&"["!==p||(f[0]=f[0].substr(0,a)+"_"+f[0].substr(a+1)),"["!==p);a++);for(s=t,a=0,h=f.length;a<h;a++){if(l=s,(""===(u=f[a].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==a){for(i in r=-1,s)s.hasOwnProperty(i)&&+i>r&&i.match(/^\d+$/g)&&(r=+i);u=r+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}l[u]=m}}}}},t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(215),n(787),n(999),n(800),n(938),n(816),n(186),n(498),n(218),n(557),n(429)}();
css/mappress.css CHANGED
@@ -26,6 +26,10 @@
26
  font-size: 13px;
27
  }
28
 
 
 
 
 
29
  /* 2019 */
30
  .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea, .mapp-layout p, .mapp-layout a {
31
  font-family: sans-serif;
@@ -98,7 +102,6 @@ a.leaflet-control-zoom-in, .leaflet-control-zoom-out {
98
  text-decoration: none !important;
99
  }
100
 
101
-
102
  @media only screen and (min--moz-device-pixel-ratio: 2),
103
  only screen and (-o-min-device-pixel-ratio: 2/1),
104
  only screen and (-webkit-min-device-pixel-ratio: 2),
@@ -158,6 +161,7 @@ only screen and (min-device-pixel-ratio: 2) {
158
  align-items: center;
159
  background-color: white;
160
  border: 1px solid lightgray;
 
161
  display: flex;
162
  height: 40px;
163
  justify-content: center;
@@ -198,7 +202,7 @@ only screen and (min-device-pixel-ratio: 2) {
198
  border-bottom: 1px solid lightgray;
199
  cursor: pointer;
200
  overflow: hidden;
201
- padding: 5px;
202
  }
203
 
204
  .mapp-list .mapp-item.mapp-selected {
@@ -227,6 +231,29 @@ only screen and (min-device-pixel-ratio: 2) {
227
  padding: 0; /* 2011 */
228
  }
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  /*
231
  -----------------------------------------------------------------------------------
232
  Header
@@ -416,35 +443,44 @@ only screen and (min-device-pixel-ratio: 2) {
416
 
417
  - This applies only to Infoboxes! Google standard infoWindow / Leaflet popup use class .mapp-iw instead
418
 
419
- mapp-ib-wrapper - wrapper around box + tip, used for sizing
420
- mapp-ib - box only, with border
421
- .mapp-iw | .mapp-iw-edit - infowindow (popup) or tooltip content
422
- mapp-ib-tip - triangle tip
 
423
 
424
  Classses applied to mapp-ib-wrapper:
425
- type .mapp-ib-popup | .mapp-ib-tooltip | .mapp-ib-edit | .mapp-open
426
 
427
  Classes applied to mapp-iw:
428
- template name .mapp-map-popup | .mapp-map-tooltip | .mapp-mashup-popup | .mapp-mashup-tooltip
429
  -----------------------------------------------------------------------------------------------------------
430
  */
431
 
432
- /* IB wrapper. Line-height is critical for tip position. Z-index places IB above menu icon, but below menu */
433
  .mapp-ib-wrapper {
434
  display: none;
435
- flex-direction: column;
436
- line-height: 0;
437
- max-height: calc(100% - 50px);
438
- max-width: calc(100% - 50px);
439
  position: absolute;
440
- z-index: 1005;
441
  }
442
 
443
  .mapp-ib-wrapper.mapp-open {
444
  display: flex;
445
  }
446
 
447
- .mapp-ib-wrapper.mapp-ib-flip {
 
 
 
 
 
 
 
 
 
 
 
448
  flex-direction: column-reverse;
449
  }
450
 
@@ -454,21 +490,21 @@ only screen and (min-device-pixel-ratio: 2) {
454
  :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
455
  :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
456
 
457
-
458
  .mapp-ib {
459
  background-color: white;
460
- border: 1px solid lightgray;
461
  box-sizing: border-box;
462
  display: flex;
463
  flex-direction: column;
464
  line-height: normal;
465
  outline: none;
466
  overflow: hidden;
 
467
  }
468
 
469
  .mapp-ib-tip {
470
  display: flex;
471
  flex: 0 0 auto;
 
472
  position: relative;
473
  width: 0;
474
  }
@@ -560,14 +596,14 @@ only screen and (min-device-pixel-ratio: 2) {
560
 
561
  /*
562
  -----------------------------------------------------------------------------------
563
- Popup
564
  -----------------------------------------------------------------------------------
565
  */
566
 
567
  .mapp-iw {
568
  display: flex;
569
  flex-direction: column;
570
- min-width: 150px;
571
  overflow: hidden;
572
  }
573
 
@@ -584,7 +620,10 @@ only screen and (min-device-pixel-ratio: 2) {
584
  .mapp-layout .mapp-iw * {
585
  color: black;
586
  line-height: normal;
587
- margin: 0;
 
 
 
588
  padding: 0;
589
  }
590
 
@@ -594,68 +633,91 @@ only screen and (min-device-pixel-ratio: 2) {
594
  max-width: 100%;
595
  }
596
 
597
- .mapp-iw p {
598
- margin: 5px 0 5px 0 !important;
 
 
 
 
 
 
599
  }
600
 
601
- .mapp-iw .mapp-body {
 
602
  flex: 1;
603
- overflow: auto;
604
- overflow-wrap: break-word;
 
605
  }
606
 
607
  .mapp-iw .mapp-title {
608
  font-weight: bold;
609
- padding-bottom: 10px;
610
  }
611
 
612
- /* Thumbnails */
613
- .mapp-iw .mapp-body .wp-post-image {
614
- vertical-align: top;
615
- float: left;
616
- margin: 3px 3px 3px 0px;
617
- padding: 0;
618
- width: 32px;
619
- height: 32px;
620
  }
621
 
622
  .mapp-iw .mapp-links {
623
- clear: both; /* Clear any floats from images in body */
624
- white-space: nowrap; /* Don't let links split in small infowindows */
625
- margin: 0 !important; /* Margin causes scrollbars */
626
- padding-top: 4px !important;
627
  }
628
 
629
- /* Override theme link styles */
630
- .mapp-iw a, .mapp-iw a:link, .mapp-iw a:active, .mapp-iw a:visited, .mapp-iw a:hover {
631
- border: none !important;
632
- box-shadow: none !important; /* 2016, 2017 */
633
- color: #4272db !important;
634
- text-decoration: none !important;
635
  }
636
 
637
- /* Add padding for IB, IW/Leaflet do it by default */
638
- .mapp-ib .mapp-iw {
639
- padding: 10px;
 
 
 
 
 
 
640
  }
641
 
642
  /*
643
  -----------------------------------------------------------------------------------
644
- Tooltips
645
  -----------------------------------------------------------------------------------
646
  */
647
 
648
- /* Always make tooltip <= 50% height, since they need room to flip */
649
- .mapp-ib-tooltip {
650
- max-height: 50%;
651
  }
652
 
653
- /* No point having scrollbar on a tooltip */
654
- .mapp-ib-tooltip .mapp-iw {
655
- overflow: hidden;
656
- padding: 10px;
657
  }
658
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
 
660
  /*
661
  -----------------------------------------------------------------------------------
@@ -712,7 +774,7 @@ only screen and (min-device-pixel-ratio: 2) {
712
  .mapp-view-filters .mapp-filters {
713
  display: flex;
714
  flex-direction: column;
715
- z-index: 1001;
716
  }
717
 
718
  .mapp-view-menu .mapp-menu {
@@ -780,6 +842,64 @@ only screen and (min-device-pixel-ratio: 2) {
780
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-list"] { display: none; }
781
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-map"] { display: block; }
782
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  /*
784
  -----------------------------------------------------------------------------------
785
  Directions
@@ -806,15 +926,11 @@ only screen and (min-device-pixel-ratio: 2) {
806
  }
807
 
808
 
809
- .mapp-dir-toolbar {
810
  margin-top: 10px;
811
  }
812
 
813
- .mapp-dir-google {
814
- float: right;
815
- }
816
-
817
- .mapp-dir-swap {
818
  display:inline-block;
819
  border: none !important; /* 2015 */
820
  text-align: center ;
@@ -829,20 +945,20 @@ only screen and (min-device-pixel-ratio: 2) {
829
  vertical-align: bottom;
830
  }
831
 
832
- .mapp-route {
833
  margin: 10px 0 0px 0 ;
834
  }
835
 
836
- .mapp-dir-saddr, .mapp-dir-daddr {
837
  width: 80% ;
838
  line-height: normal ;
839
  }
840
 
841
- .mapp-dir-saddr {
842
  margin-bottom: 5px;
843
  }
844
 
845
- .mapp-dir-arrows {
846
  background: transparent url('../images/directions.png') no-repeat center center;
847
  background-position: -10px -489px;
848
  cursor: pointer;
@@ -912,21 +1028,130 @@ only screen and (min-device-pixel-ratio: 2) {
912
  border-bottom: 1px solid lightgray;
913
  }
914
 
 
915
  /*
916
  -----------------------------------------------------------------------------------
917
- CSS tables
 
 
 
 
 
 
 
 
 
 
 
 
918
  -----------------------------------------------------------------------------------
919
  */
920
- .mapp-table {
921
- display: table;
922
- width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  }
924
 
925
- .mapp-table > div { display: table-row; }
926
- .mapp-table > div > div, .mapp-table > div > label {
927
- display: table-cell;
 
 
 
 
 
 
 
 
928
  }
929
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
  /*
931
  -----------------------------------------------------------------------------------
932
  Misc
26
  font-size: 13px;
27
  }
28
 
29
+ .mapp-canvas img {
30
+ max-width: none !important; /* 2021 interferes with pegman */
31
+ }
32
+
33
  /* 2019 */
34
  .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea, .mapp-layout p, .mapp-layout a {
35
  font-family: sans-serif;
102
  text-decoration: none !important;
103
  }
104
 
 
105
  @media only screen and (min--moz-device-pixel-ratio: 2),
106
  only screen and (-o-min-device-pixel-ratio: 2/1),
107
  only screen and (-webkit-min-device-pixel-ratio: 2),
161
  align-items: center;
162
  background-color: white;
163
  border: 1px solid lightgray;
164
+ cursor: pointer;
165
  display: flex;
166
  height: 40px;
167
  justify-content: center;
202
  border-bottom: 1px solid lightgray;
203
  cursor: pointer;
204
  overflow: hidden;
205
+ padding: 10px;
206
  }
207
 
208
  .mapp-list .mapp-item.mapp-selected {
231
  padding: 0; /* 2011 */
232
  }
233
 
234
+ /* Thumbnails in lists. Default is on top. */
235
+ .mapp-list .mapp-item .mapp-thumbnail img {
236
+ max-width: 100%;
237
+ padding-bottom: 10px;
238
+ }
239
+
240
+ .mapp-list.mapp-thumb-left .mapp-item {
241
+ flex-direction: row;
242
+ }
243
+
244
+ .mapp-list.mapp-thumb-right .mapp-item {
245
+ flex-direction: row-reverse;
246
+ }
247
+
248
+ .mapp-list.mapp-thumb-top .mapp-item {
249
+ flex-direction: column;
250
+ }
251
+
252
+ .mapp-list.mapp-thumb-top .mapp-info {
253
+ padding-top: 10px;
254
+ }
255
+
256
+
257
  /*
258
  -----------------------------------------------------------------------------------
259
  Header
443
 
444
  - This applies only to Infoboxes! Google standard infoWindow / Leaflet popup use class .mapp-iw instead
445
 
446
+ .mapp-ib-wrapper - positioning element
447
+ .mapp-ib-content - box + tip
448
+ .mapp-ib - box only, with border
449
+ .mapp-iw | .mapp-iw-edit - infowindow (popup) or tooltip content
450
+ .mapp-ib-tip - triangle tip
451
 
452
  Classses applied to mapp-ib-wrapper:
453
+ type .mapp-ib-popup | .mapp-ib-edit | .mapp-open
454
 
455
  Classes applied to mapp-iw:
456
+ template name .mapp-map-popup | .mapp-mashup-popup
457
  -----------------------------------------------------------------------------------------------------------
458
  */
459
 
460
+ /* Positioning element: width prevents clipping, height must be zero or it'll obscure canvas */
461
  .mapp-ib-wrapper {
462
  display: none;
463
+ height: 0px;
 
 
 
464
  position: absolute;
465
+ width: 9999px;
466
  }
467
 
468
  .mapp-ib-wrapper.mapp-open {
469
  display: flex;
470
  }
471
 
472
+ .mapp-ib-content {
473
+ bottom: 0; left: 0;
474
+ display: flex;
475
+ flex-direction: column;
476
+ line-height: 0; /* Prevent font from distorting tip */
477
+ max-height: 300px;
478
+ max-width: 400px;
479
+ position: absolute;
480
+ z-index: 1005; /* Needed for Leaflet, above menu icon, below menu */
481
+ }
482
+
483
+ .mapp-ib-content .mapp-ib-flip {
484
  flex-direction: column-reverse;
485
  }
486
 
490
  :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
491
  :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
492
 
 
493
  .mapp-ib {
494
  background-color: white;
 
495
  box-sizing: border-box;
496
  display: flex;
497
  flex-direction: column;
498
  line-height: normal;
499
  outline: none;
500
  overflow: hidden;
501
+ box-shadow: 0 0px 7px 0px rgba(0,0,0,0.20);
502
  }
503
 
504
  .mapp-ib-tip {
505
  display: flex;
506
  flex: 0 0 auto;
507
+ left: 50%;
508
  position: relative;
509
  width: 0;
510
  }
596
 
597
  /*
598
  -----------------------------------------------------------------------------------
599
+ Popup contents
600
  -----------------------------------------------------------------------------------
601
  */
602
 
603
  .mapp-iw {
604
  display: flex;
605
  flex-direction: column;
606
+ min-width: 200px;
607
  overflow: hidden;
608
  }
609
 
620
  .mapp-layout .mapp-iw * {
621
  color: black;
622
  line-height: normal;
623
+ }
624
+
625
+ .mapp-iw p {
626
+ margin: 0 !important;
627
  padding: 0;
628
  }
629
 
633
  max-width: 100%;
634
  }
635
 
636
+ /* Override theme link styles */
637
+ .mapp-iw a, .mapp-iw a:link, .mapp-iw a:active, .mapp-iw a:visited, .mapp-iw a:hover {
638
+ border: none !important;
639
+ box-shadow: none !important; /* 2016, 2017 */
640
+ color: #4272db !important;
641
+ margin: 0;
642
+ padding: 0;
643
+ text-decoration: none !important;
644
  }
645
 
646
+ .mapp-iw .mapp-info {
647
+ display: flex;
648
  flex: 1;
649
+ flex-direction: column;
650
+ overflow: hidden;
651
+ padding: 10px;
652
  }
653
 
654
  .mapp-iw .mapp-title {
655
  font-weight: bold;
 
656
  }
657
 
658
+ .mapp-iw .mapp-body {
659
+ flex: 1;
660
+ overflow: auto;
661
+ overflow-wrap: break-word;
 
 
 
 
662
  }
663
 
664
  .mapp-iw .mapp-links {
665
+ margin-top: 10px;
 
 
 
666
  }
667
 
668
+ /* Make directions look like a link */
669
+ .mapp-iw .mapp-dir {
670
+ color: #4272db;
 
 
 
671
  }
672
 
673
+ /* Workarounds for IE, which doesn't like flex */
674
+ .mapp-ie .mapp-iw {
675
+ display: block;
676
+ overflow: auto;
677
+ }
678
+
679
+ .mapp-ie .mapp-iw .mapp-body {
680
+ flex: none;
681
+ overflow: none;
682
  }
683
 
684
  /*
685
  -----------------------------------------------------------------------------------
686
+ Thumbnail styles
687
  -----------------------------------------------------------------------------------
688
  */
689
 
690
+ .mapp-iw .mapp-thumbnail {
691
+ overflow: hidden;
 
692
  }
693
 
694
+ .mapp-iw .mapp-thumbnail a {
695
+ display: flex;
 
 
696
  }
697
 
698
+ /* Try to get consistent sizing for featured image */
699
+ .mapp-iw .mapp-thumbnail img {
700
+ max-width: 100% !important;
701
+ object-fit: cover;
702
+ }
703
+
704
+ .mapp-iw.mapp-thumb-left {
705
+ flex-direction: row;
706
+ }
707
+
708
+ .mapp-iw.mapp-thumb-right {
709
+ flex-direction: row-reverse;
710
+ }
711
+
712
+ .mapp-iw.mapp-thumb-top {
713
+ flex-direction: column;
714
+ }
715
+
716
+ /* Trick to size the .mapp-info section to the featured image. Popups w/o an image will be min-size. */
717
+ .mapp-iw.mapp-thumb-top .mapp-info {
718
+ min-width: 100%;
719
+ width: 0;
720
+ }
721
 
722
  /*
723
  -----------------------------------------------------------------------------------
774
  .mapp-view-filters .mapp-filters {
775
  display: flex;
776
  flex-direction: column;
777
+ z-index: 10000;
778
  }
779
 
780
  .mapp-view-menu .mapp-menu {
842
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-list"] { display: none; }
843
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-map"] { display: block; }
844
 
845
+ /*
846
+ -----------------------------------------------------------------------------------
847
+ Markers
848
+ -----------------------------------------------------------------------------------
849
+ */
850
+
851
+ .mapp-marker {
852
+ cursor: pointer;
853
+ position: absolute;
854
+ touch-action: none; /* For dragdrop */
855
+ }
856
+
857
+ /* Label */
858
+ .mapp-marker img:nth-child(2) {
859
+ height: 50%;
860
+ position: absolute;
861
+ top: 50%; left: 50%;
862
+ transform: translate(-50%, -50%);
863
+ width: 50%;
864
+ }
865
+
866
+ /* Image transforms base */
867
+ .mapp-marker img {
868
+ transform-origin: 50% 100%;
869
+ transition: transform .2s;
870
+ width: 100%;
871
+ }
872
+
873
+ /* Scale image */
874
+ .mapp-marker-scale img {
875
+ transform-origin: 50% 100%;
876
+ transform: scale(1.5);
877
+ perspective: 1001px;
878
+ }
879
+
880
+ /* Scale label - combine transforms */
881
+ .mapp-marker-scale img:nth-child(2) {
882
+ transform: translate(-50%, -50%) scale(1.5);
883
+ }
884
+
885
+ .mapp-marker-circle {
886
+ overflow: visible !important;
887
+ }
888
+
889
+ .mapp-marker-circle::before {
890
+ background-color: rgba(255,255,255,0.7);
891
+ border: 3px solid white;
892
+ border-radius: 50%;
893
+ box-sizing: border-box;
894
+ content: "";
895
+ left: -25%;
896
+ top: -25%;
897
+ width: 150%;
898
+ height: 150%;
899
+ position: absolute;
900
+ z-index: -1;
901
+ }
902
+
903
  /*
904
  -----------------------------------------------------------------------------------
905
  Directions
926
  }
927
 
928
 
929
+ .mapp-directions .mapp-dir-toolbar {
930
  margin-top: 10px;
931
  }
932
 
933
+ .mapp-directions .mapp-dir-swap {
 
 
 
 
934
  display:inline-block;
935
  border: none !important; /* 2015 */
936
  text-align: center ;
945
  vertical-align: bottom;
946
  }
947
 
948
+ .mapp-directions .mapp-route {
949
  margin: 10px 0 0px 0 ;
950
  }
951
 
952
+ .mapp-directions .mapp-dir-saddr, .mapp-directions .mapp-dir-daddr {
953
  width: 80% ;
954
  line-height: normal ;
955
  }
956
 
957
+ .mapp-directions .mapp-dir-saddr {
958
  margin-bottom: 5px;
959
  }
960
 
961
+ .mapp-directions .mapp-dir-arrows {
962
  background: transparent url('../images/directions.png') no-repeat center center;
963
  background-position: -10px -489px;
964
  cursor: pointer;
1028
  border-bottom: 1px solid lightgray;
1029
  }
1030
 
1031
+
1032
  /*
1033
  -----------------------------------------------------------------------------------
1034
+ Mashup modal:
1035
+
1036
+ Use these styles with the 'mashup-modal.php' template.
1037
+
1038
+ .mapp-modal
1039
+ .mapp-modal-backdrop
1040
+ .mapp-modal-content
1041
+ .mapp-modal-close
1042
+ .mapp-modal-featured
1043
+ .mapp-modal-article
1044
+ .mapp-modal-body
1045
+ .mapp-modal-meta
1046
+
1047
  -----------------------------------------------------------------------------------
1048
  */
1049
+
1050
+ /* Prevent scrollbars when popup is open */
1051
+ body.mapp-modal-noscroll {
1052
+ overflow-y: hidden;
1053
+ }
1054
+
1055
+ .mapp-modal {
1056
+ position: fixed;
1057
+ top: 0; left: 0; bottom: 0; right: 0;
1058
+ z-index: 100000; /* WP adminbar is 99999 */
1059
+ }
1060
+
1061
+ .mapp-modal-title {
1062
+ margin-bottom: 15px;
1063
+ }
1064
+
1065
+ .mapp-modal-content {
1066
+ background-color: white;
1067
+ box-shadow: 5px 5px 10px #888;
1068
+ box-sizing: content-box;
1069
+ display: flex;
1070
+ flex-direction: row;
1071
+ height: 95vh;
1072
+ max-height: 900px;
1073
+ max-width: 1200px;
1074
+ position: fixed;
1075
+ top: 50%; left: 50%;
1076
+ transform: translate(-50%, -50%);
1077
+ width: calc(100vw - 120px);
1078
+ z-index: 1;
1079
+ }
1080
+
1081
+ /* Featured image displays on the left by default */
1082
+ .mapp-modal-featured {
1083
+ max-width: 40%;
1084
+ }
1085
+
1086
+ .mapp-modal-featured img {
1087
+ height: 100% !important;
1088
+ object-fit: cover;
1089
+ width: 100% !important;
1090
+ max-width: none !important;
1091
+ }
1092
+
1093
+ .mapp-modal-article {
1094
+ display: flex;
1095
+ flex: 1;
1096
+ flex-direction: column;
1097
+ overflow: auto;
1098
+ padding: 30px;
1099
+ }
1100
+
1101
+ .mapp-modal-meta {
1102
+ display: flex;
1103
+ justify-content: space-between;
1104
+ font-size: 12px;
1105
+ }
1106
+
1107
+ /* Element to receive focus when modal opens (e.g. scrollable post content) */
1108
+ .mapp-modal-focus {
1109
+ outline: none;
1110
+ }
1111
+
1112
+ .mapp-modal-backdrop {
1113
+ background-color: black;
1114
+ opacity: 0.6;
1115
+ height: 100vh;
1116
+ width: 100vw;
1117
+ user-select: none;
1118
  }
1119
 
1120
+ .mapp-modal-close {
1121
+ color: white;
1122
+ cursor: pointer;
1123
+ display: inline-block;
1124
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
1125
+ font-size: 36px;
1126
+ line-height: 36px;
1127
+ position: absolute;
1128
+ text-align: center;
1129
+ top: 5px; right: -40px;
1130
+ z-index: 1;
1131
  }
1132
 
1133
+ .mapp-modal-close:hover {
1134
+ color: black;
1135
+ }
1136
+
1137
+ .mapp-modal-spinner-wrapper {
1138
+ transform: translate(-200%, -200%);
1139
+ width: 5px;
1140
+ height: 5px;
1141
+ }
1142
+
1143
+ /* https://www.w3schools.com/howto/howto_css_loader.asp */
1144
+ .mapp-modal-spinner {
1145
+ background: transparent url(../images/spinner-2x.gif) no-repeat center center;
1146
+ height: 40px;
1147
+ width: 40px;
1148
+ margin-left: 10px;
1149
+ margin-right: 10px;
1150
+ position: absolute;
1151
+ top: 50%; left: 50%;
1152
+ }
1153
+
1154
+
1155
  /*
1156
  -----------------------------------------------------------------------------------
1157
  Misc
css/mappress_admin.css CHANGED
@@ -1,7 +1,7 @@
1
 
2
  /*
3
  -----------------------------------------------------------------------------------
4
- Gutenberg block
5
  -----------------------------------------------------------------------------------
6
  */
7
  .mapp-gt .mapp-layout {
@@ -34,24 +34,13 @@
34
  Map library
35
  -----------------------------------------------------------------------------------
36
  */
37
- .mapp-library-wrapper {
38
- background-color: white;
39
- border: 1px solid lightgray;
40
- display: flex;
41
- flex-direction: column;
42
- height: 80vh;
43
- margin-top: 10px;
44
- width: 100%;
45
- }
46
-
47
- .mapp-library .mapp-edit-title input {
48
- margin: 5px;
49
- width: 240px;
50
- }
51
 
52
- .mapp-library h1 {
53
- display: inline;
54
- margin-right: 10px;
 
 
 
55
  }
56
 
57
  /* Hide the wp_editor instance used to load the editor scripts */
@@ -59,45 +48,52 @@
59
  display: none;
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
62
  /*
63
  -----------------------------------------------------------------------------------
64
  Picker / Editor Modal
65
  -----------------------------------------------------------------------------------
66
  */
67
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- .mapp-pick-modal .components-modal__header, .mapp-edit-modal .components-modal__header {
70
  margin: 0;
71
  padding: 10px 20px;
72
  }
73
 
74
- .mapp-pick-modal .components-modal__content, .mapp-edit-modal .components-modal__content {
75
  background-color: white;
76
  font-size: 13px;
77
  padding: 0;
78
  }
79
 
80
  /* Override WP settings */
81
- .mapp-pick-modal a, .mapp-edit-modal a {
82
  text-decoration: none;
83
  }
84
 
85
- .mapp-pick-modal {
86
- height: 90vh;
87
- max-height: 625px;
88
- max-width: 450px;
89
- width: 90vw;
90
- }
91
-
92
- .mapp-edit-modal {
93
- max-height: none;
94
- max-width: none;
95
- height: 90vh;
96
- width: 90vw;
97
- }
98
-
99
  @media screen and (max-width: 600px) {
100
- .mapp-pick-modal {
101
  height: 100vh;
102
  max-height: none;
103
  max-width: none;
@@ -109,17 +105,70 @@
109
  },
110
  }
111
 
112
- .mapp-pick-modal .components-modal__content, .mapp-edit-modal .components-modal__content {
113
  display: flex;
114
  flex-direction: column;
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /*
118
  -----------------------------------------------------------------------------------
119
- Map Picker
120
  -----------------------------------------------------------------------------------
121
  */
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  .mapp-pick-filter {
124
  border-bottom: 1px solid lightgray;
125
  padding: 10px 20px;
@@ -172,8 +221,16 @@
172
  top: 45%;
173
  }
174
 
 
 
 
 
 
 
 
175
  /* If header is placed outside scroll area, headings are offset by scrollbar width */
176
- .mapp-pick-header {
 
177
  background-color: white;
178
  border-bottom: 1px solid lightgray;
179
  display: flex;
@@ -183,47 +240,50 @@
183
  z-index: 1;
184
  }
185
 
186
- .mapp-pick-items {
187
- flex: 1;
188
- overflow: auto;
189
  }
190
 
191
  .mapp-pick-item {
192
- align-items: center;
193
  border-bottom: 1px solid lightgray;
194
- cursor: pointer;
195
  display: flex;
196
- overflow: hidden;
197
- padding: 5px 20px;
198
  text-overflow: ellipsis;
199
  }
200
 
 
 
 
 
 
 
201
  .mapp-pick-item.mapp-selected {
202
  background-color: #f6f6f6;
203
- font-weight: 500;
204
  }
205
 
206
  .mapp-pick-item:hover {
207
  background-color: #f6f6f6;
208
  }
209
 
210
- .mapp-pick-col-map-title, .mapp-pick-col-post-title, .mapp-pick-col-mapid {
 
211
  overflow: hidden;
212
  text-overflow: ellipsis;
213
  white-space: nowrap;
214
  }
215
 
216
- .mapp-pick-col-map-title {
217
- width: 35%;
 
218
  }
219
 
220
- .mapp-pick-col-post-title {
221
- width: 35%;
222
  }
223
 
224
- .mapp-pick-col-post-title a {
225
- font-weight: normal;
226
- text-decoration: none;
227
  }
228
 
229
  .mapp-pick-col-mapid {
@@ -231,26 +291,25 @@
231
  width: 15%;
232
  }
233
 
234
- .mapp-pick-col-actions {
235
- display: flex;
236
- font-weight: normal;
237
- white-space: nowrap;
238
- width: 100px;
239
  }
240
 
241
- .mapp-pick-col-actions button {
242
- background: none;
243
- border: none;
244
- padding: 4px !important;
245
- min-width: auto !important;
246
  }
247
 
248
- .mapp-pick-col-actions .dashicon {
249
- color: inherit;
 
 
250
  }
251
 
252
- .mapp-pick-col-actions .dashicon:hover {
253
- color: #007cba;
254
  }
255
 
256
 
@@ -262,13 +321,54 @@
262
 
263
  .mapp-edit {
264
  display: flex;
 
265
  flex-direction: column;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  flex: 1;
267
  overflow: hidden;
268
  }
269
 
270
- .mapp-edit .mapp-gt {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  flex: 1;
 
272
  }
273
 
274
  .mapp-edit .mapp-layout {
@@ -284,16 +384,6 @@
284
  padding-bottom: 0px;
285
  }
286
 
287
- .mapp-edit-title input {
288
- cursor: pointer;
289
- font-size: 16px !important;
290
- margin-left: -10px;
291
- }
292
-
293
- .mapp-edit-title input:not(:hover) {
294
- border: 1px solid white !important;
295
- }
296
-
297
  .mapp-edit-toolbar {
298
  border-top: 1px solid lightgray;
299
  padding: 5px 20px;
@@ -341,6 +431,11 @@
341
  align-items: baseline;
342
  }
343
 
 
 
 
 
 
344
  /* WP sets different (8px) margin-bottom only on last child in panel row */
345
  .block-editor-block-inspector .mapp-gt-inspector .components-base-control:last-child {
346
  margin-bottom: 24px;
@@ -376,9 +471,10 @@
376
  white-space: nowrap;
377
  }
378
 
379
- .mapp-settings-dims-select {
380
- display: block !important; /* GT tries to set flex */
381
- min-width: 7em; /* WP's custom arrow obscures values */
 
382
  }
383
 
384
  .mapp-settings-dims-custom input {
@@ -389,15 +485,13 @@
389
  margin-bottom: 0;
390
  }
391
 
392
- .mapp-settings-poilist {
393
- white-space: nowrap;
394
  }
395
 
396
- .mapp-settings-poilist .components-radio-control__option {
397
- display: inline-block;
398
- }
399
- .mapp-settings-poilist .components-base-control__label {
400
- display: inline;
401
  }
402
 
403
  .mapp-settings-viewport-status {
@@ -405,6 +499,12 @@
405
  margin-left: 10px;
406
  }
407
 
 
 
 
 
 
 
408
  /*
409
  -----------------------------------------------------------------------------------
410
  Mashup query builder
@@ -465,704 +565,516 @@ button.mapp-query-refresh {
465
  flex: 1;
466
  }
467
 
468
- /*
469
- -----------------------------------------------------------------------------------
470
- Classic (tinyMCE) editor
471
- -----------------------------------------------------------------------------------
472
- */
473
- /*
474
- -----------------------------------------------------------------------------------
475
- Metaboxes
476
- -----------------------------------------------------------------------------------
477
- */
478
- #mappress.postbox h1 {
479
- display: inline-block;
480
- margin-right: 10px;
481
- }
482
 
483
  /*
484
  -----------------------------------------------------------------------------------
485
- Classic map picker
486
  -----------------------------------------------------------------------------------
487
  */
488
 
489
- .mapp-mce {
490
- background-color: white;
 
 
 
 
 
 
 
 
491
  display: flex;
 
492
  flex-direction: column;
493
- height: 100%;
494
- overflow: hidden;
495
  }
496
 
497
- /* Override WP */
498
- .mapp-mce .button {
499
- margin: 0;
500
  }
501
 
502
- .mapp-mce h1 {
503
- font-size: 16px;
504
- margin: 0;
505
- padding: 10px 0;
506
  }
507
 
508
- .mapp-mce .spinner {
509
- visibility: visible;
 
 
510
  }
511
 
 
 
 
512
 
513
- .mapp-mce-header {
514
  align-items: center;
515
- border-bottom: 1px solid lightgray;
516
  display: flex;
517
  justify-content: space-between;
518
- padding: 10px 20px;
519
- }
520
-
521
- .mapp-mce-header input.mapp-mce-title {
522
- border: none;
523
- color: #32373c;
524
- cursor: pointer;
525
- font-size: 16px !important;
526
- font-weight: 600;
527
- min-width: 150px !important;
528
  }
529
 
530
- .mapp-mce-header-left {
531
- display: flex;
532
- align-items: center;
533
  }
534
 
535
- .mapp-mce-header-left .button {
536
- margin-left: 10px;
537
  }
538
 
539
- /* Override WP settings */
540
- .mapp-mce-list-panel {
541
- display: none;
542
  }
543
 
544
- .mapp-mce-list-panel.mapp-open {
545
  display: flex;
546
- flex-direction: column;
547
  flex: 1;
548
- overflow: hidden;
549
  }
550
 
551
- .mapp-mce-list {
552
- background-color: white;
553
- flex: 1;
554
- overflow: auto;
555
  }
556
 
557
- .mapp-mce-filter-block {
558
- border-bottom: 1px solid lightgray;
559
- display: flex;
560
- flex-direction: column;
561
- padding: 10px 20px;
562
  }
563
 
564
- .mapp-mce-search-block {
565
  display: flex;
566
- align-items: center;
567
- }
568
-
569
- .mapp-mce-search {
570
- margin-left: 10px;
571
  }
572
 
573
- .mapp-mce-types-block {
574
  align-items: center;
575
  display: flex;
576
- margin-top: 10px;
577
  }
578
 
579
- .mapp-mce-types-block label {
580
- margin-right: 10px;
581
  }
582
 
583
- .mapp-mce .spinner {
584
- display: none;
585
- }
586
 
587
- .mapp-mce-list-header {
588
- background-color: white;
589
- border-bottom: 1px solid lightgray;
590
- display: flex;
591
- padding: 10px 20px;
592
- position: sticky;
593
- top: 0;
594
- z-index: 1;
595
- }
596
 
597
- .mapp-mce-item {
598
- border-bottom: 1px solid lightgray;
 
 
599
  cursor: pointer;
600
  display: flex;
601
- overflow: hidden;
602
- padding: 10px 20px;
603
- }
604
-
605
- .mapp-mce-item.mapp-selected {
606
- background-color: #f6f6f6;
607
- font-weight: 600;
608
  }
609
 
610
- .mapp-mce-item:hover {
611
- background-color: #f6f6f6;
 
 
 
612
  }
613
 
614
- .mapp-mce-col-map-title {
615
- overflow: hidden;
616
- text-overflow: ellipsis;
617
- white-space: nowrap;
618
- width: 35%;
619
  }
620
 
621
- .mapp-mce-col-post-title {
622
- overflow: hidden;
623
- text-overflow: ellipsis;
624
- white-space: nowrap;
625
- width: 35%;
626
  }
627
 
628
- .mapp-mce-col-post-title a {
629
- font-weight: normal;
630
- text-decoration: none;
 
 
 
 
 
 
 
 
631
  }
632
 
633
- .mapp-mce-col-mapid {
634
- white-space: nowrap;
635
- width: 15%;
 
636
  }
637
 
638
- .mapp-mce-col-actions {
639
- font-weight: normal;
640
- min-width: 120px;
 
641
  white-space: nowrap;
642
- width: 15%;
643
  }
644
 
645
- .mapp-mce-col-actions a {
646
- text-decoration: none;
647
  }
648
 
649
- .mapp-mce-list-footer {
650
- text-align: center;
651
- padding: 40px;
652
  }
653
 
654
- /*
655
- -----------------------------------------------------------------------------------
656
- Classic map editor
657
- -----------------------------------------------------------------------------------
658
- */
659
-
660
- .mapp-mce-edit-panel {
661
- display: none;
662
  }
663
 
664
- .mapp-mce-edit-panel.mapp-open {
665
- display: flex;
666
  flex: 1;
667
- flex-direction: column;
668
  }
669
 
670
- .mapp-mce-settings {
671
- align-items: center;
672
- border-bottom: 1px solid lightgray;
673
  display: flex;
 
674
  flex-wrap: wrap;
675
- justify-content: space-between;
676
- padding: 10px 20px;
677
- }
678
-
679
- .mapp-mce-setting {
680
- align-items: center;
681
- display: flex;
682
  }
683
 
684
- .mapp-mce-label {
685
- width: 65px;
686
- }
687
-
688
- .mapp-mce-custom {
 
689
  white-space: nowrap;
690
  }
691
 
692
- .mapp-mce-size {
693
- text-decoration: none;
694
- }
695
-
696
- .mapp-mce-width {
697
- margin-left: 5px;
698
  }
699
 
700
- .mapp-mce-toolbar {
701
- align-items: center;
702
- display: flex;
703
- border-top: 1px solid lightgray;
704
- padding: 10px 20px;
705
  }
706
 
707
- .mapp-mce-viewport-block {
708
  flex: 1;
709
- text-align: right;
 
 
710
  }
711
 
712
- .mapp-mce-toolbar .button {
713
- margin-right: 10px;
714
  }
715
 
716
  /*
717
  -----------------------------------------------------------------------------------
718
- POI editor
719
  -----------------------------------------------------------------------------------
720
  */
721
 
722
- .mapp-ib-wrapper.mapp-ib-edit {
723
- height: 100%;
724
- max-width: 550px;
725
- width: 100%;
726
  }
727
 
728
- .mapp-ib-wrapper.mapp-ib-edit .mapp-ib {
729
- flex: 1;
 
730
  }
731
 
732
- .mapp-iw-edit {
733
  display: flex;
734
- flex: 1;
735
- flex-direction: column;
736
- overflow: auto;
737
  padding: 10px;
738
  }
739
 
740
- .mapp-poi-header {
741
- display: flex;
742
- align-items: center;
743
  }
744
 
745
- .mapp-poi-header .mapp-poi-title {
746
  flex: 1;
747
- font-weight: bold;
748
- min-width: 0;
749
  }
750
 
751
- /* Set fixed icon size, otherwise Leaflet will incorrectly position the popup */
752
- .mapp-poi-header img.mapp-icon {
753
- width: 24px;
754
- height: 24px;
755
- }
756
-
757
- .mapp-iw-edit [data-mapp-iconpicker], .mapp-iw-edit [data-mapp-colorpicker] {
758
- margin-left: 5px !important;
759
- }
760
-
761
- .mapp-poi-url {
762
- width: 100%;
763
- }
764
-
765
- .mapp-poi-editor-toolbar {
766
- align-items: center;
767
- display: flex;
768
- justify-content: space-between;
769
- padding: 3px 0;
770
- }
771
-
772
- .mapp-poi-toolbar button {
773
- margin-right: 5px;
774
- }
775
-
776
- .mapp-poi-visual, .mapp-poi-html {
777
- cursor: pointer;
778
  }
779
 
780
- .mapp-poi-visual.mapp-active, .mapp-poi-html.mapp-active {
781
- font-weight: bold;
782
- }
783
 
784
- .mapp-poi-main {
785
- display: flex;
786
- flex: 1;
787
- overflow-wrap: break-word;
788
- }
789
-
790
- .mapp-poi-main textarea {
 
 
 
791
  width: 100%;
 
792
  }
793
 
794
- /* TinyMCE by default sizes width 100% which obscures right edge */
795
- .mapp-poi-main .mce-tinymce {
796
- border: 1px solid lightgray;
797
- /* width: auto !important;*/
798
- }
799
-
800
- .mapp-poi-main .mce-tinymce, .mapp-poi-main .mce-stack-layout, .mapp-poi-main .mce-edit-area{
801
- display: flex;
802
- flex-direction: column;
803
- flex: 1;
804
- overflow: hidden;
805
- width: auto !important;
806
- }
807
-
808
- .mapp-poi-toolbar {
809
- align-items: center;
810
- display: flex;
811
- margin-top: 5px;
812
- }
813
-
814
- .mapp-poi-toolbar button {
815
- margin-right: 3px !important;
816
  }
817
 
818
  /*
819
  -----------------------------------------------------------------------------------
820
- Plugin settings screen
821
  -----------------------------------------------------------------------------------
822
  */
823
 
824
- .mapp-settings-screen #mapp0-layout {
825
- max-width: 600px;
826
- }
827
-
828
- .mapp-settings-screen label {
829
- margin-right: 10px;
830
- white-space: nowrap;
831
  }
832
 
833
- .mapp-settings-toolbar-top {
834
  align-items: baseline;
835
  background-color: #f0f0f0;
836
  border-bottom: 1px solid gray;
837
  display: flex;
 
838
  justify-content: space-between;
839
  top: 30px;
840
  padding: 0px 10px 10px 10px;
841
- position: sticky;
842
- z-index: 10000;
843
  }
844
 
845
- .mapp-settings-toolbar-top-header {
 
 
 
 
 
 
846
  display: flex;
847
  align-items: baseline;
848
  }
849
 
850
- .mapp-settings-toolbar-top-header h1 {
851
  margin-right: 10px;
852
  }
853
 
854
- .mapp-settings-toolbar-top-links a {
 
 
 
 
 
855
  margin: 0 5px;
856
  }
857
 
858
- .mapp-settings-toolbar {
859
  background-color: #f0f0f0;
860
  border-top: 1px solid gray;
861
  bottom: 0;
862
  padding: 10px;
863
  position: sticky;
 
864
  }
865
 
866
- /* Hidden submit buttons to use as form default */
867
- .mapp-settings-hidden-toolbar {
868
- height: 0;
869
- overflow: hidden;
870
- }
871
 
872
- /* Simulate postboxes */
873
- .mapp-settings-screen h2 {
874
  background-color: white;
875
- border-bottom: 1px solid #eee;
876
- font-size: 14px;
877
- margin-bottom: 0;
878
- padding: 8px 12px 8px 12px;
879
- }
880
-
881
- .mapp-settings-screen .form-table {
882
- margin-top: 0;
883
- }
884
-
885
- .mapp-settings-screen .form-table th {
886
- background-color: white;
887
- padding: 16px 12px 16px 12px;
888
- }
889
-
890
- .mapp-settings-screen .form-table td {
891
- background-color: white;
892
- padding: 16px 12px 16px 12px;
893
- }
894
-
895
- .mapp-settings-screen .button {
896
- vertical-align: middle;
897
- }
898
-
899
- /* MapPress tables */
900
- .mapp-settings-screen .form-table table {
901
- border: 1px solid #dfdfdf;
902
- border-collapse: collapse;
903
- height: auto;
904
- margin-top: 5px;
905
- width: auto;
906
- }
907
-
908
- .mapp-settings-screen .form-table table th {
909
- font-weight: bold;
910
- background-color: rgb(241, 241, 241);
911
- width: auto;
912
- height: auto;
913
  border-bottom: 1px solid lightgray;
914
- padding: 5px;
915
  }
916
 
917
- .mapp-settings-screen .form-table table td {
918
- width: auto;
919
- height: auto;
920
  border-bottom: 1px solid lightgray;
 
 
 
921
  margin: 0;
922
- vertical-align: middle;
923
- padding: 5px;
924
- }
925
-
926
- a.mapp-help {
927
- display: inline-block;
928
- margin-left: 2px;
929
- text-decoration: none;
930
- }
931
-
932
-
933
- /* Sort handles */
934
- .mapp-handle {
935
- cursor: move;
936
- }
937
-
938
- .mapp-yes {
939
- vertical-align: middle;
940
- color:green;
941
- }
942
-
943
- .mapp-no {
944
- vertical-align: middle;
945
- color:red;
946
  }
947
 
948
- a.mapp-check-account {
949
- margin-left: 10px;
950
- text-decoration: none;
951
  }
952
 
953
- /*
954
- -----------------------------------------------------------------------------------
955
- Multiselect
956
- -----------------------------------------------------------------------------------
957
- */
958
-
959
- .mapp-select {}
960
-
961
- .mapp-select-input {
962
- border: 1px solid lightgray;
963
- cursor: pointer;
964
  display: flex;
965
- line-height: normal;
966
- padding: 5px;
967
  }
968
 
969
- @media only screen and (max-width: 782px) {
970
- .mapp-select-input {
971
- min-height: 40px;
972
- width: 100%;
973
- }
 
 
974
  }
975
 
976
- .mapp-select-input .dashicons {
977
- font-size: 16px;
978
- height: 16px;
979
- width: 16px;
980
  }
981
 
982
- .mapp-select-dropdown-wrapper {
983
- position: relative;
984
  }
985
 
986
- .mapp-select-dropdown {
987
- background-color: white;
988
- border-radius: 4px;
989
- box-shadow: 0 5px 15px rgba(0,0,0,.2);
990
- cursor: pointer;
991
- display: flex;
992
- flex-direction: column;
993
- max-height: 150px;
994
- position: absolute;
995
- top: 0; left: 0; right: 0;
996
- z-index: 100000;
997
  }
998
 
999
- .mapp-select-dropdown-list {
1000
- flex: 1;
1001
- overflow: auto;
1002
- padding: 5px;
 
 
 
 
 
 
1003
  }
1004
 
1005
- .mapp-select-dropdown-item {
1006
- overflow: hidden;
1007
- padding: 5px;
1008
- text-overflow : ellipsis;
1009
- white-space: nowrap;
1010
  }
1011
 
1012
- .mapp-select-dropdown-item:hover {
1013
- background-color: #eee;
 
1014
  }
1015
 
1016
- .mapp-select .components-base-control, .mapp-select .components-base-control__field {
1017
- margin-bottom: 0 !important;
1018
  }
1019
 
1020
- /* WP checkboxcontrol has a bug: it doubles click events on any parent, so we can't use parent div, and it also doesn't make event object available; So, make checkbox full width instead */
1021
- .mapp-select-dropdown-item .components-base-control__field {
1022
- display: flex;
1023
  }
1024
 
1025
- .mapp-select-dropdown-item label {
1026
- flex: 1;
1027
  }
1028
 
1029
- .mapp-select-tokens {
1030
- display: flex;
1031
- flex: 1;
1032
- flex-wrap: wrap;
1033
  }
1034
 
1035
- .mapp-select-token {
1036
- background-color: #ddd;
1037
- margin: 2px;
1038
- overflow: hidden;
1039
- padding: 3px;
1040
- text-overflow: ellipsis;
1041
- white-space: nowrap;
1042
  }
1043
 
1044
- .mapp-select-token-delete {
1045
- padding: 2px;
 
1046
  }
1047
 
1048
- .mapp-select-token-delete:hover {
1049
- color: red;
1050
  }
1051
 
1052
- .mapp-select-values {
1053
- flex: 1;
1054
- overflow: hidden;
1055
- text-overflow: ellipsis;
1056
- white-space: nowrap;
1057
  }
1058
 
1059
- .mapp-select-filter {
1060
- padding: 5px;
1061
  }
1062
 
1063
  /*
1064
  -----------------------------------------------------------------------------------
1065
- Post attachment control + popup
1066
  -----------------------------------------------------------------------------------
1067
  */
1068
-
1069
- .mapp-attach-control {
1070
- max-width: 360px;
1071
- width: 90vw;
1072
  }
1073
 
1074
- .mapp-attach-items {
1075
- max-height: 200px;
1076
- overflow: auto;
1077
  }
1078
 
1079
- .mapp-attach-item {
1080
- display: flex;
1081
- flex-direction: row;
1082
- padding: 10px;
 
 
 
 
1083
  }
1084
 
1085
- .mapp-attach-item:hover {
1086
- background-color: #ddd;
 
 
 
 
 
1087
  }
1088
 
1089
- .mapp-attach-item-title {
1090
- flex: 1;
1091
  }
1092
 
1093
- .mapp-attach-item-type {
1094
- background-color: #f0f0f0;
1095
- padding: 3px 8px;
1096
  }
1097
 
1098
-
1099
  /*
1100
  -----------------------------------------------------------------------------------
1101
- Template Editor
1102
  -----------------------------------------------------------------------------------
1103
  */
1104
 
1105
- .mapp-tp-detail {
1106
- height: 600px;
1107
- width: 800px;
1108
- max-width: 90%;
1109
- max-height: 90%;
1110
- padding: 10px;
1111
- }
1112
-
1113
- .mapp-tp-detail .mapp-tp-name {
1114
- font-weight: bold;
1115
- margin: 5px 0 5px 0;
1116
- text-transform: uppercase;
1117
- }
1118
-
1119
- .mapp-tp-detail .mapp-tp-path {
1120
- font-size: 12px;
1121
- font-style: italic;
1122
- margin-bottom: 5px;
1123
- }
1124
 
1125
- .mapp-tp-detail code {
1126
- border: 1px solid gray;
1127
- margin-right: 10px;
 
 
1128
  }
1129
 
1130
- .mapp-tp-detail .mapp-tp-toolbar {
1131
- align-items: center;
1132
  border-top: 1px solid lightgray;
1133
- display: flex;
1134
- margin-top: 5px;
1135
- padding: 5px;
1136
  }
1137
 
1138
- .mapp-tp-detail .mapp-tp-toolbar input.button {
1139
- margin-right: 4px;
 
 
1140
  }
1141
 
1142
- .mapp-tp-detail .mapp-tab-standard .CodeMirror {
1143
- background: #f7f7f7;
1144
- height: auto;
1145
- position: absolute;
1146
- top: 100px; bottom: 50px; left: 5px; right: 5px;
1147
  }
1148
 
1149
- .mapp-tp-detail .mapp-tab-content .CodeMirror {
1150
- position: absolute;
1151
- top: 150px; bottom: 50px; left: 5px; right: 5px;
1152
- }
1153
 
1154
- .mapp-tp-detail .mapp-tp-toolbar {
1155
- position: absolute;
1156
- bottom: 5px; left: 5px; right: 5px;
1157
  }
1158
 
1159
  /*
1160
  -----------------------------------------------------------------------------------
1161
- Icon Editor
1162
  -----------------------------------------------------------------------------------
1163
  */
1164
 
1165
- .mapp-icon-editor {
1166
  cursor: default;
1167
  display: flex;
1168
  flex-direction: column;
@@ -1172,234 +1084,195 @@ a.mapp-check-account {
1172
  width: 70vh;;
1173
  }
1174
 
1175
- .mapp-icon-editor-wrapper {
1176
  border: 1px solid lightgray;
1177
  flex: 1;
1178
  overflow: auto;
1179
  }
1180
 
1181
- .mapp-icon-editor-toolbar {
1182
  padding-top: 20px;
1183
  }
1184
 
1185
- ul.mapp-icon-editor-list {
1186
  display: table;
1187
  margin: 0;
1188
  padding: 0;
1189
  width: 100%;
1190
  }
1191
 
1192
- .mapp-icon-editor-list li {
1193
  display: table-row;
1194
  }
1195
 
1196
- .mapp-icon-editor-list li:hover {
1197
  background-color: #fafafa;
1198
  }
1199
 
1200
- .mapp-icon-editor-list span {
1201
  border-bottom: 1px solid lightgray;
1202
  display: table-cell;
1203
  overflow: hidden;
1204
  padding: 5px 15px;
1205
  text-overflow: ellipsis;
 
1206
  }
1207
 
1208
- .mapp-icon-editor-list img {
1209
  margin-right: 10px;
1210
  }
1211
 
1212
- .mapp-icon-editor .dashicons {
1213
- color: #d0d0d0;
1214
- }
1215
-
1216
- .mapp-icon-editor .dashicons:hover {
1217
- color: black;
1218
- }
1219
-
1220
- .mapp-icon-editor .spinner {
1221
- float: none;
1222
- visibility: visible;
1223
- }
1224
-
1225
- .mapp-icon-editor-msg {
1226
- margin-top: 50px;
1227
- text-align: center;
1228
- }
1229
-
1230
-
1231
  /*
1232
  -----------------------------------------------------------------------------------
1233
- Tabs
1234
  -----------------------------------------------------------------------------------
1235
  */
1236
 
1237
- .mapp-tabs .mapp-tab-label {
1238
- background-color: white;
1239
- border-left: 1px solid lightgray;
1240
- border-right: 1px solid lightgray;
1241
- border-top: 1px solid lightgray;
1242
- cursor: pointer;
1243
- display: inline-block;
1244
- margin: 0;
1245
- padding: 10px;
1246
- position: relative;
1247
- top: 1px;
1248
- z-index: 1;
1249
  }
1250
- .mapp-tabs .mapp-tab-label.mapp-active {
1251
- border-bottom: 1px solid white;
1252
- font-weight: bold;
 
1253
  }
1254
 
1255
- .mapp-tabs .mapp-tab {
1256
- background-color: white;
1257
- border-top: 1px solid lightgray;
1258
- clear: both;
1259
- display: none;
1260
- padding: 10px;
1261
  }
1262
 
1263
- .mapp-tabs .mapp-tab.mapp-active {
1264
- display: block;
 
 
 
1265
  }
1266
 
1267
- /*
1268
- -----------------------------------------------------------------------------------
1269
- Popup
1270
- -----------------------------------------------------------------------------------
1271
- */
1272
 
1273
- /* Keep autocomplete above */
1274
- .pac-container {
1275
- z-index: 100002;
1276
  }
1277
 
1278
- .mapp-popup {
1279
- background-color: white;
1280
- border: 1px solid lightgray;
1281
- box-shadow: 5px 5px 10px #888;
1282
- box-sizing: content-box;
1283
- display: inline-block;
1284
- z-index: 100005; /* Keep above popup-max */
1285
  }
1286
 
1287
- /* Center modals */
1288
- .mapp-popup-modal {
1289
- position: fixed;
1290
- left: 50%;
1291
- top: 50%;
1292
- transform: translate(-50%, -50%);
1293
- z-index: 100002;
1294
- }
1295
-
1296
- .mapp-popup-max {
1297
- left: 5%;
1298
- right: 5%;
1299
- top: 5%;
1300
- bottom: 5%;
1301
- transform: none;
1302
- }
1303
-
1304
- @media only screen and (max-width: 600px) {
1305
- .mapp-popup-max {
1306
- left: 0;
1307
- right: 0;
1308
- top: 0;
1309
- bottom: 0;
1310
- }
1311
  }
1312
 
1313
- /* Prevent scrollbars on body when popup is open */
1314
- body.mapp-popup-noscroll {
1315
- overflow: hidden;
 
1316
  }
1317
 
1318
- .mapp-popup-backdrop {
1319
- background-color: black;
1320
- display: none;
1321
- opacity: 0.8;
1322
- position: fixed;
1323
- top: 0; right: 0; bottom: 0; left : 0;
1324
- user-select: none;
1325
- z-index: 100000; /* WP adminbar is 99999 */
1326
  }
1327
 
1328
- /*
1329
- -----------------------------------------------------------------------------------
1330
- Icon Picker
1331
- -----------------------------------------------------------------------------------
1332
- */
1333
 
1334
- .mapp-iconpicker {
1335
- padding: 5px;
1336
- width: 260px;
1337
  }
1338
 
1339
- img.mapp-iconpicker-toggle {
1340
- max-width: 24px !important;
1341
- max-height: 24px !important;
1342
  }
1343
 
1344
- .mapp-iconpicker-wrapper {
1345
- height: 210px;
1346
- overflow: auto;
1347
- padding: 5px;
1348
- user-select: none;
1349
  }
1350
 
1351
- .mapp-iconpicker-toolbar {
1352
- padding: 5px 5px 0 5px;
 
1353
  border-top: 1px solid lightgray;
1354
  }
1355
 
1356
- .mapp-iconpicker .mapp-icon, .mapp-iconpicker .mapp-icon-sprite {
1357
- border: 2px solid white;
1358
- user-select: none;
1359
- margin: 0;
1360
  }
1361
 
1362
- .mapp-iconpicker .mapp-icon:hover, .mapp-iconpicker .mapp-icon.mapp-selected, .mapp-iconpicker .mapp-icon-sprite:hover, .mapp-iconpicker .mapp-icon-sprite.mapp-selected {
1363
- border: 2px solid blue;
1364
  }
1365
 
1366
- .mapp-iconpicker .mapp-icon-sprite { display: inline-block; background: transparent url('../images/icons.png') no-repeat; width: 24px; height: 24px; }
1367
 
1368
  /*
1369
  -----------------------------------------------------------------------------------
1370
- Color Picker
1371
  -----------------------------------------------------------------------------------
1372
  */
1373
 
1374
- .mapp-colorpicker {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1375
  padding: 5px;
1376
- width: 260px;
1377
- max-height: 250px;
1378
  }
1379
 
1380
- span.mapp-colorpicker-toggle {
1381
- border: 1px solid lightgray;
 
 
 
 
 
 
 
 
1382
  cursor: pointer;
1383
- display: inline-block;
1384
- height: 20px;
1385
- margin: 1px;
1386
  vertical-align: middle;
1387
- width: 20px;
1388
  }
1389
 
1390
- .mapp-colorpicker span[data-mapp-color] {
1391
- border: 2px solid lightgray;
1392
- display: inline-block;
1393
- height: 15px;
1394
- line-height: 1;
1395
- margin: 1px;
1396
- width: 15px;
1397
  }
1398
 
1399
- .mapp-colorpicker .mapp-color:hover, .mapp-colorpicker .mapp-color.mapp-selected {
1400
- border: 2px solid black;
 
 
 
 
1401
  }
1402
 
 
 
1403
  /*
1404
  -----------------------------------------------------------------------------------
1405
  Misc
@@ -1437,6 +1310,5 @@ span.mapp-colorpicker-toggle {
1437
  }
1438
 
1439
  .mapp-review-options a:last-of-type {
1440
- color: #dc3232;
1441
  margin-left: 10px !important;
1442
- }
1
 
2
  /*
3
  -----------------------------------------------------------------------------------
4
+ Map block
5
  -----------------------------------------------------------------------------------
6
  */
7
  .mapp-gt .mapp-layout {
34
  Map library
35
  -----------------------------------------------------------------------------------
36
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ .mapp-library {
39
+ border: 1px solid gray;
40
+ display: flex;
41
+ height: calc(100vh - 125px);
42
+ margin-right: 20px;
43
+ margin-top: 20px;
44
  }
45
 
46
  /* Hide the wp_editor instance used to load the editor scripts */
48
  display: none;
49
  }
50
 
51
+ /*
52
+ -----------------------------------------------------------------------------------
53
+ Map MCE
54
+ -----------------------------------------------------------------------------------
55
+ */
56
+
57
+ .mapp-mce {
58
+ display: inline;
59
+ }
60
+
61
  /*
62
  -----------------------------------------------------------------------------------
63
  Picker / Editor Modal
64
  -----------------------------------------------------------------------------------
65
  */
66
 
67
+ .mapp-gt-modal {
68
+ max-height: none;
69
+ max-width: none;
70
+ height: 90vh;
71
+ width: 90vw;
72
+ }
73
+
74
+ /* Box sizing is set in GT but not in MCE, so force it here */
75
+ .mapp-gt-modal *, .mapp-gt-modal :before, .mapp-gt-modal :after {
76
+ box-sizing: border-box;
77
+ }
78
 
79
+ .mapp-gt-modal .components-modal__header {
80
  margin: 0;
81
  padding: 10px 20px;
82
  }
83
 
84
+ .mapp-gt-modal .components-modal__content {
85
  background-color: white;
86
  font-size: 13px;
87
  padding: 0;
88
  }
89
 
90
  /* Override WP settings */
91
+ .mapp-gt-modal a {
92
  text-decoration: none;
93
  }
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  @media screen and (max-width: 600px) {
96
+ .mapp-gt-modal {
97
  height: 100vh;
98
  max-height: none;
99
  max-width: none;
105
  },
106
  }
107
 
108
+ .mapp-gt-modal .components-modal__content {
109
  display: flex;
110
  flex-direction: column;
111
  }
112
 
113
+ /* Custom titles */
114
+ .mapp-gt-modal .components-modal__header { display: none; }
115
+
116
+ .mapp-gt-modal-header {
117
+ border-bottom: 1px solid lightgray;
118
+ display: flex;
119
+ height: 60px;
120
+ justify-content: space-between;
121
+ padding: 10px 20px;
122
+ }
123
+
124
+ .mapp-gt-modal-header h1 {
125
+ font-size: 16px;
126
+ }
127
+
128
+ .mapp-gt-modal-header button {
129
+ margin-left: 20px;
130
+ }
131
+
132
+ .mapp-gt-modal-header-title {
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+
137
+
138
  /*
139
  -----------------------------------------------------------------------------------
140
+ Map picker
141
  -----------------------------------------------------------------------------------
142
  */
143
 
144
+ /* Fill container when displayed in library */
145
+ .mapp-library .mapp-pick {
146
+ display: flex;
147
+ flex: 1;
148
+ position: relative;
149
+ }
150
+
151
+ /* Toggling */
152
+ .mapp-list-panel, .mapp-edit-panel {
153
+ background-color: white;
154
+ display: flex;
155
+ flex-direction: column;
156
+ flex: 1;
157
+ overflow: hidden;
158
+ }
159
+
160
+ .mapp-edit-panel .components-spinner {
161
+ position: relative;
162
+ top: 50%; left: 50%;
163
+ transform: translateX(-50%) translateY(-50%);
164
+ }
165
+
166
+ /* In modal (not in library) hide list when editing */
167
+ .mapp-gt-modal.mapp-mode-edit .mapp-list-panel {
168
+ flex: 0;
169
+ height: 0px;
170
+ }
171
+
172
  .mapp-pick-filter {
173
  border-bottom: 1px solid lightgray;
174
  padding: 10px 20px;
221
  top: 45%;
222
  }
223
 
224
+ .mapp-pick-items {
225
+ display: flex;
226
+ flex: 1;
227
+ flex-direction: column;
228
+ overflow: auto;
229
+ }
230
+
231
  /* If header is placed outside scroll area, headings are offset by scrollbar width */
232
+ .mapp-pick-items-header {
233
+ align-items: center;
234
  background-color: white;
235
  border-bottom: 1px solid lightgray;
236
  display: flex;
240
  z-index: 1;
241
  }
242
 
243
+ .mapp-pick-items-header a {
244
+ box-shadow: none;
245
+ text-decoration: none;
246
  }
247
 
248
  .mapp-pick-item {
249
+ align-items: stretch; /* Make map title fill its whole column so it's easier to click */
250
  border-bottom: 1px solid lightgray;
 
251
  display: flex;
252
+ padding: 10px 20px;
 
253
  text-overflow: ellipsis;
254
  }
255
 
256
+ .mapp-pick-item a {
257
+ box-shadow: none;
258
+ text-decoration: none;
259
+ }
260
+
261
+
262
  .mapp-pick-item.mapp-selected {
263
  background-color: #f6f6f6;
 
264
  }
265
 
266
  .mapp-pick-item:hover {
267
  background-color: #f6f6f6;
268
  }
269
 
270
+ .mapp-pick-col-map_title, .mapp-pick-col-post_title, .mapp-pick-col-mapid {
271
+ cursor: pointer;
272
  overflow: hidden;
273
  text-overflow: ellipsis;
274
  white-space: nowrap;
275
  }
276
 
277
+ .mapp-pick-col-map_title {
278
+ cursor: pointer;
279
+ flex: 1;
280
  }
281
 
282
+ .mapp-pick-col-map_title {
 
283
  }
284
 
285
+ .mapp-pick-col-post_title {
286
+ width: 25%;
 
287
  }
288
 
289
  .mapp-pick-col-mapid {
291
  width: 15%;
292
  }
293
 
294
+ .mapp-pick-actions {
295
+ margin-top: 5px;
 
 
 
296
  }
297
 
298
+ .mapp-pick-actions a:not(:last-child):after {
299
+ color: gray;
300
+ content: "|";
301
+ margin-left: 5px;
302
+ margin-right: 5px;
303
  }
304
 
305
+ .mapp-pick-toolbar {
306
+ border-top: 1px solid lightgray;
307
+ padding: 5px 20px;
308
+ white-space: nowrap;
309
  }
310
 
311
+ .mapp-pick-toolbar button {
312
+ margin-right: 10px;
313
  }
314
 
315
 
321
 
322
  .mapp-edit {
323
  display: flex;
324
+ flex: 1;
325
  flex-direction: column;
326
+ overflow: hidden;
327
+ }
328
+
329
+ .mapp-edit-title input {
330
+ cursor: pointer;
331
+ font-size: 16px !important;
332
+ font-weight: 600;
333
+ margin-left: -10px;
334
+ }
335
+
336
+ .mapp-edit-title input:not(:hover) {
337
+ border: 1px solid white !important;
338
+ }
339
+
340
+ .mapp-edit-main {
341
+ display: flex;
342
  flex: 1;
343
  overflow: hidden;
344
  }
345
 
346
+
347
+ /* It's not possible to re-use all of the frontend CSS because it depends on classes at .mapp-layout level */
348
+ .mapp-edit-list {
349
+ background-color: white;
350
+ border-right: 1px solid lightgray;
351
+ display: flex;
352
+ flex-direction: column;
353
+ position: relative; /* Needed to scroll list for selection */
354
+ transition-property : all;
355
+ transition-duration: .1s;
356
+ width: 0;
357
+ }
358
+
359
+ .mapp-edit-list.mapp-list-open {
360
+ width: 250px;
361
+ }
362
+
363
+ .mapp-edit-list .mapp-item.mapp-edit-dragover {
364
+ border-top: 1px solid black;
365
+ }
366
+
367
+ .mapp-edit-map {
368
+ display: flex;
369
+ flex-direction: column;
370
  flex: 1;
371
+ overflow: hidden;
372
  }
373
 
374
  .mapp-edit .mapp-layout {
384
  padding-bottom: 0px;
385
  }
386
 
 
 
 
 
 
 
 
 
 
 
387
  .mapp-edit-toolbar {
388
  border-top: 1px solid lightgray;
389
  padding: 5px 20px;
431
  align-items: baseline;
432
  }
433
 
434
+ /* WP adds 8px left margin on select controls */
435
+ .mapp-gt-inspector .components-input-control__container {
436
+ margin-left: 0px !important;
437
+ }
438
+
439
  /* WP sets different (8px) margin-bottom only on last child in panel row */
440
  .block-editor-block-inspector .mapp-gt-inspector .components-base-control:last-child {
441
  margin-bottom: 24px;
471
  white-space: nowrap;
472
  }
473
 
474
+ /* GT tries to set flex on selects, and custom arrow obscures values */
475
+ .mapp-settings-dims-select, .mapp-settings-type {
476
+ display: block !important;
477
+ min-width: 7em;
478
  }
479
 
480
  .mapp-settings-dims-custom input {
485
  margin-bottom: 0;
486
  }
487
 
488
+ .mapp-settings-viewport {
489
+ margin-top: 5px;
490
  }
491
 
492
+ .mapp-settings-viewport .components-button-group {
493
+ display: block;
494
+ margin-top: 8px;
 
 
495
  }
496
 
497
  .mapp-settings-viewport-status {
499
  margin-left: 10px;
500
  }
501
 
502
+ /* Settings shown in poi list */
503
+ .mapp-list-settings {
504
+ border-bottom: 1px solid lightgray;
505
+ }
506
+
507
+
508
  /*
509
  -----------------------------------------------------------------------------------
510
  Mashup query builder
565
  flex: 1;
566
  }
567
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
 
569
  /*
570
  -----------------------------------------------------------------------------------
571
+ POI editor
572
  -----------------------------------------------------------------------------------
573
  */
574
 
575
+ /* Go for a large dialog, IB will restrict as needed */
576
+ .mapp-ib-wrapper.mapp-ib-edit .mapp-ib-content {
577
+ width: 600px;
578
+ height: 400px;
579
+ }
580
+ .mapp-ib-wrapper.mapp-ib-edit .mapp-ib {
581
+ height: 100%;
582
+ }
583
+
584
+ .mapp-iw-edit {
585
  display: flex;
586
+ flex: 1;
587
  flex-direction: column;
588
+ overflow: auto;
589
+ padding: 10px;
590
  }
591
 
592
+ .mapp-poi-header {
593
+ display: flex;
594
+ align-items: center;
595
  }
596
 
597
+ .mapp-poi-header .mapp-poi-title {
598
+ flex: 1;
599
+ font-weight: bold;
600
+ min-width: 0;
601
  }
602
 
603
+ /* Set fixed icon size, otherwise Leaflet will incorrectly position the popup */
604
+ .mapp-poi-header img.mapp-icon {
605
+ width: 24px;
606
+ height: 24px;
607
  }
608
 
609
+ .mapp-poi-url {
610
+ width: 100%;
611
+ }
612
 
613
+ .mapp-poi-editor-toolbar {
614
  align-items: center;
 
615
  display: flex;
616
  justify-content: space-between;
617
+ padding: 3px 0;
 
 
 
 
 
 
 
 
 
618
  }
619
 
620
+ .mapp-poi-toolbar button {
621
+ margin-right: 5px;
 
622
  }
623
 
624
+ .mapp-poi-visual, .mapp-poi-html {
625
+ cursor: pointer;
626
  }
627
 
628
+ .mapp-poi-visual.mapp-active, .mapp-poi-html.mapp-active {
629
+ font-weight: bold;
 
630
  }
631
 
632
+ .mapp-poi-main {
633
  display: flex;
 
634
  flex: 1;
635
+ overflow-wrap: break-word;
636
  }
637
 
638
+ .mapp-poi-main textarea {
639
+ width: 100%;
 
 
640
  }
641
 
642
+ /* TinyMCE by default sizes width 100% which obscures right edge */
643
+ .mapp-poi-main .mce-tinymce {
644
+ border: 1px solid lightgray;
645
+ /* width: auto !important;*/
 
646
  }
647
 
648
+ .mapp-poi-main .mce-tinymce, .mapp-poi-main .mce-stack-layout, .mapp-poi-main .mce-edit-area{
649
  display: flex;
650
+ flex-direction: column;
651
+ flex: 1;
652
+ overflow: hidden;
653
+ width: auto !important;
 
654
  }
655
 
656
+ .mapp-poi-toolbar {
657
  align-items: center;
658
  display: flex;
659
+ margin-top: 5px;
660
  }
661
 
662
+ .mapp-poi-toolbar button {
663
+ margin-right: 3px !important;
664
  }
665
 
 
 
 
666
 
667
+ /*
668
+ -----------------------------------------------------------------------------------
669
+ GT Multiselect
670
+ -----------------------------------------------------------------------------------
671
+ */
 
 
 
 
672
 
673
+ .mapp-select {}
674
+
675
+ .mapp-select-input {
676
+ border: 1px solid lightgray;
677
  cursor: pointer;
678
  display: flex;
679
+ line-height: normal;
680
+ padding: 5px;
 
 
 
 
 
681
  }
682
 
683
+ @media only screen and (max-width: 782px) {
684
+ .mapp-select-input {
685
+ min-height: 40px;
686
+ width: 100%;
687
+ }
688
  }
689
 
690
+ .mapp-select-input .dashicons {
691
+ font-size: 16px;
692
+ height: 16px;
693
+ width: 16px;
 
694
  }
695
 
696
+ .mapp-select-dropdown-wrapper {
697
+ position: relative;
 
 
 
698
  }
699
 
700
+ .mapp-select-dropdown {
701
+ background-color: white;
702
+ border-radius: 4px;
703
+ box-shadow: 0 5px 15px rgba(0,0,0,.2);
704
+ cursor: pointer;
705
+ display: flex;
706
+ flex-direction: column;
707
+ max-height: 150px;
708
+ position: absolute;
709
+ top: 0; left: 0; right: 0;
710
+ z-index: 100000;
711
  }
712
 
713
+ .mapp-select-dropdown-list {
714
+ flex: 1;
715
+ overflow: auto;
716
+ padding: 5px;
717
  }
718
 
719
+ .mapp-select-dropdown-item {
720
+ overflow: hidden;
721
+ padding: 5px;
722
+ text-overflow : ellipsis;
723
  white-space: nowrap;
 
724
  }
725
 
726
+ .mapp-select-dropdown-item:hover {
727
+ background-color: #eee;
728
  }
729
 
730
+ .mapp-select .components-base-control, .mapp-select .components-base-control__field {
731
+ margin-bottom: 0 !important;
 
732
  }
733
 
734
+ /* WP checkboxcontrol has a bug: it doubles click events on any parent, so we can't use parent div, and it also doesn't make event object available; So, make checkbox full width instead */
735
+ .mapp-select-dropdown-item .components-base-control__field {
736
+ display: flex;
 
 
 
 
 
737
  }
738
 
739
+ .mapp-select-dropdown-item label {
 
740
  flex: 1;
 
741
  }
742
 
743
+ .mapp-select-tokens {
 
 
744
  display: flex;
745
+ flex: 1;
746
  flex-wrap: wrap;
 
 
 
 
 
 
 
747
  }
748
 
749
+ .mapp-select-token {
750
+ background-color: #ddd;
751
+ margin: 2px;
752
+ overflow: hidden;
753
+ padding: 3px;
754
+ text-overflow: ellipsis;
755
  white-space: nowrap;
756
  }
757
 
758
+ .mapp-select-token-delete {
759
+ padding: 2px;
 
 
 
 
760
  }
761
 
762
+ .mapp-select-token-delete:hover {
763
+ color: red;
 
 
 
764
  }
765
 
766
+ .mapp-select-values {
767
  flex: 1;
768
+ overflow: hidden;
769
+ text-overflow: ellipsis;
770
+ white-space: nowrap;
771
  }
772
 
773
+ .mapp-select-filter {
774
+ padding: 5px;
775
  }
776
 
777
  /*
778
  -----------------------------------------------------------------------------------
779
+ GT Post attachment control + popup
780
  -----------------------------------------------------------------------------------
781
  */
782
 
783
+ .mapp-attach-control {
784
+ max-width: 360px;
785
+ width: 90vw;
 
786
  }
787
 
788
+ .mapp-attach-items {
789
+ max-height: 200px;
790
+ overflow: auto;
791
  }
792
 
793
+ .mapp-attach-item {
794
  display: flex;
795
+ flex-direction: row;
 
 
796
  padding: 10px;
797
  }
798
 
799
+ .mapp-attach-item:hover {
800
+ background-color: #ddd;
 
801
  }
802
 
803
+ .mapp-attach-item-title {
804
  flex: 1;
 
 
805
  }
806
 
807
+ .mapp-attach-item-type {
808
+ background-color: #f0f0f0;
809
+ padding: 3px 8px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  }
811
 
 
 
 
812
 
813
+ /*
814
+ -----------------------------------------------------------------------------------
815
+ Iframe
816
+ -----------------------------------------------------------------------------------
817
+ */
818
+ .mapp-iframe {
819
+ background: none transparent;
820
+ height: 100%;
821
+ position: fixed;
822
+ top: 0; right: 0; bottom: 0; left: 0;
823
  width: 100%;
824
+ z-index: 100000;
825
  }
826
 
827
+ .mapp-iframe-html body {
828
+ background: none transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
 
831
  /*
832
  -----------------------------------------------------------------------------------
833
+ GT options page
834
  -----------------------------------------------------------------------------------
835
  */
836
 
837
+ .mapp-options {
838
+ font-size: 14px;
 
 
 
 
 
839
  }
840
 
841
+ .mapp-options-header {
842
  align-items: baseline;
843
  background-color: #f0f0f0;
844
  border-bottom: 1px solid gray;
845
  display: flex;
846
+ flex-wrap: wrap;
847
  justify-content: space-between;
848
  top: 30px;
849
  padding: 0px 10px 10px 10px;
 
 
850
  }
851
 
852
+
853
+ .mapp-options .mapp-layout {
854
+ margin: 0;
855
+ max-width: 600px;
856
+ }
857
+
858
+ .mapp-options-header-version {
859
  display: flex;
860
  align-items: baseline;
861
  }
862
 
863
+ .mapp-options-header-version h1 {
864
  margin-right: 10px;
865
  }
866
 
867
+ .mapp-options-header-links {
868
+ align-items: baseline;
869
+ display: flex;
870
+ }
871
+
872
+ .mapp-options-header-links a {
873
  margin: 0 5px;
874
  }
875
 
876
+ .mapp-options-toolbar {
877
  background-color: #f0f0f0;
878
  border-top: 1px solid gray;
879
  bottom: 0;
880
  padding: 10px;
881
  position: sticky;
882
+ z-index: 1000;
883
  }
884
 
 
 
 
 
 
885
 
886
+ .mapp-option-section {
 
887
  background-color: white;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
888
  border-bottom: 1px solid lightgray;
889
+ margin-top: 20px;
890
  }
891
 
892
+ .mapp-option-section h2 {
 
 
893
  border-bottom: 1px solid lightgray;
894
+ color: #23282D;
895
+ font-size: 14px;
896
+ font-weight: 600;
897
  margin: 0;
898
+ margin-bottom: 10px;
899
+ padding: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
900
  }
901
 
902
+ .mapp-option-section.mapp-demo-section h2 {
903
+ margin-bottom: 0;
 
904
  }
905
 
906
+ .mapp-option {
 
 
 
 
 
 
 
 
 
 
907
  display: flex;
908
+ padding: 16px 10px;
 
909
  }
910
 
911
+ .mapp-option-title {
912
+ display: inline-block;
913
+ color: #23282D;
914
+ font-size: 14px;
915
+ font-weight: 600;
916
+ vertical-align: middle;
917
+ width: 200px;
918
  }
919
 
920
+ .mapp-option-value {
921
+ display: inline-block;
922
+ vertical-align: middle;
 
923
  }
924
 
925
+ .mapp-option-label {
926
+ margin-left: 10px;
927
  }
928
 
929
+ .mapp-option-value select {
930
+ vertical-align: baseline;
 
 
 
 
 
 
 
 
 
931
  }
932
 
933
+ @media only screen and (max-width: 780px) {
934
+ .mapp-option {
935
+ display: block;
936
+ }
937
+
938
+ .mapp-option-title {
939
+ padding-bottom: 20px;
940
+ display: block;
941
+ }
942
+
943
  }
944
 
945
+ .mapp-options label {
946
+ margin-right: 20px;
 
 
 
947
  }
948
 
949
+ .mapp-options .mapp-help-text {
950
+ font-style: italic;
951
+ padding-top: 10px;
952
  }
953
 
954
+ .mapp-options a.mapp-help-link {
955
+ text-decoration: none;
956
  }
957
 
958
+ .mapp-options .mapp-license-status {
959
+ margin-left: 10px;
 
960
  }
961
 
962
+ button.mapp-options-save {
963
+ margin-right: 10px;
964
  }
965
 
966
+ .mapp-options .dashicons-editor-help {
967
+ margin-left: 5px;
 
 
968
  }
969
 
970
+ .mapp-options .dashicons-yes {
971
+ vertical-align: middle;
972
+ color:green;
 
 
 
 
973
  }
974
 
975
+ .mapp-options .dashicons-no {
976
+ vertical-align: middle;
977
+ color:red;
978
  }
979
 
980
+ .mapp-options-check-license {
981
+ margin-left: 10px;
982
  }
983
 
984
+ /* Override WP stuff */
985
+ .mapp-options a {
986
+ text-decoration: none;
 
 
987
  }
988
 
989
+ .mapp-options a:focus {
990
+ box-shadow: none;
991
  }
992
 
993
  /*
994
  -----------------------------------------------------------------------------------
995
+ GT Color picker
996
  -----------------------------------------------------------------------------------
997
  */
998
+ .mapp-colors-modal {
999
+ min-width: 0;
1000
+ overflow: hidden;
 
1001
  }
1002
 
1003
+ .mapp-colors {
1004
+ overflow: hiden;
1005
+ width: 270px;
1006
  }
1007
 
1008
+ .mapp-colors-toggle {
1009
+ border: 1px solid lightgray;
1010
+ cursor: pointer;
1011
+ display: inline-block;
1012
+ height: 20px;
1013
+ margin: 1px;
1014
+ vertical-align: middle;
1015
+ width: 20px;
1016
  }
1017
 
1018
+ .mapp-color {
1019
+ border: 2px solid lightgray;
1020
+ display: inline-block;
1021
+ height: 25px;
1022
+ line-height: 1;
1023
+ margin: 1px;
1024
+ width: 25px;
1025
  }
1026
 
1027
+ .mapp-color:hover, .mapp-color.mapp-selected {
1028
+ border: 2px solid black;
1029
  }
1030
 
1031
+ .mapp-colors .mapp-option-label {
1032
+ margin-right: 10px;
 
1033
  }
1034
 
 
1035
  /*
1036
  -----------------------------------------------------------------------------------
1037
+ GT Icon picker
1038
  -----------------------------------------------------------------------------------
1039
  */
1040
 
1041
+ .mapp-icons {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1042
 
1043
+ .mapp-icons-list {
1044
+ flex: 1;
1045
+ max-height: 250px;
1046
+ overflow: auto;
1047
+ user-select: none;
1048
  }
1049
 
1050
+ .mapp-icons-toolbar {
1051
+ padding-top: 10px;
1052
  border-top: 1px solid lightgray;
 
 
 
1053
  }
1054
 
1055
+ .mapp-icons .mapp-icon, .mapp-icons .mapp-icon-sprite {
1056
+ border: 2px solid white;
1057
+ margin: 4px;
1058
+ user-select: none;
1059
  }
1060
 
1061
+ .mapp-icons .mapp-icon:hover, .mapp-icons .mapp-icon.mapp-selected, .mapp-icons .mapp-icon-sprite:hover, .mapp-icons .mapp-icon-sprite.mapp-selected {
1062
+ border: 2px solid blue;
 
 
 
1063
  }
1064
 
1065
+ .mapp-icons .mapp-icon-sprite { display: inline-block; background: transparent url('../images/icons.png') no-repeat; width: 24px; height: 24px; }
 
 
 
1066
 
1067
+ .mapp-icons .mapp-icon, .mapp-icons .mapp-icon-sprite {
1068
+ box-sizing: content-box;
 
1069
  }
1070
 
1071
  /*
1072
  -----------------------------------------------------------------------------------
1073
+ GT Icon Editor
1074
  -----------------------------------------------------------------------------------
1075
  */
1076
 
1077
+ .mapp-icons-editor {
1078
  cursor: default;
1079
  display: flex;
1080
  flex-direction: column;
1084
  width: 70vh;;
1085
  }
1086
 
1087
+ .mapp-icons-editor-wrapper {
1088
  border: 1px solid lightgray;
1089
  flex: 1;
1090
  overflow: auto;
1091
  }
1092
 
1093
+ .mapp-icons-editor-toolbar {
1094
  padding-top: 20px;
1095
  }
1096
 
1097
+ ul.mapp-icons-editor-list {
1098
  display: table;
1099
  margin: 0;
1100
  padding: 0;
1101
  width: 100%;
1102
  }
1103
 
1104
+ .mapp-icons-editor-list li {
1105
  display: table-row;
1106
  }
1107
 
1108
+ .mapp-icons-editor-list li:hover {
1109
  background-color: #fafafa;
1110
  }
1111
 
1112
+ .mapp-icons-editor-list li > div {
1113
  border-bottom: 1px solid lightgray;
1114
  display: table-cell;
1115
  overflow: hidden;
1116
  padding: 5px 15px;
1117
  text-overflow: ellipsis;
1118
+ vertical-align: middle
1119
  }
1120
 
1121
+ .mapp-icons-editor-list img {
1122
  margin-right: 10px;
1123
  }
1124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1125
  /*
1126
  -----------------------------------------------------------------------------------
1127
+ GT Template Editor
1128
  -----------------------------------------------------------------------------------
1129
  */
1130
 
1131
+ .mapp-templates-modal {
1132
+ height: 600px;
1133
+ width: 800px;
1134
+ max-width: 90vw;
1135
+ max-height: 90vh;
 
 
 
 
 
 
 
1136
  }
1137
+
1138
+ .mapp-templates-modal .components-modal__content {
1139
+ display: flex;
1140
+ flex-direction: column;
1141
  }
1142
 
1143
+ .mapp-templates-modal-content {
1144
+ display: flex;
1145
+ flex-direction: column;
 
 
 
1146
  }
1147
 
1148
+ a.mapp-templates-item {
1149
+ border: 1px solid lightgray;
1150
+ padding: 10px;
1151
+ margin: 0 2px;
1152
+ text-decoration: none;
1153
  }
1154
 
1155
+ .mapp-templates-name {
1156
+ text-transform: uppercase;
1157
+ }
 
 
1158
 
1159
+ .mapp-templates-path {
1160
+ font-style: italic;
1161
+ margin-top: 10px;
1162
  }
1163
 
1164
+ .mapp-templates-tabs {
1165
+ display: flex;
1166
+ flex: 1;
1167
+ flex-direction: column;
 
 
 
1168
  }
1169
 
1170
+ .mapp-templates-tabs .components-tab-panel__tab-content {
1171
+ display: flex;
1172
+ flex: 1;
1173
+ flex-direction: column;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1174
  }
1175
 
1176
+ .mapp-templates-tokens {
1177
+ border-bottom: 1px solid lightgray;
1178
+ margin-bottom: 10px;
1179
+ padding: 10px 0;
1180
  }
1181
 
1182
+ .mapp-templates-tokens code {
1183
+ border: 1px solid gray;
1184
+ cursor: pointer;
1185
+ margin-right: 10px;
 
 
 
 
1186
  }
1187
 
1188
+ /* Editor and standard (Default) tab contents, shown using CodeMirror */
1189
+ .mapp-templates-editor {
1190
+ flex: 1;
1191
+ }
 
1192
 
1193
+ .mapp-templates-editor .CodeMirror {
1194
+ height: 100% !important;
 
1195
  }
1196
 
1197
+ .mapp-templates-standard {
1198
+ flex: 1;
 
1199
  }
1200
 
1201
+ .mapp-templates-standard .CodeMirror {
1202
+ background-color: #f5f5f5;
1203
+ height: 100% !important;
 
 
1204
  }
1205
 
1206
+
1207
+ .mapp-templates-toolbar {
1208
+ padding-top: 10px;
1209
  border-top: 1px solid lightgray;
1210
  }
1211
 
1212
+ .mapp-templates-toolbar button {
1213
+ margin-right: 5px;
 
 
1214
  }
1215
 
1216
+ .mapp-templates-toolbar a {
1217
+ cursor: pointer;
1218
  }
1219
 
 
1220
 
1221
  /*
1222
  -----------------------------------------------------------------------------------
1223
+ GT Grid
1224
  -----------------------------------------------------------------------------------
1225
  */
1226
 
1227
+ .mapp-grid-table {
1228
+ background-color: white;
1229
+ border: 1px solid lightgray;
1230
+ display: table;
1231
+ margin-bottom: 5px;
1232
+ }
1233
+
1234
+ .mapp-grid-header {
1235
+ display: table-header-group;
1236
+ }
1237
+
1238
+ .mapp-grid-header .mapp-grid-cell {
1239
+ background-color: #f1f1f1;
1240
+ border-bottom: 1px solid lightgray;
1241
+ font-weight: 600;
1242
  padding: 5px;
 
 
1243
  }
1244
 
1245
+ .mapp-grid-body {
1246
+ display: table-row-group;
1247
+ }
1248
+
1249
+ .mapp-grid-row {
1250
+ display: table-row;
1251
+ }
1252
+
1253
+ .mapp-grid-cell {
1254
+ border-bottom: 1px solid lightgray;
1255
  cursor: pointer;
1256
+ display: table-cell;
1257
+ padding: 5px;
1258
+ text-align: center;
1259
  vertical-align: middle;
 
1260
  }
1261
 
1262
+ .mapp-grid-cell .components-base-control__field {
1263
+ margin: 0;
 
 
 
 
 
1264
  }
1265
 
1266
+ .mapp-grid-row.mapp-dragover .mapp-grid-cell {
1267
+ border-top: 1px solid black;
1268
+ }
1269
+
1270
+ .mapp-grid-cell label {
1271
+ margin: 0;
1272
  }
1273
 
1274
+ .mapp-grid-toolbar {}
1275
+
1276
  /*
1277
  -----------------------------------------------------------------------------------
1278
  Misc
1310
  }
1311
 
1312
  .mapp-review-options a:last-of-type {
 
1313
  margin-left: 10px !important;
1314
+ }
images/get-directions.png ADDED
Binary file
images/spinner-2x.gif ADDED
Binary file
images/spinner.gif ADDED
Binary file
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2020 Chris Richardson
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.58\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: 2020-12-19T03:53:19+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -33,492 +33,269 @@ msgstr ""
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
- #: mappress.php:171
37
- #: mappress.php:690
38
  msgid "Settings"
39
  msgstr ""
40
 
41
- #: mappress.php:172
42
  msgid "Map Library"
43
  msgstr ""
44
 
45
- #: mappress.php:183
46
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
47
  msgstr ""
48
 
49
- #: mappress.php:188
50
  msgid "A Google Maps API key is required"
51
  msgstr ""
52
 
53
- #: mappress.php:188
54
  msgid "Please update your"
55
  msgstr ""
56
 
57
- #: mappress.php:188
58
  msgid "MapPress Settings"
59
  msgstr ""
60
 
61
- #: mappress.php:280
62
- msgid "OK, you deserve it!"
63
- msgstr ""
64
-
65
- #: mappress.php:281
66
- msgid "Nope, maybe later"
67
- msgstr ""
68
-
69
- #: mappress.php:282
70
- msgid "I neeed some help"
71
- msgstr ""
72
-
73
- #: mappress.php:284
74
- msgid "Please Help Spread the Word"
75
- msgstr ""
76
-
77
- #: mappress.php:285
78
- msgid "If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!"
79
  msgstr ""
80
 
81
- #: mappress.php:286
82
- msgid "If you have any issues or suggestions, please let me know. I'll be happy to help!"
83
  msgstr ""
84
 
85
- #: mappress.php:462
86
  msgid "Please enter your MapPress license key to enable plugin updates"
87
  msgstr ""
88
 
89
- #: mappress.php:466
90
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
91
  msgstr ""
92
 
93
- #: mappress.php:470
94
- msgid "MapPress has many new features! Please take a moment to learn %s."
95
- msgstr ""
96
-
97
- #: mappress.php:470
98
- msgid "what's new"
99
  msgstr ""
100
 
101
- #: mappress.php:476
102
- msgid "The MapPress map editor has moved!"
 
103
  msgstr ""
104
 
105
- #: mappress.php:477
106
- msgid "Use this button to open the new popup editor where you can easily create, edit and insert maps."
107
  msgstr ""
108
 
109
- #: mappress.php:523
110
  msgid "Are you sure you want to delete?"
111
  msgstr ""
112
 
113
- #: mappress.php:524
114
  msgid "Permanently delete this map from the map library?"
115
  msgstr ""
116
 
117
- #: mappress.php:525
118
  msgid "Error reading KML file"
119
  msgstr ""
120
 
121
- #: mappress.php:526
122
  msgid "URL for KML file"
123
  msgstr ""
124
 
125
- #: mappress.php:527
126
  msgid "Loading"
127
  msgstr ""
128
 
129
- #: mappress.php:528
130
- msgid "Please select a classic editor block to insert into."
131
  msgstr ""
132
 
133
- #: mappress.php:529
134
  msgid "Unable to get your location"
135
  msgstr ""
136
 
137
- #: mappress.php:530
138
  msgid "No results"
139
  msgstr ""
140
 
141
- #: mappress.php:531
142
  msgid "Save changes?"
143
  msgstr ""
144
 
145
- #: mappress.php:532
146
  msgid "Shape"
147
  msgstr ""
148
 
149
- #: mappress.php:561
150
  msgid "Improve this map"
151
  msgstr ""
152
 
153
- #: mappress.php:577
154
- #: mappress.php:596
155
  msgid "Streets"
156
  msgstr ""
157
 
158
- #: mappress.php:578
159
  msgid "Outdoors"
160
  msgstr ""
161
 
162
- #: mappress.php:579
163
  msgid "Light"
164
  msgstr ""
165
 
166
- #: mappress.php:580
167
  msgid "Dark"
168
  msgstr ""
169
 
170
- #: mappress.php:581
171
  msgid "Satellite"
172
  msgstr ""
173
 
174
- #: mappress.php:582
175
  msgid "Satellite Streets"
176
  msgstr ""
177
 
178
- #: mappress.php:691
179
- #: mappress_settings.php:335
180
  msgid "What's new"
181
  msgstr ""
182
 
183
- #: mappress.php:922
184
  msgid "Version"
185
  msgstr ""
186
 
187
- #: mappress_controls.php:93
188
- #: templates_admin/widgets.php:42
189
- msgid "Add"
190
- msgstr ""
191
-
192
- #: mappress_controls.php:102
193
- #: templates_admin/editor.php:47
194
- #: templates_admin/mce.php:98
195
- #: templates_admin/widgets.php:94
196
- msgid "Delete"
197
- msgstr ""
198
-
199
  #: mappress_map.php:86
200
- #: mappress_settings.php:330
201
  msgid "MapPress"
202
  msgstr ""
203
 
204
- #: mappress_map.php:95
205
- #: templates_admin/mce.php:29
206
- #: templates_admin/mce.php:78
207
- #: templates_admin/mce.php:84
208
  msgid "Untitled"
209
  msgstr ""
210
 
211
- #: mappress_map.php:96
212
  msgid "Copy of %s"
213
  msgstr ""
214
 
215
- #: mappress_map.php:200
216
  msgid "Map not found"
217
  msgstr ""
218
 
219
- #: mappress_settings.php:87
220
- msgid "Sample Map"
221
- msgstr ""
222
-
223
- #: mappress_settings.php:89
224
- msgid "Basic Settings"
225
- msgstr ""
226
-
227
- #: mappress_settings.php:90
228
- msgid "Mapping API"
229
- msgstr ""
230
-
231
- #: mappress_settings.php:93
232
- msgid "Google API key"
233
- msgstr ""
234
-
235
- #: mappress_settings.php:96
236
- msgid "Mapbox access token"
237
- msgstr ""
238
-
239
- #: mappress_settings.php:100
240
- msgid "License"
241
- msgstr ""
242
-
243
- #: mappress_settings.php:102
244
- msgid "Map Settings"
245
- msgstr ""
246
-
247
- #: mappress_settings.php:103
248
- msgid "Post types"
249
- msgstr ""
250
-
251
- #: mappress_settings.php:104
252
- msgid "Automatic display"
253
- msgstr ""
254
-
255
- #: mappress_settings.php:105
256
- msgid "Map alignment"
257
- msgstr ""
258
-
259
- #: mappress_settings.php:106
260
- #: templates/map-popup.php:3
261
- #: templates/mashup-popup.php:6
262
- msgid "Directions"
263
- msgstr ""
264
-
265
- #: mappress_settings.php:109
266
- msgid "POI Settings"
267
  msgstr ""
268
 
269
- #: mappress_settings.php:110
270
- msgid "Default zoom"
271
- msgstr ""
272
-
273
- #: mappress_settings.php:111
274
- #: mappress_settings.php:240
275
- msgid "Open first POI"
276
- msgstr ""
277
-
278
- #: mappress_settings.php:115
279
- msgid "Mashups"
280
- msgstr ""
281
-
282
- #: mappress_settings.php:116
283
- msgid "Icons"
284
- msgstr ""
285
-
286
- #: mappress_settings.php:117
287
- msgid "Styled Maps"
288
- msgstr ""
289
-
290
- #: mappress_settings.php:118
291
- msgid "Geocoding"
292
- msgstr ""
293
-
294
- #: mappress_settings.php:119
295
- msgid "Templates"
296
- msgstr ""
297
-
298
- #: mappress_settings.php:122
299
- msgid "Localization"
300
- msgstr ""
301
-
302
- #: mappress_settings.php:123
303
- msgid "Search language"
304
- msgstr ""
305
-
306
- #: mappress_settings.php:124
307
- msgid "Search country"
308
- msgstr ""
309
-
310
- #: mappress_settings.php:125
311
- msgid "Directions server"
312
- msgstr ""
313
-
314
- #: mappress_settings.php:127
315
- msgid "Miscellaneous"
316
- msgstr ""
317
-
318
- #: mappress_settings.php:128
319
- msgid "Map sizes"
320
- msgstr ""
321
-
322
- #: mappress_settings.php:129
323
- msgid "Scripts"
324
- msgstr ""
325
-
326
- #: mappress_settings.php:133
327
- msgid "Compatiblity"
328
- msgstr ""
329
-
330
- #: mappress_settings.php:177
331
- #: mappress_settings.php:246
332
- #: pro/mappress_pro_settings.php:233
333
- #: templates_admin/widgets.php:78
334
  msgid "Default"
335
  msgstr ""
336
 
337
- #: mappress_settings.php:178
338
- msgid "Center"
339
- msgstr ""
340
-
341
- #: mappress_settings.php:179
342
- msgid "Left"
343
- msgstr ""
344
-
345
- #: mappress_settings.php:180
346
- msgid "Right"
347
- msgstr ""
348
-
349
- #: mappress_settings.php:192
350
- msgid "None"
351
- msgstr ""
352
-
353
- #: mappress_settings.php:193
354
- msgid "Top of post"
355
- msgstr ""
356
-
357
- #: mappress_settings.php:194
358
- msgid "Bottom of post"
359
- msgstr ""
360
-
361
- #: mappress_settings.php:201
362
- #: mappress_settings.php:245
363
- msgid "(list)"
364
- msgstr ""
365
-
366
- #: mappress_settings.php:206
367
- msgid "Country code for searches"
368
- msgstr ""
369
-
370
- #: mappress_settings.php:210
371
- msgid "Prevent other plugins/themes from loading the Google Maps API"
372
- msgstr ""
373
-
374
- #: mappress_settings.php:214
375
- #: mappress_settings.php:223
376
- #: pro/mappress_pro_settings.php:231
377
- msgid "Google"
378
- msgstr ""
379
-
380
- #: mappress_settings.php:214
381
- msgid "Inline"
382
- msgstr ""
383
-
384
- #: mappress_settings.php:223
385
- msgid "Leaflet"
386
- msgstr ""
387
-
388
- #: mappress_settings.php:225
389
- msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
390
  msgstr ""
391
 
392
- #: mappress_settings.php:231
393
- #: mappress_settings.php:234
394
- msgid "Output scripts in footer"
395
  msgstr ""
396
 
397
- #: mappress_settings.php:232
398
- msgid "Disabled because Jetpack Infinite Scroll is active"
399
  msgstr ""
400
 
401
- #: mappress_settings.php:235
402
- msgid "disable if maps are output using AJAX"
403
  msgstr ""
404
 
405
- #: mappress_settings.php:248
406
- msgid "Language for searches and Google map controls"
407
  msgstr ""
408
 
409
- #: mappress_settings.php:252
410
- msgid "Enter token to use Mapbox map tiles"
411
  msgstr ""
412
 
413
- #: mappress_settings.php:259
414
- #: mappress_settings.php:264
415
- msgid "Map type control"
416
  msgstr ""
417
 
418
- #: mappress_settings.php:260
419
- msgid "Street view control"
 
420
  msgstr ""
421
 
422
- #: mappress_settings.php:261
423
- #: mappress_settings.php:265
424
- msgid "Zoom control"
425
  msgstr ""
426
 
427
- #: mappress_settings.php:280
428
- msgid "Default zoom when displaying a single POI"
 
429
  msgstr ""
430
 
431
- #: mappress_settings.php:293
432
- msgid "Easy Google Maps"
433
  msgstr ""
434
 
435
- #: mappress_settings.php:301
436
- msgid "Width (px, %, vh, vw)"
437
  msgstr ""
438
 
439
- #: mappress_settings.php:301
440
- msgid "Height (px, %, vh, vw)"
441
  msgstr ""
442
 
443
- #: mappress_settings.php:301
444
- msgid "Default size"
445
  msgstr ""
446
 
447
- #: mappress_settings.php:316
448
- msgid "Show a tooltip when mouse is over a POI"
449
  msgstr ""
450
 
451
- #: mappress_settings.php:321
452
- msgid "Copy maps when overwriting a translation"
453
  msgstr ""
454
 
455
- #: mappress_settings.php:334
456
  msgid "Get help"
457
  msgstr ""
458
 
459
- #: mappress_settings.php:337
460
  msgid "Your account"
461
  msgstr ""
462
 
463
- #: mappress_settings.php:339
464
  msgid "Upgrade to MapPress Pro"
465
  msgstr ""
466
 
467
- #: mappress_settings.php:346
468
- #: mappress_settings.php:354
469
- msgid "Save Changes"
470
- msgstr ""
471
-
472
- #: mappress_settings.php:347
473
- #: mappress_settings.php:355
474
- msgid "Reset Defaults"
475
- msgstr ""
476
-
477
- #: mappress_template.php:34
478
  msgid "Address"
479
  msgstr ""
480
 
481
- #: mappress_template.php:35
482
- #: pro/mappress_pro_settings.php:337
483
- msgid "Body"
484
- msgstr ""
485
-
486
  #: mappress_template.php:36
487
- #: pro/mappress_pro_settings.php:173
488
- #: pro/mappress_pro_settings.php:337
489
- msgid "Icon"
490
- msgstr ""
491
-
492
- #: mappress_template.php:37
493
  msgid "Thumbnail"
494
  msgstr ""
495
 
496
  #: mappress_template.php:38
497
- #: pro/mappress_pro_settings.php:337
498
- msgid "Title"
499
- msgstr ""
500
-
501
- #: mappress_template.php:39
502
  msgid "Url"
503
  msgstr ""
504
 
505
- #: mappress_template.php:40
506
- #: pro/mappress_filter.php:120
507
- #: pro/mappress_pro_settings.php:342
508
  msgid "Custom Field"
509
  msgstr ""
510
 
511
  #: pro/mappress_filter.php:84
512
- #: pro/mappress_filter.php:133
513
- #: pro/mappress_pro_settings.php:166
514
  msgid "Post type"
515
  msgstr ""
516
 
517
- #: pro/mappress_filter.php:120
518
  msgid "Taxonomy"
519
  msgstr ""
520
 
521
- #: pro/mappress_filter.php:120
522
  msgid "Post field"
523
  msgstr ""
524
 
@@ -561,349 +338,21 @@ msgstr ""
561
  msgid "Automatic"
562
  msgstr ""
563
 
564
- #: pro/mappress_pro_settings.php:16
565
- msgid "MapPress license key"
566
- msgstr ""
567
-
568
- #: pro/mappress_pro_settings.php:17
569
- msgid "Beta versions"
570
- msgstr ""
571
-
572
- #: pro/mappress_pro_settings.php:21
573
- msgid "Geocoder"
574
- msgstr ""
575
-
576
- #: pro/mappress_pro_settings.php:23
577
- msgid "POI list"
578
- msgstr ""
579
-
580
- #: pro/mappress_pro_settings.php:24
581
- msgid "POI list layout"
582
- msgstr ""
583
-
584
- #: pro/mappress_pro_settings.php:25
585
- msgid "Mini width"
586
- msgstr ""
587
-
588
- #: pro/mappress_pro_settings.php:26
589
- msgid "Sort"
590
- msgstr ""
591
-
592
- #: pro/mappress_pro_settings.php:28
593
- msgid "Clustering"
594
- msgstr ""
595
-
596
- #: pro/mappress_pro_settings.php:29
597
- msgid "Popup type"
598
- msgstr ""
599
-
600
- #: pro/mappress_pro_settings.php:31
601
- msgid "Default icon"
602
- msgstr ""
603
-
604
- #: pro/mappress_pro_settings.php:32
605
- msgid "Icon directory"
606
- msgstr ""
607
-
608
- #: pro/mappress_pro_settings.php:33
609
- msgid "Custom icons"
610
- msgstr ""
611
-
612
- #: pro/mappress_pro_settings.php:34
613
- msgid "Icon scaling"
614
- msgstr ""
615
-
616
- #: pro/mappress_pro_settings.php:35
617
- msgid "Automatic icons"
618
- msgstr ""
619
-
620
- #: pro/mappress_pro_settings.php:37
621
- #: templates/map.php:49
622
- #: templates_admin/mce.php:12
623
- msgid "Search"
624
- msgstr ""
625
-
626
- #: pro/mappress_pro_settings.php:39
627
- #: templates/map.php:56
628
- msgid "Filter"
629
- msgstr ""
630
-
631
- #: pro/mappress_pro_settings.php:40
632
- msgid "POI content"
633
- msgstr ""
634
-
635
- #: pro/mappress_pro_settings.php:41
636
- msgid "POI click"
637
- msgstr ""
638
-
639
- #: pro/mappress_pro_settings.php:42
640
- msgid "KMLs"
641
- msgstr ""
642
-
643
- #: pro/mappress_pro_settings.php:43
644
- msgid "Thumbnails"
645
- msgstr ""
646
-
647
- #: pro/mappress_pro_settings.php:44
648
- msgid "Thumbnail size"
649
- msgstr ""
650
-
651
- #: pro/mappress_pro_settings.php:47
652
- #: pro/mappress_pro_settings.php:49
653
- msgid "Styled maps"
654
- msgstr ""
655
-
656
- #: pro/mappress_pro_settings.php:50
657
- msgid "Default style"
658
- msgstr ""
659
-
660
- #: pro/mappress_pro_settings.php:53
661
- msgid "Geocoding fields"
662
- msgstr ""
663
-
664
- #: pro/mappress_pro_settings.php:54
665
- msgid "Overwrite"
666
- msgstr ""
667
-
668
- #: pro/mappress_pro_settings.php:55
669
- msgid "Geocoding errors"
670
- msgstr ""
671
-
672
- #: pro/mappress_pro_settings.php:58
673
- msgid "Google Server API key"
674
- msgstr ""
675
-
676
- #: pro/mappress_pro_settings.php:60
677
- msgid "Custom templates"
678
- msgstr ""
679
-
680
- #: pro/mappress_pro_settings.php:61
681
- #: pro/mappress_pro_settings.php:226
682
- msgid "Force resize"
683
- msgstr ""
684
-
685
- #: pro/mappress_pro_settings.php:153
686
- msgid "more info"
687
- msgstr ""
688
-
689
- #: pro/mappress_pro_settings.php:154
690
- msgid "API key secured by IP address for geocoding (optional)"
691
- msgstr ""
692
-
693
- #: pro/mappress_pro_settings.php:173
694
- msgid "Value"
695
- msgstr ""
696
-
697
- #: pro/mappress_pro_settings.php:188
698
- msgid "Enable updates for beta versions"
699
- msgstr ""
700
-
701
- #: pro/mappress_pro_settings.php:192
702
- msgid "Enable marker clustering"
703
- msgstr ""
704
-
705
- #: pro/mappress_pro_settings.php:201
706
- msgid "Checkboxes"
707
- msgstr ""
708
-
709
- #: pro/mappress_pro_settings.php:201
710
- msgid "Select"
711
- msgstr ""
712
-
713
- #: pro/mappress_pro_settings.php:208
714
- msgid "Key"
715
- msgstr ""
716
-
717
- #: pro/mappress_pro_settings.php:208
718
- msgid "Format"
719
- msgstr ""
720
-
721
- #: pro/mappress_pro_settings.php:223
722
- msgid "Permanently resize existing maps (classic editor only)"
723
- msgstr ""
724
-
725
- #: pro/mappress_pro_settings.php:225
726
- msgid "from %s to %s"
727
- msgstr ""
728
-
729
- #: pro/mappress_pro_settings.php:233
730
- msgid "Algolia"
731
- msgstr ""
732
-
733
- #: pro/mappress_pro_settings.php:234
734
- msgid "Nominatim"
735
- msgstr ""
736
-
737
- #: pro/mappress_pro_settings.php:235
738
- msgid "MapBox"
739
- msgstr ""
740
-
741
- #: pro/mappress_pro_settings.php:245
742
- #: templates_admin/widgets.php:68
743
- msgid "Edit"
744
- msgstr ""
745
-
746
- #: pro/mappress_pro_settings.php:259
747
- msgid "Standard"
748
- msgstr ""
749
-
750
- #: pro/mappress_pro_settings.php:260
751
- msgid "InfoBox"
752
- msgstr ""
753
-
754
- #: pro/mappress_pro_settings.php:267
755
- msgid "Left of map"
756
- msgstr ""
757
-
758
- #: pro/mappress_pro_settings.php:268
759
- msgid "Below map"
760
- msgstr ""
761
-
762
- #: pro/mappress_pro_settings.php:274
763
- msgid "Get license"
764
- msgstr ""
765
-
766
- #: pro/mappress_pro_settings.php:275
767
- msgid "Enter license to enable automatic updates"
768
- msgstr ""
769
-
770
- #: pro/mappress_pro_settings.php:288
771
- msgid "Active"
772
- msgstr ""
773
-
774
- #: pro/mappress_pro_settings.php:293
775
- msgid "Check now"
776
- msgstr ""
777
-
778
- #: pro/mappress_pro_settings.php:298
779
  #: pro/mappress_updater.php:116
780
  msgid "Communication error, please try again later"
781
  msgstr ""
782
 
783
- #: pro/mappress_pro_settings.php:300
784
- msgid "License is invalid or expired"
785
- msgstr ""
786
-
787
- #: pro/mappress_pro_settings.php:304
788
- msgid "POI title + POI body"
789
- msgstr ""
790
-
791
- #: pro/mappress_pro_settings.php:304
792
- msgid "Post title + post excerpt"
793
- msgstr ""
794
-
795
- #: pro/mappress_pro_settings.php:309
796
- msgid "Open POI"
797
- msgstr ""
798
-
799
- #: pro/mappress_pro_settings.php:309
800
- msgid "Open post"
801
- msgstr ""
802
-
803
- #: pro/mappress_pro_settings.php:309
804
- msgid "Open post in new tab"
805
- msgstr ""
806
-
807
- #: pro/mappress_pro_settings.php:314
808
- msgid "Include KML POIs in mashups"
809
- msgstr ""
810
-
811
- #: pro/mappress_pro_settings.php:326
812
- msgid "%d Errors"
813
- msgstr ""
814
-
815
- #: pro/mappress_pro_settings.php:336
816
- msgid "Address line "
817
- msgstr ""
818
-
819
- #: pro/mappress_pro_settings.php:337
820
- msgid "Latitude"
821
- msgstr ""
822
-
823
- #: pro/mappress_pro_settings.php:337
824
- msgid "Longitude"
825
- msgstr ""
826
-
827
- #: pro/mappress_pro_settings.php:337
828
- msgid "Zoom"
829
- msgstr ""
830
-
831
- #: pro/mappress_pro_settings.php:342
832
- msgid "Map Field"
833
- msgstr ""
834
-
835
- #: pro/mappress_pro_settings.php:355
836
- msgid "Overwrite maps when posts are saved"
837
- msgstr ""
838
-
839
- #: pro/mappress_pro_settings.php:360
840
- msgid "Width (px) at which to collapse the left POI list"
841
- msgstr ""
842
-
843
- #: pro/mappress_pro_settings.php:364
844
- msgid "Show a list of POIs with each map"
845
- msgstr ""
846
-
847
- #: pro/mappress_pro_settings.php:372
848
- msgid "Enable search"
849
- msgstr ""
850
-
851
- #: pro/mappress_pro_settings.php:376
852
- msgid "Sort POI list by title"
853
- msgstr ""
854
-
855
- #: pro/mappress_pro_settings.php:382
856
- msgid "No styles have been defined yet"
857
- msgstr ""
858
-
859
- #: pro/mappress_pro_settings.php:391
860
- msgid "Snazzy Maps"
861
- msgstr ""
862
-
863
- #: pro/mappress_pro_settings.php:392
864
- msgid "Enter JSON from %s"
865
- msgstr ""
866
-
867
- #: pro/mappress_pro_settings.php:396
868
- #: pro/mappress_pro_settings.php:412
869
- msgid "Style name"
870
- msgstr ""
871
-
872
- #: pro/mappress_pro_settings.php:408
873
- msgid "Mapbox Studio"
874
- msgstr ""
875
-
876
- #: pro/mappress_pro_settings.php:409
877
- msgid "Enter styles from %s"
878
- msgstr ""
879
-
880
- #: pro/mappress_pro_settings.php:427
881
- msgid "Only admins or multisite super-admins can edit templates"
882
- msgstr ""
883
-
884
- #: pro/mappress_pro_settings.php:432
885
- msgid "WordPress 4.9 or higher is needed to use the template editor."
886
- msgstr ""
887
-
888
- #: pro/mappress_pro_settings.php:446
889
- msgid "or "
890
- msgstr ""
891
-
892
- #: pro/mappress_pro_settings.php:454
893
- msgid "Show featured image thumbnails in mashup POIs"
894
- msgstr ""
895
-
896
  #: pro/mappress_updater.php:122
897
  msgid "JSON error"
898
  msgstr ""
899
 
900
  #: pro/mappress_widget.php:69
901
- #: pro/mappress_widget_map.php:56
902
  msgid "Widget title"
903
  msgstr ""
904
 
905
  #: pro/mappress_widget.php:74
906
- #: pro/mappress_widget_map.php:66
907
  msgid "Map size"
908
  msgstr ""
909
 
@@ -932,23 +381,21 @@ msgid "Learn about queries"
932
  msgstr ""
933
 
934
  #: pro/mappress_widget.php:94
935
- #: pro/mappress_widget_map.php:74
936
  msgid "Show POI list"
937
  msgstr ""
938
 
939
  #: pro/mappress_widget.php:101
940
- #: pro/mappress_widget_map.php:81
941
  msgid "Other Settings"
942
  msgstr ""
943
 
944
  #: pro/mappress_widget.php:104
945
- #: pro/mappress_widget_map.php:84
946
  msgid "Example: initialopeninfo=\"true\""
947
  msgstr ""
948
 
949
- #: pro/mappress_widget_map.php:61
950
- #: templates_admin/mce.php:47
951
- #: templates_admin/mce.php:67
952
  msgid "Map ID"
953
  msgstr ""
954
 
@@ -957,6 +404,8 @@ msgid "My location"
957
  msgstr ""
958
 
959
  #: templates/map-directions.php:14
 
 
960
  msgid "Get Directions"
961
  msgstr ""
962
 
@@ -973,163 +422,84 @@ msgid "Results"
973
  msgstr ""
974
 
975
  #: templates/map.php:51
 
 
 
 
976
  msgid "Your Location"
977
  msgstr ""
978
 
979
- #: templates/map.php:65
980
- msgid "Menu"
981
  msgstr ""
982
 
983
  #: templates/map.php:67
 
 
 
 
984
  msgid "Center map"
985
  msgstr ""
986
 
987
- #: templates/map.php:70
988
  msgid "Traffic"
989
  msgstr ""
990
 
991
- #: templates/map.php:71
992
  msgid "Bicycling"
993
  msgstr ""
994
 
995
- #: templates/map.php:72
996
  msgid "Transit"
997
  msgstr ""
998
 
999
- #: templates/map.php:82
1000
  msgid "Show List"
1001
  msgstr ""
1002
 
1003
- #: templates/map.php:83
1004
  msgid "Show Map"
1005
  msgstr ""
1006
 
1007
- #: templates_admin/editor.php:34
1008
- msgid "Visual"
1009
  msgstr ""
1010
 
1011
- #: templates_admin/editor.php:34
1012
- msgid "HTML"
 
1013
  msgstr ""
1014
 
1015
- #: templates_admin/editor.php:36
1016
- msgid "Add Media"
1017
  msgstr ""
1018
 
1019
- #: templates_admin/editor.php:45
1020
- #: templates_admin/mce.php:53
1021
- #: templates_admin/widgets.php:91
1022
- msgid "Save"
1023
- msgstr ""
1024
-
1025
- #: templates_admin/editor.php:46
1026
- #: templates_admin/mce.php:54
1027
- #: templates_admin/widgets.php:92
1028
- msgid "Cancel"
1029
  msgstr ""
1030
 
1031
- #: templates_admin/mce.php:6
1032
- msgid "Select a map"
1033
- msgstr ""
1034
-
1035
- #: templates_admin/mce.php:7
1036
- msgid "Add New"
1037
- msgstr ""
1038
-
1039
- #: templates_admin/mce.php:13
1040
- msgid "post title"
1041
- msgstr ""
1042
-
1043
- #: templates_admin/mce.php:17
1044
- msgid "Attached to this post"
1045
- msgstr ""
1046
-
1047
- #: templates_admin/mce.php:18
1048
- msgid "All maps"
1049
- msgstr ""
1050
-
1051
- #: templates_admin/mce.php:23
1052
- msgid "Close"
1053
- msgstr ""
1054
-
1055
- #: templates_admin/mce.php:33
1056
- msgid "Size"
1057
- msgstr ""
1058
-
1059
- #: templates_admin/mce.php:57
1060
- msgid "Save center / zoom"
1061
- msgstr ""
1062
-
1063
- #: templates_admin/mce.php:66
1064
- msgid "Map title"
1065
- msgstr ""
1066
-
1067
- #: templates_admin/mce.php:69
1068
- msgid "Attached to"
1069
- msgstr ""
1070
-
1071
- #: templates_admin/mce.php:71
1072
- msgid "Action"
1073
- msgstr ""
1074
-
1075
- #: templates_admin/mce.php:85
1076
- msgid "Current post"
1077
- msgstr ""
1078
-
1079
- #: templates_admin/mce.php:90
1080
- msgid "Unattached"
1081
- msgstr ""
1082
-
1083
- #: templates_admin/mce.php:97
1084
- msgid "Insert into post"
1085
- msgstr ""
1086
-
1087
- #: templates_admin/mce.php:105
1088
- msgid "No maps found"
1089
- msgstr ""
1090
-
1091
- #: templates_admin/widgets.php:7
1092
- msgid "Opacity"
1093
- msgstr ""
1094
-
1095
- #: templates_admin/widgets.php:13
1096
- msgid "Weight"
1097
- msgstr ""
1098
-
1099
- #: templates_admin/widgets.php:28
1100
- msgid "No custom icons have been added yet."
1101
- msgstr ""
1102
-
1103
- #: templates_admin/widgets.php:59
1104
- msgid "Use default icon"
1105
- msgstr ""
1106
-
1107
- #: templates_admin/widgets.php:67
1108
- msgid "Map popup"
1109
- msgstr ""
1110
-
1111
- #: templates_admin/widgets.php:67
1112
- msgid "Map list item"
1113
  msgstr ""
1114
 
1115
- #: templates_admin/widgets.php:67
1116
- msgid "Mashup popup"
1117
  msgstr ""
1118
 
1119
- #: templates_admin/widgets.php:67
1120
- msgid "Mashup list item"
1121
  msgstr ""
1122
 
1123
- #: templates_admin/widgets.php:74
1124
- msgid "New"
1125
  msgstr ""
1126
 
1127
- #: templates_admin/widgets.php:74
1128
- msgid "Custom"
1129
  msgstr ""
1130
 
1131
- #: templates_admin/widgets.php:77
1132
- msgid "Editor"
1133
  msgstr ""
1134
 
1135
  #: package.json
1
+ # Copyright (C) 2021 Chris Richardson
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.61\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: 2021-03-15T18:55:26+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
+ #: mappress.php:196
37
+ #: mappress.php:727
38
  msgid "Settings"
39
  msgstr ""
40
 
41
+ #: mappress.php:197
42
  msgid "Map Library"
43
  msgstr ""
44
 
45
+ #: mappress.php:208
46
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
47
  msgstr ""
48
 
49
+ #: mappress.php:213
50
  msgid "A Google Maps API key is required"
51
  msgstr ""
52
 
53
+ #: mappress.php:213
54
  msgid "Please update your"
55
  msgstr ""
56
 
57
+ #: mappress.php:213
58
  msgid "MapPress Settings"
59
  msgstr ""
60
 
61
+ #: mappress.php:477
62
+ msgid "renew your license"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  msgstr ""
64
 
65
+ #: mappress.php:478
66
+ msgid "Your MapPress license has expired. Please %s to get the latest updates and prevent errors."
67
  msgstr ""
68
 
69
+ #: mappress.php:487
70
  msgid "Please enter your MapPress license key to enable plugin updates"
71
  msgstr ""
72
 
73
+ #: mappress.php:491
74
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
75
  msgstr ""
76
 
77
+ #: mappress.php:495
78
+ msgid "MapPress has many new features! %s."
 
 
 
 
79
  msgstr ""
80
 
81
+ #: mappress.php:495
82
+ #: mappress.php:499
83
+ msgid "Learn more"
84
  msgstr ""
85
 
86
+ #: mappress.php:499
87
+ msgid "MapPress popup templates have changed! Please update custom templates to the new format. %s."
88
  msgstr ""
89
 
90
+ #: mappress.php:543
91
  msgid "Are you sure you want to delete?"
92
  msgstr ""
93
 
94
+ #: mappress.php:544
95
  msgid "Permanently delete this map from the map library?"
96
  msgstr ""
97
 
98
+ #: mappress.php:545
99
  msgid "Error reading KML file"
100
  msgstr ""
101
 
102
+ #: mappress.php:546
103
  msgid "URL for KML file"
104
  msgstr ""
105
 
106
+ #: mappress.php:547
107
  msgid "Loading"
108
  msgstr ""
109
 
110
+ #: mappress.php:548
111
+ msgid "Please select an editor to insert into."
112
  msgstr ""
113
 
114
+ #: mappress.php:549
115
  msgid "Unable to get your location"
116
  msgstr ""
117
 
118
+ #: mappress.php:550
119
  msgid "No results"
120
  msgstr ""
121
 
122
+ #: mappress.php:551
123
  msgid "Save changes?"
124
  msgstr ""
125
 
126
+ #: mappress.php:552
127
  msgid "Shape"
128
  msgstr ""
129
 
130
+ #: mappress.php:581
131
  msgid "Improve this map"
132
  msgstr ""
133
 
134
+ #: mappress.php:597
135
+ #: mappress.php:616
136
  msgid "Streets"
137
  msgstr ""
138
 
139
+ #: mappress.php:598
140
  msgid "Outdoors"
141
  msgstr ""
142
 
143
+ #: mappress.php:599
144
  msgid "Light"
145
  msgstr ""
146
 
147
+ #: mappress.php:600
148
  msgid "Dark"
149
  msgstr ""
150
 
151
+ #: mappress.php:601
152
  msgid "Satellite"
153
  msgstr ""
154
 
155
+ #: mappress.php:602
156
  msgid "Satellite Streets"
157
  msgstr ""
158
 
159
+ #: mappress.php:728
160
+ #: mappress_settings.php:344
161
  msgid "What's new"
162
  msgstr ""
163
 
164
+ #: mappress.php:976
165
  msgid "Version"
166
  msgstr ""
167
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  #: mappress_map.php:86
169
+ #: mappress_settings.php:339
170
  msgid "MapPress"
171
  msgstr ""
172
 
173
+ #: mappress_map.php:96
 
 
 
174
  msgid "Untitled"
175
  msgstr ""
176
 
177
+ #: mappress_map.php:97
178
  msgid "Copy of %s"
179
  msgstr ""
180
 
181
+ #: mappress_map.php:201
182
  msgid "Map not found"
183
  msgstr ""
184
 
185
+ #: mappress_map.php:244
186
+ msgid "Post not found"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  msgstr ""
188
 
189
+ #: mappress_settings.php:162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  msgid "Default"
191
  msgstr ""
192
 
193
+ #: mappress_settings.php:217
194
+ msgid "Easy Google Maps"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  msgstr ""
196
 
197
+ #: mappress_settings.php:241
198
+ msgid "Active"
 
199
  msgstr ""
200
 
201
+ #: mappress_settings.php:244
202
+ msgid "Communication error, please try again later: %s"
203
  msgstr ""
204
 
205
+ #: mappress_settings.php:246
206
+ msgid "License is invalid or expired"
207
  msgstr ""
208
 
209
+ #: mappress_settings.php:254
210
+ msgid "Address line "
211
  msgstr ""
212
 
213
+ #: mappress_settings.php:255
214
+ msgid "Latitude"
215
  msgstr ""
216
 
217
+ #: mappress_settings.php:255
218
+ msgid "Longitude"
 
219
  msgstr ""
220
 
221
+ #: mappress_settings.php:255
222
+ #: mappress_template.php:37
223
+ msgid "Title"
224
  msgstr ""
225
 
226
+ #: mappress_settings.php:255
227
+ #: mappress_template.php:34
228
+ msgid "Body"
229
  msgstr ""
230
 
231
+ #: mappress_settings.php:255
232
+ #: mappress_template.php:35
233
+ msgid "Icon"
234
  msgstr ""
235
 
236
+ #: mappress_settings.php:255
237
+ msgid "Zoom"
238
  msgstr ""
239
 
240
+ #: mappress_settings.php:320
241
+ msgid "OK, you deserve it!"
242
  msgstr ""
243
 
244
+ #: mappress_settings.php:321
245
+ msgid "Nope, maybe later"
246
  msgstr ""
247
 
248
+ #: mappress_settings.php:322
249
+ msgid "I need help using the plugin"
250
  msgstr ""
251
 
252
+ #: mappress_settings.php:324
253
+ msgid "Help Spread the Word"
254
  msgstr ""
255
 
256
+ #: mappress_settings.php:325
257
+ msgid "Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!"
258
  msgstr ""
259
 
260
+ #: mappress_settings.php:343
261
  msgid "Get help"
262
  msgstr ""
263
 
264
+ #: mappress_settings.php:346
265
  msgid "Your account"
266
  msgstr ""
267
 
268
+ #: mappress_settings.php:348
269
  msgid "Upgrade to MapPress Pro"
270
  msgstr ""
271
 
272
+ #: mappress_template.php:33
 
 
 
 
 
 
 
 
 
 
273
  msgid "Address"
274
  msgstr ""
275
 
 
 
 
 
 
276
  #: mappress_template.php:36
 
 
 
 
 
 
277
  msgid "Thumbnail"
278
  msgstr ""
279
 
280
  #: mappress_template.php:38
 
 
 
 
 
281
  msgid "Url"
282
  msgstr ""
283
 
284
+ #: mappress_template.php:39
285
+ #: pro/mappress_filter.php:192
 
286
  msgid "Custom Field"
287
  msgstr ""
288
 
289
  #: pro/mappress_filter.php:84
290
+ #: pro/mappress_filter.php:205
 
291
  msgid "Post type"
292
  msgstr ""
293
 
294
+ #: pro/mappress_filter.php:192
295
  msgid "Taxonomy"
296
  msgstr ""
297
 
298
+ #: pro/mappress_filter.php:192
299
  msgid "Post field"
300
  msgstr ""
301
 
338
  msgid "Automatic"
339
  msgstr ""
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  #: pro/mappress_updater.php:116
342
  msgid "Communication error, please try again later"
343
  msgstr ""
344
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  #: pro/mappress_updater.php:122
346
  msgid "JSON error"
347
  msgstr ""
348
 
349
  #: pro/mappress_widget.php:69
350
+ #: pro/mappress_widget_map.php:57
351
  msgid "Widget title"
352
  msgstr ""
353
 
354
  #: pro/mappress_widget.php:74
355
+ #: pro/mappress_widget_map.php:67
356
  msgid "Map size"
357
  msgstr ""
358
 
381
  msgstr ""
382
 
383
  #: pro/mappress_widget.php:94
384
+ #: pro/mappress_widget_map.php:75
385
  msgid "Show POI list"
386
  msgstr ""
387
 
388
  #: pro/mappress_widget.php:101
389
+ #: pro/mappress_widget_map.php:82
390
  msgid "Other Settings"
391
  msgstr ""
392
 
393
  #: pro/mappress_widget.php:104
394
+ #: pro/mappress_widget_map.php:85
395
  msgid "Example: initialopeninfo=\"true\""
396
  msgstr ""
397
 
398
+ #: pro/mappress_widget_map.php:62
 
 
399
  msgid "Map ID"
400
  msgstr ""
401
 
404
  msgstr ""
405
 
406
  #: templates/map-directions.php:14
407
+ #: templates/map-popup.php:5
408
+ #: templates/mashup-popup.php:6
409
  msgid "Get Directions"
410
  msgstr ""
411
 
422
  msgstr ""
423
 
424
  #: templates/map.php:51
425
+ msgid "Search"
426
+ msgstr ""
427
+
428
+ #: templates/map.php:53
429
  msgid "Your Location"
430
  msgstr ""
431
 
432
+ #: templates/map.php:58
433
+ msgid "Filter"
434
  msgstr ""
435
 
436
  #: templates/map.php:67
437
+ msgid "Menu"
438
+ msgstr ""
439
+
440
+ #: templates/map.php:69
441
  msgid "Center map"
442
  msgstr ""
443
 
444
+ #: templates/map.php:72
445
  msgid "Traffic"
446
  msgstr ""
447
 
448
+ #: templates/map.php:73
449
  msgid "Bicycling"
450
  msgstr ""
451
 
452
+ #: templates/map.php:74
453
  msgid "Transit"
454
  msgstr ""
455
 
456
+ #: templates/map.php:84
457
  msgid "Show List"
458
  msgstr ""
459
 
460
+ #: templates/map.php:85
461
  msgid "Show Map"
462
  msgstr ""
463
 
464
+ #: templates/mashup-modal.php:18
465
+ msgid "Continue reading"
466
  msgstr ""
467
 
468
+ #. translators: %s: Author name.
469
+ #: templates/mashup-modal.php:24
470
+ msgid "By %s"
471
  msgstr ""
472
 
473
+ #: templates/mashup-modal.php:28
474
+ msgid "In"
475
  msgstr ""
476
 
477
+ #: templates/mashup-modal.php:29
478
+ msgid " Tagged "
 
 
 
 
 
 
 
 
479
  msgstr ""
480
 
481
+ #: templates_admin/editor.php:19
482
+ msgid "Visual"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  msgstr ""
484
 
485
+ #: templates_admin/editor.php:19
486
+ msgid "HTML"
487
  msgstr ""
488
 
489
+ #: templates_admin/editor.php:21
490
+ msgid "Add Media"
491
  msgstr ""
492
 
493
+ #: templates_admin/editor.php:30
494
+ msgid "Save"
495
  msgstr ""
496
 
497
+ #: templates_admin/editor.php:31
498
+ msgid "Cancel"
499
  msgstr ""
500
 
501
+ #: templates_admin/editor.php:32
502
+ msgid "Delete"
503
  msgstr ""
504
 
505
  #: package.json
languages/texts.php CHANGED
@@ -10,24 +10,19 @@ __("MapPress database tables are missing. Please deactivate the plugin and acti
10
  __("A Google Maps API key is required");
11
  __("Please update your");
12
  __("MapPress Settings");
13
- __("OK, you deserve it!");
14
- __("Nope, maybe later");
15
- __("I neeed some help");
16
- __("Please Help Spread the Word");
17
- __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!");
18
- __("If you have any issues or suggestions, please let me know. I'll be happy to help!");
19
  __("Please enter your MapPress license key to enable plugin updates");
20
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
21
- __("MapPress has many new features! Please take a moment to learn %s.");
22
- __("what's new");
23
- __("The MapPress map editor has moved!");
24
- __("Use this button to open the new popup editor where you can easily create, edit and insert maps.");
25
  __("Are you sure you want to delete?");
26
  __("Permanently delete this map from the map library?");
27
  __("Error reading KML file");
28
  __("URL for KML file");
29
  __("Loading");
30
- __("Please select a classic editor block to insert into.");
31
  __("Unable to get your location");
32
  __("No results");
33
  __("Save changes?");
@@ -41,78 +36,33 @@ __("Satellite");
41
  __("Satellite Streets");
42
  __("What's new");
43
  __("Version");
44
- __("Add");
45
- __("Delete");
46
  __("MapPress");
47
  __("Untitled");
48
  __("Copy of %s");
49
  __("Map not found");
50
- __("Sample Map");
51
- __("Basic Settings");
52
- __("Mapping API");
53
- __("Google API key");
54
- __("Mapbox access token");
55
- __("License");
56
- __("Map Settings");
57
- __("Post types");
58
- __("Automatic display");
59
- __("Map alignment");
60
- __("Directions");
61
- __("POI Settings");
62
- __("Default zoom");
63
- __("Open first POI");
64
- __("Mashups");
65
- __("Icons");
66
- __("Styled Maps");
67
- __("Geocoding");
68
- __("Templates");
69
- __("Localization");
70
- __("Search language");
71
- __("Search country");
72
- __("Directions server");
73
- __("Miscellaneous");
74
- __("Map sizes");
75
- __("Scripts");
76
- __("Compatiblity");
77
  __("Default");
78
- __("Center");
79
- __("Left");
80
- __("Right");
81
- __("None");
82
- __("Top of post");
83
- __("Bottom of post");
84
- __("(list)");
85
- __("Country code for searches");
86
- __("Prevent other plugins/themes from loading the Google Maps API");
87
- __("Google");
88
- __("Inline");
89
- __("Leaflet");
90
- __("Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.");
91
- __("Output scripts in footer");
92
- __("Disabled because Jetpack Infinite Scroll is active");
93
- __("disable if maps are output using AJAX");
94
- __("Language for searches and Google map controls");
95
- __("Enter token to use Mapbox map tiles");
96
- __("Map type control");
97
- __("Street view control");
98
- __("Zoom control");
99
- __("Default zoom when displaying a single POI");
100
  __("Easy Google Maps");
101
- __("Width (px, %, vh, vw)");
102
- __("Height (px, %, vh, vw)");
103
- __("Default size");
104
- __("Show a tooltip when mouse is over a POI");
105
- __("Copy maps when overwriting a translation");
 
 
 
 
 
 
 
 
 
 
106
  __("Get help");
107
  __("Your account");
108
  __("Upgrade to MapPress Pro");
109
- __("Save Changes");
110
- __("Reset Defaults");
111
  __("Address");
112
- __("Body");
113
- __("Icon");
114
  __("Thumbnail");
115
- __("Title");
116
  __("Url");
117
  __("Custom Field");
118
  __("Post type");
@@ -127,87 +77,7 @@ __("Invalid JSON from Geocoding service: %s");
127
  __("No file provided");
128
  __("Files error: ");
129
  __("Automatic");
130
- __("MapPress license key");
131
- __("Beta versions");
132
- __("Geocoder");
133
- __("POI list");
134
- __("POI list layout");
135
- __("Mini width");
136
- __("Sort");
137
- __("Clustering");
138
- __("Popup type");
139
- __("Default icon");
140
- __("Icon directory");
141
- __("Custom icons");
142
- __("Icon scaling");
143
- __("Automatic icons");
144
- __("Search");
145
- __("Filter");
146
- __("POI content");
147
- __("POI click");
148
- __("KMLs");
149
- __("Thumbnails");
150
- __("Thumbnail size");
151
- __("Styled maps");
152
- __("Default style");
153
- __("Geocoding fields");
154
- __("Overwrite");
155
- __("Geocoding errors");
156
- __("Google Server API key");
157
- __("Custom templates");
158
- __("Force resize");
159
- __("more info");
160
- __("API key secured by IP address for geocoding (optional)");
161
- __("Value");
162
- __("Enable updates for beta versions");
163
- __("Enable marker clustering");
164
- __("Checkboxes");
165
- __("Select");
166
- __("Key");
167
- __("Format");
168
- __("Permanently resize existing maps (classic editor only)");
169
- __("from %s to %s");
170
- __("Algolia");
171
- __("Nominatim");
172
- __("MapBox");
173
- __("Edit");
174
- __("Standard");
175
- __("InfoBox");
176
- __("Left of map");
177
- __("Below map");
178
- __("Get license");
179
- __("Enter license to enable automatic updates");
180
- __("Active");
181
- __("Check now");
182
  __("Communication error, please try again later");
183
- __("License is invalid or expired");
184
- __("POI title + POI body");
185
- __("Post title + post excerpt");
186
- __("Open POI");
187
- __("Open post");
188
- __("Open post in new tab");
189
- __("Include KML POIs in mashups");
190
- __("%d Errors");
191
- __("Address line ");
192
- __("Latitude");
193
- __("Longitude");
194
- __("Zoom");
195
- __("Map Field");
196
- __("Overwrite maps when posts are saved");
197
- __("Width (px) at which to collapse the left POI list");
198
- __("Show a list of POIs with each map");
199
- __("Enable search");
200
- __("Sort POI list by title");
201
- __("No styles have been defined yet");
202
- __("Snazzy Maps");
203
- __("Enter JSON from %s");
204
- __("Style name");
205
- __("Mapbox Studio");
206
- __("Enter styles from %s");
207
- __("Only admins or multisite super-admins can edit templates");
208
- __("WordPress 4.9 or higher is needed to use the template editor.");
209
- __("or ");
210
- __("Show featured image thumbnails in mashup POIs");
211
  __("JSON error");
212
  __("Widget title");
213
  __("Map size");
@@ -226,7 +96,9 @@ __("Get Directions");
226
  __("Done");
227
  __("Reset");
228
  __("Results");
 
229
  __("Your Location");
 
230
  __("Menu");
231
  __("Center map");
232
  __("Traffic");
@@ -234,36 +106,15 @@ __("Bicycling");
234
  __("Transit");
235
  __("Show List");
236
  __("Show Map");
 
 
 
 
237
  __("Visual");
238
  __("HTML");
239
  __("Add Media");
240
  __("Save");
241
  __("Cancel");
242
- __("Select a map");
243
- __("Add New");
244
- __("post title");
245
- __("Attached to this post");
246
- __("All maps");
247
- __("Close");
248
- __("Size");
249
- __("Save center / zoom");
250
- __("Map title");
251
- __("Attached to");
252
- __("Action");
253
- __("Current post");
254
- __("Unattached");
255
- __("Insert into post");
256
- __("No maps found");
257
- __("Opacity");
258
- __("Weight");
259
- __("No custom icons have been added yet.");
260
- __("Use default icon");
261
- __("Map popup");
262
- __("Map list item");
263
- __("Mashup popup");
264
- __("Mashup list item");
265
- __("New");
266
- __("Custom");
267
- __("Editor");
268
  __("MapPress Maps for WordPress");
269
  ?>
10
  __("A Google Maps API key is required");
11
  __("Please update your");
12
  __("MapPress Settings");
13
+ __("renew your license");
14
+ __("Your MapPress license has expired. Please %s to get the latest updates and prevent errors.");
 
 
 
 
15
  __("Please enter your MapPress license key to enable plugin updates");
16
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
17
+ __("MapPress has many new features! %s.");
18
+ __("Learn more");
19
+ __("MapPress popup templates have changed! Please update custom templates to the new format. %s.");
 
20
  __("Are you sure you want to delete?");
21
  __("Permanently delete this map from the map library?");
22
  __("Error reading KML file");
23
  __("URL for KML file");
24
  __("Loading");
25
+ __("Please select an editor to insert into.");
26
  __("Unable to get your location");
27
  __("No results");
28
  __("Save changes?");
36
  __("Satellite Streets");
37
  __("What's new");
38
  __("Version");
 
 
39
  __("MapPress");
40
  __("Untitled");
41
  __("Copy of %s");
42
  __("Map not found");
43
+ __("Post not found");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  __("Default");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  __("Easy Google Maps");
46
+ __("Active");
47
+ __("Communication error, please try again later: %s");
48
+ __("License is invalid or expired");
49
+ __("Address line ");
50
+ __("Latitude");
51
+ __("Longitude");
52
+ __("Title");
53
+ __("Body");
54
+ __("Icon");
55
+ __("Zoom");
56
+ __("OK, you deserve it!");
57
+ __("Nope, maybe later");
58
+ __("I need help using the plugin");
59
+ __("Help Spread the Word");
60
+ __("Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!");
61
  __("Get help");
62
  __("Your account");
63
  __("Upgrade to MapPress Pro");
 
 
64
  __("Address");
 
 
65
  __("Thumbnail");
 
66
  __("Url");
67
  __("Custom Field");
68
  __("Post type");
77
  __("No file provided");
78
  __("Files error: ");
79
  __("Automatic");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  __("Communication error, please try again later");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  __("JSON error");
82
  __("Widget title");
83
  __("Map size");
96
  __("Done");
97
  __("Reset");
98
  __("Results");
99
+ __("Search");
100
  __("Your Location");
101
+ __("Filter");
102
  __("Menu");
103
  __("Center map");
104
  __("Traffic");
106
  __("Transit");
107
  __("Show List");
108
  __("Show Map");
109
+ __("Continue reading");
110
+ __("By %s");
111
+ __("In");
112
+ __(" Tagged ");
113
  __("Visual");
114
  __("HTML");
115
  __("Add Media");
116
  __("Save");
117
  __("Cancel");
118
+ __("Delete");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  __("MapPress Maps for WordPress");
120
  ?>
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.58
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -17,7 +17,6 @@ Thanks to all the translators and to Matthias Stasiak for his wonderful icons (h
17
  */
18
 
19
  require_once dirname( __FILE__ ) . '/mappress_obj.php';
20
- require_once dirname( __FILE__ ) . '/mappress_controls.php';
21
  require_once dirname( __FILE__ ) . '/mappress_poi.php';
22
  require_once dirname( __FILE__ ) . '/mappress_map.php';
23
  require_once dirname( __FILE__ ) . '/mappress_settings.php';
@@ -29,7 +28,6 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
29
  include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
30
  include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
31
  include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
32
- include_once dirname( __FILE__ ) . '/pro/mappress_pro_settings.php';
33
  include_once dirname( __FILE__ ) . '/pro/mappress_query.php';
34
  include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
35
  include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
@@ -37,18 +35,18 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
37
  }
38
 
39
  class Mappress {
40
- const VERSION = '2.58';
41
 
42
  static
43
  $baseurl,
44
  $basename,
45
  $basedir,
46
  $debug,
 
47
  $loaded,
48
  $options,
49
  $notices,
50
  $pages,
51
- $pointers,
52
  $pro,
53
  $updater,
54
  $version
@@ -87,9 +85,6 @@ class Mappress {
87
  add_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));
88
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
89
 
90
- // Review
91
- add_action('current_screen', array(__CLASS__, 'current_screen'));
92
-
93
  // Plugin action links
94
  add_filter("plugin_action_links_" . self::$basename, array(__CLASS__, 'plugin_action_links'), 10, 2);
95
 
@@ -115,6 +110,51 @@ class Mappress {
115
 
116
  add_filter('autoptimize_filter_js_exclude', array(__CLASS__, 'autoptimize_filter_js_exclude'), 10, 2);
117
  add_filter('autoptimize_filter_css_exclude', array(__CLASS__, 'autoptimize_filter_css_exclude'), 10, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
  // Scripts & styles for admin
@@ -126,49 +166,34 @@ class Mappress {
126
  if (empty($hook))
127
  return;
128
 
129
- // Network admin has no pages
130
- if (empty(self::$pages))
131
  return;
132
 
133
- $is_editing = in_array($hook, array('post.php', 'post-new.php'));
134
- $is_settings = in_array($hook, self::$pages);
135
- $is_customizer = $hook == 'customize.php';
136
-
137
- if ($is_editing || $is_settings || $is_customizer) {
138
- self::scripts_enqueue('backend');
139
-
140
- // Settings - Gutenberg CSS for library + code editor
141
- if ($is_settings) {
142
- wp_enqueue_style( 'wp-edit-blocks' );
143
- if (function_exists('wp_enqueue_code_editor'))
144
- wp_enqueue_code_editor(array( 'type' => 'php' ));
145
- }
146
-
147
- // Leaflet CSS
148
- if (self::$options->engine == 'leaflet')
149
- wp_enqueue_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
150
- if (self::$options->clustering) {
151
- wp_enqueue_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
152
- wp_enqueue_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
153
  }
154
-
155
- // Mappress CSS
156
- wp_enqueue_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
157
- wp_enqueue_style('mappress-admin', self::$baseurl . '/css/mappress_admin.css', null, self::$version);
158
- }
159
-
160
- // Temporary, for mce pointer
161
- if ($is_editing) {
162
- wp_enqueue_style( 'wp-pointer' );
163
- wp_enqueue_script( 'wp-pointer' );
164
  }
165
  }
166
 
167
  static function admin_menu() {
168
  // Settings
169
- $settings = (self::$pro) ? new Mappress_Pro_Settings() : new Mappress_Settings();
170
- self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array(&$settings, 'options_page'), 'dashicons-location');
171
- self::$pages[] = add_submenu_page('mappress', __('Settings', 'mappress-google-maps-for-wordpress'), __('Settings', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress', array(&$settings, 'options_page'));
172
  self::$pages[] = add_submenu_page('mappress', __('Map Library', 'mappress-google-maps-for-wordpress'), __('Map Library', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress_maps', array(__CLASS__, 'map_library'));
173
  }
174
 
@@ -190,6 +215,7 @@ class Mappress {
190
  // Dismissibles
191
  if (is_super_admin()) {
192
  $content = "<div class='notice notice-%s is-dismissible' data-mapp-dismiss='%s'><p>%s</p></div>";
 
193
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
194
  $notices = (self::$notices) ? array_diff_key(self::$notices, array_flip($dismissed)) : array();
195
 
@@ -206,15 +232,26 @@ class Mappress {
206
  }
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  static function ajax_dismiss() {
210
  $key = isset($_POST['key']) ? $_POST['key'] : null;
211
 
212
  if (!$key || sanitize_key( $key) != $key)
213
  wp_die( 0 );
214
-
215
- $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
216
- $dismissed[] = $key;
217
- update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
218
  self::ajax_response('OK');
219
  }
220
 
@@ -262,35 +299,6 @@ class Mappress {
262
  );
263
  }
264
 
265
- static function current_screen($screen) {
266
- if ($screen && self::$pages && $screen->id == self::$pages[0] && !self::$pro) {
267
- $first_time = get_option('mappress_review');
268
- if (!$first_time) {
269
- update_option('mappress_review', time());
270
- return;
271
- }
272
-
273
- if (time() <= $first_time + (60 * 60 * 24 * 10))
274
- return;
275
-
276
- $ids = Mappress_Map::get_list(null, 'ids');
277
- if (count($ids) < 3)
278
- return;
279
-
280
- $review_link = sprintf("<a class='button button-primary mapp-dismiss' href='https://wordpress.org/support/view/plugin-reviews/mappress-google-maps-for-wordpress?filter=5' target='_blank'>%s</a>", __('OK, you deserve it!', 'mappress-google-maps-for-wordpress'));
281
- $no_link = sprintf("<a class='button mapp-dismiss' href='#'>%s</a>", __('Nope, maybe later', 'mappress-google-maps-for-wordpress'));
282
- $help_link = sprintf("<a class='mapp-dismiss' href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>", __('I neeed some help', 'mappress-google-maps-for-wordpress'));
283
- $body = "<div class='mapp-review'>";
284
- $body .= "<h3>" . __("Please Help Spread the Word", 'mappress-google-maps-for-wordpress') . "</h3>";
285
- $body .= "<p>" . __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!", 'mappress-google-maps-for-wordpress') . "</p>";
286
- $body .= "<p>" . __("If you have any issues or suggestions, please let me know. I'll be happy to help!", 'mappress-google-maps-for-wordpress') . "</p>";
287
- $body .= "<p>" . "~ Chris Richardson" . "</p>";
288
- $body .= "<div class='mapp-review-options'>" . $review_link . $no_link . $help_link . "</div>";
289
- $body .= "</div>";
290
- self::$notices['review'] = array('review', $body);
291
- }
292
- }
293
-
294
  static function debugging() {
295
  global $wpdb;
296
 
@@ -410,25 +418,27 @@ class Mappress {
410
  */
411
  static function init() {
412
  Mappress_Map::register();
 
413
  Mappress_Template::register();
414
  Mappress_WPML::register();
415
 
416
  if (self::$pro) {
417
  Mappress_Icons::register();
418
  Mappress_Meta::register();
419
- Mappress_Pro_Settings::register();
420
  Mappress_Query::register();
421
  Mappress_Widget::register();
422
  Mappress_Widget_Map::register();
423
  }
424
 
425
  self::scripts_register();
 
426
 
427
  // Register Gutenberg block types and load GT scripts
428
  if (function_exists('register_block_type')) {
429
  register_block_type('mappress/map', array(
430
  'render_callback' => array(__CLASS__, 'shortcode_map'),
431
- 'editor_script' => array('mappress_admin')
 
432
  ));
433
  if (self::$pro) {
434
  register_block_type('mappress/mashup', array(
@@ -457,6 +467,21 @@ class Mappress {
457
  Mappress::$options->save();
458
  }
459
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  // Missing license
461
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
462
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
@@ -466,18 +491,13 @@ class Mappress {
466
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
467
 
468
  // New features
469
- if ($current_version && $current_version < '2.55' and self::VERSION >= '2.55')
470
- self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! Please take a moment to learn %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("what's new", 'mappress-google-maps-for-wordpress') . '</a>'));
 
 
 
 
471
 
472
- // New MCE editor
473
- if ($current_version && $current_version < '2.57') {
474
- $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
475
- if (!in_array('257_new_editor', $dismissed)) {
476
- $header = sprintf("<h3>%s</h3>", __("The MapPress map editor has moved!", 'mappress-google-maps-for-wordpress'));
477
- $content = sprintf("<p>%s</p>", __('Use this button to open the new popup editor where you can easily create, edit and insert maps.', 'mappress-google-maps-for-wordpress'));
478
- self::$pointers['257_new_editor'] = $header . $content;
479
- }
480
- }
481
 
482
  update_option('mappress_version', self::VERSION);
483
  }
@@ -517,7 +537,7 @@ class Mappress {
517
  }
518
 
519
  static function l10n() {
520
- global $post;
521
 
522
  $l10n = array(
523
  'delete_prompt' => __('Are you sure you want to delete?', 'mappress-google-maps-for-wordpress'),
@@ -525,7 +545,7 @@ class Mappress {
525
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
526
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
527
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
528
- 'need_classic' => __('Please select a classic editor block to insert into.', 'mappress-google-maps-for-wordpress'),
529
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
530
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
531
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
@@ -540,10 +560,10 @@ class Mappress {
540
  'debug' => self::$debug,
541
  'editurl' => admin_url('post.php'),
542
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
 
543
  'language' => self::get_language(),
544
  'mapbox' => self::get_api_keys()->mapbox,
545
  'nonce' => wp_create_nonce('mappress'),
546
- 'pointers' => self::$pointers,
547
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
548
  'pro' => self::$pro,
549
  'ssl' => self::is_ssl(), // SSL is needed for 'your location' in directions
@@ -605,7 +625,10 @@ class Mappress {
605
  }
606
 
607
  // Global settings
608
- $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer', 'engine', 'filter', 'geocoder', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style', 'tooltips');
 
 
 
609
  foreach($options as $option) {
610
  if (isset(self::$options->$option)) {
611
  $l10n['options'][$option] = self::$options->$option;
@@ -621,6 +644,41 @@ class Mappress {
621
  wp_editor('', 'mapp-library-tinymce');
622
  }
623
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  static function scripts_register() {
625
  $dev = self::is_dev();
626
  $footer = self::is_footer();
@@ -656,7 +714,7 @@ class Mappress {
656
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
657
 
658
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
659
- wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'jquery-ui-sortable', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-editor', 'wp-element', 'wp-i18n'), self::$version, $footer);
660
 
661
  // I18N
662
  if (function_exists('wp_set_script_translations')) {
@@ -665,27 +723,6 @@ class Mappress {
665
  }
666
  }
667
 
668
- static function scripts_enqueue($type = 'frontend') {
669
- if (self::$loaded)
670
- return;
671
- else
672
- self::$loaded = true;
673
-
674
- wp_enqueue_script('mappress');
675
- wp_localize_script('mappress', 'mappl10n', self::l10n());
676
-
677
- if ($type == 'backend')
678
- wp_enqueue_script('mappress_admin');
679
-
680
- // Templates
681
- $templates = array('map', 'map-directions', 'map-filters', 'map-item', 'map-loop', 'map-popup', 'mashup-popup', 'mashup-loop', 'mashup-item');
682
- if ($type == 'backend')
683
- $templates = array_merge($templates, array('mce', 'editor', 'mce', 'widgets'));
684
-
685
- foreach($templates as $template_name)
686
- Mappress_Template::enqueue_template($template_name, self::is_footer());
687
- }
688
-
689
  static function plugin_action_links($links, $file) {
690
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
691
  $whatsnew_link = "<a href='https://mappresspro.com/whats-new/' target='_blank'>" . __("What's new", 'mappress-google-maps-for-wordpress') . "</a>";
@@ -830,6 +867,42 @@ class Mappress {
830
  return $data;
831
  }
832
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833
  /**
834
  * Automatic map display.
835
  * If set, the [mappress] shortcode will be prepended/appended to the post body, once for each map
@@ -892,28 +965,9 @@ class Mappress {
892
  * CSS is loaded from: child theme, theme, or plugin directory
893
  */
894
  static function wp_enqueue_scripts() {
895
- // Leaflet CSS
896
- if (self::$options->engine == 'leaflet') {
897
- wp_enqueue_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
898
- if (self::$options->clustering) {
899
- wp_enqueue_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
900
- wp_enqueue_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
901
- }
902
- }
903
-
904
- // Mappress CSS from plugin directory
905
- wp_enqueue_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
906
-
907
- // Mappress CSS from theme directory
908
- if ( @file_exists( get_stylesheet_directory() . '/mappress.css' ) )
909
- $file = get_stylesheet_directory_uri() . '/mappress.css';
910
- elseif ( @file_exists( get_template_directory() . '/mappress.css' ) )
911
- $file = get_template_directory_uri() . '/mappress.css';
912
-
913
- if (isset($file))
914
- wp_enqueue_style('mappress-custom', $file, array('mappress'), self::$version);
915
 
916
- // Load scripts in header
917
  if (!self::is_footer())
918
  self::scripts_enqueue();
919
  }
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.61
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
17
  */
18
 
19
  require_once dirname( __FILE__ ) . '/mappress_obj.php';
 
20
  require_once dirname( __FILE__ ) . '/mappress_poi.php';
21
  require_once dirname( __FILE__ ) . '/mappress_map.php';
22
  require_once dirname( __FILE__ ) . '/mappress_settings.php';
28
  include_once dirname( __FILE__ ) . '/pro/mappress_geocoder.php';
29
  include_once dirname( __FILE__ ) . '/pro/mappress_icons.php';
30
  include_once dirname( __FILE__ ) . '/pro/mappress_meta.php';
 
31
  include_once dirname( __FILE__ ) . '/pro/mappress_query.php';
32
  include_once dirname( __FILE__ ) . '/pro/mappress_updater.php';
33
  include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
35
  }
36
 
37
  class Mappress {
38
+ const VERSION = '2.61';
39
 
40
  static
41
  $baseurl,
42
  $basename,
43
  $basedir,
44
  $debug,
45
+ $iframe,
46
  $loaded,
47
  $options,
48
  $notices,
49
  $pages,
 
50
  $pro,
51
  $updater,
52
  $version
85
  add_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));
86
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
87
 
 
 
 
88
  // Plugin action links
89
  add_filter("plugin_action_links_" . self::$basename, array(__CLASS__, 'plugin_action_links'), 10, 2);
90
 
110
 
111
  add_filter('autoptimize_filter_js_exclude', array(__CLASS__, 'autoptimize_filter_js_exclude'), 10, 2);
112
  add_filter('autoptimize_filter_css_exclude', array(__CLASS__, 'autoptimize_filter_css_exclude'), 10, 2);
113
+
114
+ // Add KML/KMZ as valid mime types
115
+ add_filter('mime_types', array(__CLASS__, 'mime_types'));
116
+
117
+ if (self::$iframe)
118
+ add_action('wp_ajax_mapp_iframe', array(__CLASS__, 'ajax_iframe'));
119
+ }
120
+
121
+ static function ajax_iframe() {
122
+ check_ajax_referer('mappress', 'nonce');
123
+ if (!current_user_can('edit_posts'))
124
+ return;
125
+
126
+ ob_start();
127
+
128
+ Mappress::$options->footer = true;
129
+ Mappress::scripts_register();
130
+ Mappress::styles_enqueue('backend');
131
+ Mappress::scripts_enqueue('backend');
132
+
133
+ // Iframe needs to include some standard CSS
134
+ wp_enqueue_style('forms');
135
+ wp_enqueue_style('common');
136
+
137
+ ?>
138
+ <!doctype html>
139
+ <html class='mapp-iframe-html' <?php language_attributes(); ?>>
140
+ <head>
141
+ <title>MapPress</title>
142
+ <?php
143
+ Mappress::wp_head();
144
+ wp_print_styles();
145
+ ?>
146
+ </head>
147
+ <body>
148
+ <div id='mapp-iframe-react'></div>
149
+ <?php wp_print_footer_scripts(); ?>
150
+ <?php Mappress_Template::print_footer_templates(); ?>
151
+ </body>
152
+ </html>
153
+ <?php
154
+ $output = trim(ob_get_clean());
155
+ header( "Content-Type: text/html" );
156
+ $response = $output;
157
+ die ($response);
158
  }
159
 
160
  // Scripts & styles for admin
166
  if (empty($hook))
167
  return;
168
 
169
+ else if (empty(self::$pages)) // Network admin has no pages
 
170
  return;
171
 
172
+ $page = null;
173
+ if (in_array($hook, array('post.php', 'post-new.php')))
174
+ $page = 'editor';
175
+ else if ($hook == self::$pages[0])
176
+ $page = 'settings';
177
+ else if ($hook == self::$pages[2])
178
+ $page = 'library';
179
+ else if (in_array($hook, array('customize.php', 'appearance_page_gutenberg-widgets')))
180
+ $page = 'customizer';
181
+
182
+ if ($page) {
183
+ if ($page == 'settings') {
184
+ self::scripts_enqueue('settings');
185
+ self::styles_enqueue('settings');
186
+ } else {
187
+ self::scripts_enqueue('backend');
188
+ self::styles_enqueue('backend');
 
 
 
189
  }
 
 
 
 
 
 
 
 
 
 
190
  }
191
  }
192
 
193
  static function admin_menu() {
194
  // Settings
195
+ self::$pages[] = add_menu_page('MapPress', 'MapPress', 'manage_options', 'mappress', array('Mappress_Settings', 'options_page'), 'dashicons-location');
196
+ self::$pages[] = add_submenu_page('mappress', __('Settings', 'mappress-google-maps-for-wordpress'), __('Settings', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress', array('Mappress_Settings', 'options_page'));
 
197
  self::$pages[] = add_submenu_page('mappress', __('Map Library', 'mappress-google-maps-for-wordpress'), __('Map Library', 'mappress-google-maps-for-wordpress'), 'manage_options', 'mappress_maps', array(__CLASS__, 'map_library'));
198
  }
199
 
215
  // Dismissibles
216
  if (is_super_admin()) {
217
  $content = "<div class='notice notice-%s is-dismissible' data-mapp-dismiss='%s'><p>%s</p></div>";
218
+
219
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
220
  $notices = (self::$notices) ? array_diff_key(self::$notices, array_flip($dismissed)) : array();
221
 
232
  }
233
  }
234
 
235
+ static function admin_notices_dismiss($key, $dismiss) {
236
+ if (!$key)
237
+ return;
238
+
239
+ $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
240
+
241
+ if ($dismiss)
242
+ $dismissed[] = $key;
243
+ else
244
+ unset($dismissed[$key]);
245
+
246
+ update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
247
+ }
248
+
249
  static function ajax_dismiss() {
250
  $key = isset($_POST['key']) ? $_POST['key'] : null;
251
 
252
  if (!$key || sanitize_key( $key) != $key)
253
  wp_die( 0 );
254
+ self::admin_notices_dismiss($key, true);
 
 
 
255
  self::ajax_response('OK');
256
  }
257
 
299
  );
300
  }
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  static function debugging() {
303
  global $wpdb;
304
 
418
  */
419
  static function init() {
420
  Mappress_Map::register();
421
+ Mappress_Settings::register();
422
  Mappress_Template::register();
423
  Mappress_WPML::register();
424
 
425
  if (self::$pro) {
426
  Mappress_Icons::register();
427
  Mappress_Meta::register();
 
428
  Mappress_Query::register();
429
  Mappress_Widget::register();
430
  Mappress_Widget_Map::register();
431
  }
432
 
433
  self::scripts_register();
434
+ self::styles_register();
435
 
436
  // Register Gutenberg block types and load GT scripts
437
  if (function_exists('register_block_type')) {
438
  register_block_type('mappress/map', array(
439
  'render_callback' => array(__CLASS__, 'shortcode_map'),
440
+ 'editor_script' => array('mappress_admin'),
441
+
442
  ));
443
  if (self::$pro) {
444
  register_block_type('mappress/mashup', array(
467
  Mappress::$options->save();
468
  }
469
 
470
+ // Check for license expired
471
+ if (self::$pro && self::$options->license) {
472
+ $last_check = get_option('mappress_license_check');
473
+ if (!$last_check || time() > $last_check + (60 * 60 * 24 * 7)) {
474
+ $status = Mappress::$updater->get_status();
475
+ if ($status != 'active') {
476
+ self::admin_notices_dismiss('license_expired', false);
477
+ $renew_link = sprintf("<a target='_blank' href='http://mappresspro.com/account'>%s</a>", __('renew your license', 'mappress-google-maps-for-wordpress'));
478
+ self::$notices['expiredlicense'] = array('warning', sprintf(__('Your MapPress license has expired. Please %s to get the latest updates and prevent errors.', 'mappress-google-maps-for-wordpress'), $renew_link));
479
+ }
480
+ update_option('mappress_license_check', time());
481
+ return;
482
+ }
483
+ }
484
+
485
  // Missing license
486
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
487
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
491
  self::$notices['255_min_version'] = array('error', __('MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.', 'mappress-google-maps-for-wordpress'));
492
 
493
  // New features
494
+ if ($current_version && $current_version < '2.55' && self::VERSION >= '2.55')
495
+ self::$notices['255_whats_new'] = array('info', sprintf(__('MapPress has many new features! %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
496
+
497
+ // New features
498
+ if ($current_version && $current_version > '2.57' && $current_version < '2.60' && self::VERSION >= '2.60')
499
+ self::$notices['260_whats_new'] = array('warning', sprintf(__('MapPress popup templates have changed! Please update custom templates to the new format. %s.', 'mappress-google-maps-for-wordpress'), '<a target="_blank" href="https://mappresspro.com/whats-new">' . __("Learn more", 'mappress-google-maps-for-wordpress') . '</a>'));
500
 
 
 
 
 
 
 
 
 
 
501
 
502
  update_option('mappress_version', self::VERSION);
503
  }
537
  }
538
 
539
  static function l10n() {
540
+ global $post, $is_IE;
541
 
542
  $l10n = array(
543
  'delete_prompt' => __('Are you sure you want to delete?', 'mappress-google-maps-for-wordpress'),
545
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
546
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
547
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
548
+ 'need_classic' => __('Please select an editor to insert into.', 'mappress-google-maps-for-wordpress'),
549
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
550
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
551
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
560
  'debug' => self::$debug,
561
  'editurl' => admin_url('post.php'),
562
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
563
+ 'isIE' => $is_IE,
564
  'language' => self::get_language(),
565
  'mapbox' => self::get_api_keys()->mapbox,
566
  'nonce' => wp_create_nonce('mappress'),
 
567
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
568
  'pro' => self::$pro,
569
  'ssl' => self::is_ssl(), // SSL is needed for 'your location' in directions
625
  }
626
 
627
  // Global settings
628
+ $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer',
629
+ 'engine', 'filter', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'iwType', 'layout',
630
+ 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style', 'thumbs', 'thumbStyle', 'tooltips');
631
+
632
  foreach($options as $option) {
633
  if (isset(self::$options->$option)) {
634
  $l10n['options'][$option] = self::$options->$option;
644
  wp_editor('', 'mapp-library-tinymce');
645
  }
646
 
647
+ static function mime_types($mimes) {
648
+ // Additional entries must match WP, which use finfo_file(), e.g. KML => text/xml
649
+ $mimes['kml'] = 'text/xml'; // Real type: 'application/vnd.google-earth.kml+xml';
650
+ $mimes['kmz'] = 'application/zip'; // Real type: 'application/vnd.google-earth.kmz';
651
+ return $mimes;
652
+ }
653
+
654
+ static function scripts_enqueue($type = 'frontend') {
655
+ if (self::$loaded)
656
+ return;
657
+ else
658
+ self::$loaded = true;
659
+
660
+ wp_enqueue_script('mappress');
661
+
662
+ // L10N - can't be done at register because $post global isn't set
663
+ wp_localize_script('mappress', 'mappl10n', self::l10n());
664
+
665
+ if ($type == 'backend' || $type == 'settings')
666
+ wp_enqueue_script('mappress_admin');
667
+
668
+ if ($type == 'settings') {
669
+ if (function_exists('wp_enqueue_code_editor'))
670
+ wp_enqueue_code_editor(array( 'type' => 'php' ));
671
+ }
672
+
673
+ // Templates
674
+ $templates = array('map', 'map-directions', 'map-filters', 'map-item', 'map-loop', 'map-popup', 'mashup-popup', 'mashup-loop', 'mashup-item');
675
+ if ($type == 'backend')
676
+ $templates = array_merge($templates, array('mce', 'editor'));
677
+
678
+ foreach($templates as $template_name)
679
+ Mappress_Template::enqueue_template($template_name, self::is_footer());
680
+ }
681
+
682
  static function scripts_register() {
683
  $dev = self::is_dev();
684
  $footer = self::is_footer();
714
  $deps[] = (self::$options->engine == 'leaflet') ? 'mappress-leaflet-markercluster' : 'mappress-markerclustererplus';
715
 
716
  wp_register_script('mappress', $js . "/index_mappress.js", $deps, self::$version, $footer);
717
+ wp_register_script('mappress_admin', $js . "/index_mappress_admin.js", array('mappress', 'jquery-ui-position', 'jquery-ui-sortable', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-url', 'wp-core-data', 'wp-i18n'), self::$version, $footer);
718
 
719
  // I18N
720
  if (function_exists('wp_set_script_translations')) {
723
  }
724
  }
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  static function plugin_action_links($links, $file) {
727
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
728
  $whatsnew_link = "<a href='https://mappresspro.com/whats-new/' target='_blank'>" . __("What's new", 'mappress-google-maps-for-wordpress') . "</a>";
867
  return $data;
868
  }
869
 
870
+ static function styles_enqueue($type = 'frontend') {
871
+ wp_enqueue_style('mappress-leaflet');
872
+ wp_enqueue_style('mappress-leaflet-markercluster-default');
873
+ wp_enqueue_style('mappress-leaflet-markercluster');
874
+ wp_enqueue_style('mappress');
875
+
876
+ if ($type == 'frontend')
877
+ wp_enqueue_style('mappress-custom');
878
+ else if ($type == 'backend' || $type == 'settings')
879
+ wp_enqueue_style('mappress-admin');
880
+ }
881
+
882
+ static function styles_register() {
883
+ // Leaflet CSS
884
+ if (self::$options->engine == 'leaflet') {
885
+ wp_register_style('mappress-leaflet', 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', null, '1.7.1');
886
+ if (self::$options->clustering) {
887
+ wp_register_style('mappress-leaflet-markercluster-default', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.Default.css", null, '1.4.1');
888
+ wp_register_style('mappress-leaflet-markercluster', self::$baseurl . "/lib/Leaflet.markercluster/MarkerCluster.css", null, '1.4.1');
889
+ }
890
+ }
891
+
892
+ // Mappress CSS from plugin directory
893
+ wp_register_style('mappress', self::$baseurl . '/css/mappress.css', null, self::$version);
894
+
895
+ // Mappress CSS from theme directory
896
+ if ( @file_exists( get_stylesheet_directory() . '/mappress.css' ) )
897
+ $file = get_stylesheet_directory_uri() . '/mappress.css';
898
+ elseif ( @file_exists( get_template_directory() . '/mappress.css' ) )
899
+ $file = get_template_directory_uri() . '/mappress.css';
900
+ if (isset($file))
901
+ wp_register_style('mappress-custom', $file, array('mappress'), self::$version);
902
+
903
+ wp_register_style('mappress-admin', self::$baseurl . '/css/mappress_admin.css', array('wp-edit-blocks'), self::$version);
904
+ }
905
+
906
  /**
907
  * Automatic map display.
908
  * If set, the [mappress] shortcode will be prepended/appended to the post body, once for each map
965
  * CSS is loaded from: child theme, theme, or plugin directory
966
  */
967
  static function wp_enqueue_scripts() {
968
+ self::styles_enqueue('frontend');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
969
 
970
+ // Load scripts in header if needed
971
  if (!self::is_footer())
972
  self::scripts_enqueue();
973
  }
mappress_controls.php DELETED
@@ -1,276 +0,0 @@
1
- <?php
2
- /**
3
- * Generic HTML controls
4
- */
5
- class Mappress_Controls {
6
-
7
- static function parse_atts($name, $args = '') {
8
- $args = empty($args) ? array() : $args;
9
-
10
- // Include name if set
11
- $atts = (empty($name)) ? '' : "name='" . esc_attr($name) . "'";
12
-
13
- foreach($args as $key => $value) {
14
- // Attributes with value
15
- if (isset($value) && in_array($key, array('class', 'id', 'maxlength', 'multiple', 'onclick', 'placeholder', 'rows', 'size', 'style', 'title', 'type')))
16
- $atts .= " $key='" . esc_attr($value) . "' ";
17
-
18
- // Boolean attributes
19
- if (in_array($key, array('checked', 'disabled', 'multiple', 'readonly', 'selected')) && $value)
20
- if (!empty($value))
21
- $atts .= " $key ";
22
-
23
- // Data (not escaped)
24
- if (substr($key, 0, 4) == 'data')
25
- $atts .= " $key='$value' ";
26
- }
27
-
28
- return $atts;
29
- }
30
-
31
- static function button($name, $label, $args = '') {
32
- $args = (object) wp_parse_args($args, array('class' => '', 'type' => 'button'));
33
- $args->class = 'button ' . $args->class;
34
- $atts = self::parse_atts($name, $args);;
35
- $label = esc_attr($label);
36
- $html = "<input value='$label' $atts />";
37
- return $html;
38
- }
39
-
40
- // Boolean checkbox
41
- static function checkmark($name, $value, $label = '', $args = '') {
42
- $atts = self::parse_atts($name, $args);
43
- return "<input type='hidden' name='$name' value='false' /><label><input type='checkbox' value='true' " . checked($value, true, false) . " $atts />$label</label> ";
44
- }
45
-
46
- // Checkbox
47
- static function checkbox($name, $value, $checked, $label = '', $args = '') {
48
- $args = (object) wp_parse_args($args, array('checked' => ''));
49
- $args->checked = (is_array($checked)) ? in_array($value, $checked) : $value == $checked;
50
- $atts = self::parse_atts($name, $args);
51
- return "<label><input type='checkbox' value='" . esc_attr($value) . "' $atts />$label</label> ";
52
- }
53
-
54
- // Checkbox list
55
- static function checkboxes($name, $labels, $selected = null, $args = '') {
56
- $selected = ($selected) ? $selected : array();
57
- $name .= '[]';
58
-
59
- $html = "";
60
- foreach ($labels as $value => $label)
61
- $html .= self::checkbox($name, $value, in_array($value, $selected), $label, $args);
62
- return $html;
63
- }
64
-
65
- static function grid($headers, $rows, $args = '') {
66
- $atts = (object) wp_parse_args($args, array('style' => (count($rows) < 2) ? 'display:none' : null));
67
- $atts = self::parse_atts(null, $atts);
68
-
69
- // Prefix sortable rows with a drag icon
70
- $sortable = (isset($args['sortable']) && $args['sortable']);
71
-
72
- // Add a sortable header column
73
- if ($sortable)
74
- array_unshift($headers, '');
75
-
76
- // Add an action header column
77
- $headers[] = '';
78
-
79
- $html = "<div data-mapp-grid class='mapp-grid'>";
80
- $html .= "<table $atts>";
81
- $html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
82
- $html .= "<tbody>";
83
-
84
- foreach($rows as $i => $row) {
85
- // Grab the last (presumably blank) row as a template
86
- if ($i == count($rows) - 1)
87
- $template = self::grid_row($row, $sortable);
88
- else
89
- $html .= self::grid_row($row, $sortable);
90
- }
91
- $html .= "</tbody>";
92
- $html .= "</table>";
93
- $html .= "<button type='button' class='button' data-mapp-action='add'>" . __('Add', 'mappress-google-maps-for-wordpress') . "</button>";
94
- $html .= Mappress::script_template($template);
95
- $html .= "</div>";
96
- return $html;
97
- }
98
-
99
- static function grid_row($row, $sortable) {
100
- if ($sortable)
101
- array_unshift($row, '<span class="mapp-handle dashicons dashicons-menu"></span>');
102
- $row[] = "<span data-mapp-action='remove' class='mapp-close' title='" . __('Delete', 'mappress-google-maps-for-wordpress') . "'></span>";
103
- return self::table_row($row);
104
- }
105
-
106
- static function help($text = '', $url = '') {
107
- $icon = '<span class="dashicons dashicons-editor-help"></span>';
108
- $html = '';
109
- if ($url) {
110
- if (substr($url, 0, 1) == '#')
111
- $url = "http://mappresspro.com/mappress-documentation$url";
112
- $html .= sprintf("<a class='mapp-help' href='%s' target='_blank'>%s</a>", $url, $icon);
113
- }
114
- if ($text)
115
- $html .= "<div class='mapp-help'><i>$text</i></div>";
116
- return $html;
117
- }
118
-
119
- static function icon_picker($name = '', $value = '', $args = '') {
120
- $atts = self::parse_atts($name, $args);
121
- $name = esc_attr($name);
122
- $iconid = esc_attr($value);
123
- $icon = Mappress_Icons::get($value);
124
- $html = "<img class='mapp-icon' data-mapp-iconpicker data-mapp-iconid='$iconid' tabindex='0' src='$icon'><input type='hidden' name='$name' value='$iconid' $atts />";
125
- return $html;
126
- }
127
-
128
- static function input($name, $value, $args = '') {
129
- $args = (object) wp_parse_args($args, array('label' => '', 'type' => 'text'));
130
- $atts = self::parse_atts($name, $args);
131
- $value = esc_attr($value);
132
- return "<label><input $atts value='$value' /> {$args->label}</label>";
133
- }
134
-
135
- static function radio($name, $key, $label, $args = '') {
136
- $atts = self::parse_atts($name, $args);
137
- $key = esc_attr($key);
138
- $html = "<label><input type='radio' value='$key' $atts />$label</label> ";
139
- return $html;
140
- }
141
-
142
- static function radios($name, $data, $selected = null, $args = '') {
143
- $atts = self::parse_atts($name, $args);
144
- $html = "";
145
- foreach ((array)$data as $key => $label) {
146
- $key = esc_attr($key);
147
- $html .= "<label><input type='radio' value='$key' " . checked($selected, $key, false) . " $atts />$label</label> ";
148
- }
149
- return $html;
150
- }
151
-
152
- static function select($name, $data, $selected = '', $args = '') {
153
- $args = (object) wp_parse_args($args, array('none' => false));
154
- $atts = self::parse_atts($name, $args);
155
-
156
- if (!is_array($data) || empty($data))
157
- $data = array();
158
-
159
- if ($args->none) {
160
- $none = ($args->none === true) ? '&nbsp;' : $args->none;
161
- $data = array('' => $none) + $data;
162
- }
163
-
164
- $html = "\r\n<select $atts>\r\n";
165
- foreach ((array)$data as $key => $label) {
166
- if (substr($key, 0, 8) == 'optgroup') {
167
- $html .= "<optgroup label='" . esc_attr($label) . "'>";
168
- continue;
169
- }
170
- $select = (is_array($selected)) ? in_array($key, $selected) : $key === $selected;
171
- $select = ($select) ? 'selected' : '';
172
-
173
- $value = esc_attr($key);
174
- $label = esc_attr($label);
175
- $html .= "<option value='$value' title='$label' $select>$label</option>\r\n";
176
- }
177
- $html .= "</select>\r\n";
178
- return $html;
179
- }
180
-
181
- static function table($headers, $rows, $args = '') {
182
- $atts = self::parse_atts(null, $args);
183
-
184
- $html = "<table $atts>";
185
- $html .= "<thead>" . self::table_row($headers, 'th') . "</thead>";
186
- $html .= "<tbody>";
187
- foreach($rows as $row)
188
- $html .= self::table_row($row);
189
- $html .= "</tbody>";
190
- $html .= "</table>";
191
- return $html;
192
- }
193
-
194
- static function table_row($row, $tag = 'td') {
195
- $html = "<tr>";
196
- foreach($row as $col)
197
- $html .= "<$tag>$col</$tag>";
198
- $html .= "</tr>";
199
- return $html;
200
- }
201
-
202
- static function get_meta_keys() {
203
- global $wpdb;
204
- $keys = $wpdb->get_col( "
205
- SELECT DISTINCT meta_key
206
- FROM $wpdb->postmeta
207
- WHERE meta_key NOT in ('_edit_last', '_edit_lock', '_encloseme', '_pingme', '_thumbnail_id')
208
- AND meta_key NOT LIKE ('\_wp%')"
209
- );
210
- $results = (is_array($keys) && !empty($keys)) ? array_combine($keys, $keys) : array();
211
- return $results;
212
- }
213
-
214
- static function get_meta_values($meta_key) {
215
- global $wpdb;
216
- $sql = "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value != '' ORDER BY meta_value";
217
- $meta_values = $wpdb->get_col($wpdb->prepare($sql, $meta_key));
218
- $results = ($meta_values) ? array_combine($meta_values, $meta_values) : array();
219
- return $results;
220
- }
221
-
222
- static function get_post_types() {
223
- $results = array();
224
- $post_types = get_post_types(array('show_ui' => true), 'objects');
225
- unset($post_types['mappress_map'], $post_types['attachment']);
226
- foreach($post_types as $type => $obj)
227
- $results[$type] = $obj->label;
228
- return $results;
229
- }
230
-
231
- static function get_taxonomies() {
232
- $results = array();
233
- $tax_objs = get_taxonomies(array('public' => true), 'objects');
234
- unset($tax_objs['post_format']);
235
- foreach($tax_objs as $tax_obj)
236
- $results[$tax_obj->name] = $tax_obj->label;
237
- return $results;
238
- }
239
-
240
- static function get_terms($taxonomy, $fields='slugs') {
241
- $results = array();
242
- $terms = get_terms($taxonomy, array('hide_empty' => false, 'exclude' => 1));
243
- if (is_array($terms)) {
244
- $walker = new Mappress_Walker($fields);
245
- $walk = $walker->walk($terms, 0, array('indent' => true));
246
- if (is_array($walk))
247
- $results = $walk;
248
- }
249
- return $results;
250
- }
251
- }
252
-
253
- /**
254
- * Walker for taxonomy values.
255
- * Call with array of terms objects: $walker->walk($terms, 0);
256
- * Returns array of (term slug => name)
257
- */
258
- class Mappress_Walker extends Walker {
259
- public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
260
- public $fields;
261
-
262
- function __construct($fields=false) {
263
- $this->fields = $fields;
264
- }
265
-
266
- function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0 ) {
267
- if (!is_array($output))
268
- $output = array();
269
-
270
- // If 'indent' set, use spaces (for hierarchical lists like taxonomies)
271
- $indent = (isset($args['indent']) && $args['indent']) ? str_repeat('&mdash;', $depth) : '';
272
- $value = ($this->fields == 'names') ? $term->name : $term->slug;
273
- $output[$term->slug] = $indent . $value . ' (' . $term->count . ')';
274
- }
275
- }
276
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mappress_map.php CHANGED
@@ -49,6 +49,7 @@ class Mappress_Map extends Mappress_Obj {
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
 
52
  add_action('wp_ajax_mapp_mutate', array(__CLASS__, 'ajax_mutate'));
53
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
54
 
@@ -81,10 +82,10 @@ class Mappress_Map extends Mappress_Obj {
81
  }
82
 
83
  static function media_buttons($editor_id) {
84
- if ($editor_id == 'content') {
85
- echo '<button type="button" class="button mapp-media-button">';
86
- echo '<span class="wp-media-buttons-icon dashicons dashicons-location"></span> ' . __('MapPress', 'mappress-google-maps-for-wordpress') . '</button>';
87
- }
88
  }
89
 
90
  static function duplicate($mapid, $postid) {
@@ -231,6 +232,22 @@ class Mappress_Map extends Mappress_Obj {
231
  }
232
  }
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  function save() {
235
  global $wpdb;
236
  $maps_table = $wpdb->prefix . 'mappress_maps';
@@ -240,6 +257,10 @@ class Mappress_Map extends Mappress_Obj {
240
  foreach($this->pois as &$poi)
241
  $poi->body = wpautop($poi->body);
242
 
 
 
 
 
243
  $map = serialize($this);
244
 
245
  // Update map
@@ -255,6 +276,9 @@ class Mappress_Map extends Mappress_Obj {
255
  if ($result === false || !$this->mapid)
256
  return false;
257
 
 
 
 
258
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
259
  $this->postid, $this->mapid));
260
 
@@ -304,9 +328,10 @@ class Mappress_Map extends Mappress_Obj {
304
  if ($result === false)
305
  return false;
306
 
307
- $result = $wpdb->query($wpdb->prepare("DELETE FROM $maps_table WHERE mapid = %d", $mapid));
308
- if ($result === false)
309
- return false;
 
310
 
311
  $wpdb->query("COMMIT");
312
  return true;
@@ -350,18 +375,12 @@ class Mappress_Map extends Mappress_Obj {
350
  Mappress::ajax_response('Error, map not found!');
351
 
352
  $map->update($mapdata);
353
-
354
- // Current save() allows multiple attachments, so delete existing attachments first
355
- $result = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $map->mapid));
356
- if (!$result)
357
- Mappress::ajax_response('Internal error in posts table, your data has not been saved!');
358
-
359
  $result = $map->save();
360
 
361
  if (!$result)
362
  Mappress::ajax_response('Internal errorsaving, your data has not been saved!');
363
 
364
- // Return update map
365
  Mappress::ajax_response('OK', $map);
366
  }
367
 
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
52
+ add_action('wp_ajax_mapp_get_post', array(__CLASS__, 'ajax_get_post'));
53
  add_action('wp_ajax_mapp_mutate', array(__CLASS__, 'ajax_mutate'));
54
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
55
 
82
  }
83
 
84
  static function media_buttons($editor_id) {
85
+ if (Mappress::$iframe)
86
+ echo '<button class="button mapp-iframe-button" class="button mapp-media-button"><span class="wp-media-buttons-icon dashicons dashicons-location"></span> ' . __('MapPress', 'mappress-google-maps-for-wordpress') . '</button>';
87
+ else
88
+ echo '<div class="mapp-mce"></div>';
89
  }
90
 
91
  static function duplicate($mapid, $postid) {
232
  }
233
  }
234
 
235
+ static function ajax_get_post() {
236
+ global $post;
237
+
238
+ check_ajax_referer('mappress', 'nonce');
239
+ ob_start();
240
+ $postid = (isset($_GET['postid'])) ? $_GET['postid'] : null;
241
+ $post = get_post( $postid );
242
+
243
+ if (!$post)
244
+ die(sprintf(__('Post not found', 'mappress-google-maps-for-wordpress'), $postid));
245
+
246
+ setup_postdata($post);
247
+ $html = Mappress_Template::get_template('mashup-modal');
248
+ die($html);
249
+ }
250
+
251
  function save() {
252
  global $wpdb;
253
  $maps_table = $wpdb->prefix . 'mappress_maps';
257
  foreach($this->pois as &$poi)
258
  $poi->body = wpautop($poi->body);
259
 
260
+ // Make sure there's a postid
261
+ if (is_null($this->postid))
262
+ return false;
263
+
264
  $map = serialize($this);
265
 
266
  // Update map
276
  if ($result === false || !$this->mapid)
277
  return false;
278
 
279
+ // Delete any existing post assignment to prevent multiple attachment
280
+ $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $this->mapid));
281
+
282
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
283
  $this->postid, $this->mapid));
284
 
328
  if ($result === false)
329
  return false;
330
 
331
+ // Don't delete the actual map data
332
+ // $result = $wpdb->query($wpdb->prepare("DELETE FROM $maps_table WHERE mapid = %d", $mapid));
333
+ // if ($result === false)
334
+ // return false;
335
 
336
  $wpdb->query("COMMIT");
337
  return true;
375
  Mappress::ajax_response('Error, map not found!');
376
 
377
  $map->update($mapdata);
 
 
 
 
 
 
378
  $result = $map->save();
379
 
380
  if (!$result)
381
  Mappress::ajax_response('Internal errorsaving, your data has not been saved!');
382
 
383
+ // Return updated map
384
  Mappress::ajax_response('OK', $map);
385
  }
386
 
mappress_poi.php CHANGED
@@ -75,7 +75,7 @@ class Mappress_Poi extends Mappress_Obj {
75
  function get_thumbnail($post) {
76
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
77
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
78
- return get_the_post_thumbnail($post, $size, array('style' => $style));
79
  }
80
  }
81
  ?>
75
  function get_thumbnail($post) {
76
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
77
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
78
+ return get_the_post_thumbnail($post, $size, array('style' => $style)); // Slow due to get_post_thumbnail_id()
79
  }
80
  }
81
  ?>
mappress_settings.php CHANGED
@@ -21,6 +21,8 @@ class Mappress_Options extends Mappress_Obj {
21
  $filter,
22
  $footer = true,
23
  $geocoder,
 
 
24
  $iconScale,
25
  $initialOpenInfo,
26
  $iwType = 'iw',
@@ -40,15 +42,22 @@ class Mappress_Options extends Mappress_Obj {
40
  $postTypes = array('post', 'page'),
41
  $radius = 15,
42
  $search = true,
43
- $size = 1,
44
- $sizes = array(array('width' => 300, 'height' => 300), array('width' => 425, 'height' => 350), array('width' => 640, 'height' => 480)),
 
 
 
 
 
 
45
  $sort,
46
  $style,
47
  $styles = array(),
48
  $thumbs = true,
49
- $thumbSize,
50
- $thumbWidth = 64,
51
- $thumbHeight = 64,
 
52
  $tooltips = false,
53
  $wpml = true
54
  ;
@@ -66,271 +75,271 @@ class Mappress_Options extends Mappress_Obj {
66
  function save() {
67
  return update_option('mappress_options', get_object_vars($this));
68
  }
69
- } // End class Mappress_Options
70
 
71
 
72
  /**
73
  * Options menu display
74
  */
75
  class Mappress_Settings {
76
- static $basename = 'mappress_options';
77
- var $options;
78
-
79
- function __construct() {
80
- $this->options = Mappress_Options::get();
81
- add_action('admin_init', array($this, 'admin_init'));
82
- }
83
-
84
- function admin_init() {
85
- register_setting('mappress', self::$basename, array($this, 'validate'));
86
-
87
- $this->add_section('demo', __('Sample Map', 'mappress-google-maps-for-wordpress'));
88
 
89
- $this->add_section('basic', __('Basic Settings', 'mappress-google-maps-for-wordpress'));
90
- $this->add_field('engine', __('Mapping API', 'mappress-google-maps-for-wordpress'), 'basic');
 
 
91
 
92
- if ($this->options->engine == 'google')
93
- $this->add_field('apiKey', __('Google API key', 'mappress-google-maps-for-wordpress'), 'basic');
94
-
95
- if ($this->options->engine == 'leaflet')
96
- $this->add_field('mapbox', __('Mapbox access token', 'mappress-google-maps-for-wordpress'), 'basic');
97
-
98
- // License: single blogs, or main blog on multisite
99
- if (Mappress::$pro && (!is_multisite() || (is_super_admin() && is_main_site())) )
100
- $this->add_section('license', __('License', 'mappress-google-maps-for-wordpress'));
101
-
102
- $this->add_section('maps', __('Map Settings', 'mappress-google-maps-for-wordpress'));
103
- $this->add_field('postTypes', __('Post types', 'mappress-google-maps-for-wordpress'), 'maps');
104
- $this->add_field('autodisplay', __('Automatic display', 'mappress-google-maps-for-wordpress'), 'maps');
105
- $this->add_field('alignment', __('Map alignment', 'mappress-google-maps-for-wordpress'), 'maps');
106
- $this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
107
- // TBD $this->add_field('mapOptions', __('Map options'), 'maps');
108
 
109
- $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
110
- $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
111
- $this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
112
- // TBD $this->add_field('tooltips', __('Tooltips'), 'pois');
113
 
114
- if (Mappress::$pro) {
115
- $this->add_section('mashups', __('Mashups', 'mappress-google-maps-for-wordpress'));
116
- $this->add_section('icons', __('Icons', 'mappress-google-maps-for-wordpress'));
117
- $this->add_section('styles', __('Styled Maps', 'mappress-google-maps-for-wordpress'));
118
- $this->add_section('geocoding', __('Geocoding', 'mappress-google-maps-for-wordpress'));
119
- $this->add_section('templates', __('Templates', 'mappress-google-maps-for-wordpress'));
120
- }
121
 
122
- $this->add_section('l10n', __('Localization', 'mappress-google-maps-for-wordpress'));
123
- $this->add_field('language', __('Search language', 'mappress-google-maps-for-wordpress'), 'l10n');
124
- $this->add_field('country', __('Search country', 'mappress-google-maps-for-wordpress'), 'l10n');
125
- $this->add_field('directionsServer', __('Directions server', 'mappress-google-maps-for-wordpress'), 'l10n');
126
 
127
- $this->add_section('misc', __('Miscellaneous', 'mappress-google-maps-for-wordpress'));
128
- $this->add_field('sizes', __('Map sizes', 'mappress-google-maps-for-wordpress'), 'misc');
129
- $this->add_field('footer', __('Scripts', 'mappress-google-maps-for-wordpress'), 'misc');
130
- $this->add_field('wpml', 'WPML', 'misc');
131
-
132
- if ($this->options->engine != 'leaflet')
133
- $this->add_field('deregister', __('Compatiblity', 'mappress-google-maps-for-wordpress'), 'misc');
134
  }
135
 
136
- function add_section($section, $title) {
137
- $callback = ($section == 'demo') ? array($this, 'set_preview') : null;
138
- add_settings_section($section, $title, $callback, 'mappress');
139
- }
 
140
 
141
- function add_field($field, $label, $section) {
142
- $callback = 'set_' . strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $field));
143
- add_settings_field($field, $label, array($this, $callback), 'mappress', $section, self::$basename . "[$field]");
 
144
  }
145
 
146
- function validate($input) {
147
- // If reset defaults was clicked
148
- if (isset($_POST['reset_defaults'])) {
149
- $options = new Mappress_Options();
150
- return get_object_vars($this);
151
- }
152
 
153
- // Trim fields if present
154
- foreach(array('apiKey', 'apiKeyServer') as $key) {
155
- if (isset($input[$key]))
156
- $input[$key] = trim($input[$key]);
157
- }
158
 
159
- // If NO post types selected, set value to empty array
160
- if (!isset($input['postTypes']))
161
- $input['postTypes'] = array();
 
162
 
163
- // Force checkboxes to boolean
164
- foreach($input as &$item)
165
- $item = Mappress::string_to_boolean($item);
 
 
166
 
167
- // For arrays passed as checkboxes set empty array for no selection
168
- $input['postTypes'] = (isset($input['postTypes'])) ? $input['postTypes'] : array();
 
169
 
170
- // Merge in old values so they're not lost
171
- $input = array_merge((array)$this->options, $input);
172
- return $input;
173
  }
174
 
175
- function set_alignment($name) {
176
- $alignments = array(
177
- '' => __('Default', 'mappress-google-maps-for-wordpress'),
178
- 'center' => __('Center', 'mappress-google-maps-for-wordpress'),
179
- 'left' => __('Left', 'mappress-google-maps-for-wordpress'),
180
- 'right' => __('Right', 'mappress-google-maps-for-wordpress')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  );
182
- echo Mappress_Controls::radios($name, $alignments, $this->options->alignment);
183
- }
184
 
185
- function set_api_key($name) {
186
- echo Mappress_Controls::input($name, $this->options->apiKey, array('size' => '50'));
187
- echo Mappress_Controls::help('', 'https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys');
188
  }
189
 
190
- function set_autodisplay($name) {
191
- $autos = array(
192
- '' => __('None', 'mappress-google-maps-for-wordpress'),
193
- 'top' => __('Top of post', 'mappress-google-maps-for-wordpress'),
194
- 'bottom' => __('Bottom of post', 'mappress-google-maps-for-wordpress')
195
- );
196
- echo Mappress_Controls::radios($name, $autos, $this->options->autodisplay);
197
- }
198
 
199
- function set_country($name) {
200
- $url = 'https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements';
201
- $link = sprintf('<a style="vertical-align:text-bottom" target="_blank" href="%s">%s</a>', $url, __("(list)", 'mappress-google-maps-for-wordpress'));
202
- $codes = array('', 'AF' ,'AX' ,'AL' ,'DZ' ,'AS' ,'AD' ,'AO' ,'AI' ,'AQ' ,'AG' ,'AR' ,'AM' ,'AW' ,'AU' ,'AT' ,'AZ' ,'BS' ,'BH' ,'BD' ,'BB' ,'BY' ,'BE' ,'BZ' ,'BJ' ,'BM' ,'BT' ,'BO' ,'BQ' ,'BA' ,'BW' ,'BV' ,'BR' ,'IO' ,'VG' ,'BN' ,'BG' ,'BF' ,'BI' ,'KH' ,'CM' ,'CA' ,'CV' ,'KY' ,'CF' ,'TD' ,'CL' ,'CN' ,'CX' ,'CC' ,'CO' ,'KM' ,'CK' ,'CR' ,'HR' ,'CU' ,'CW' ,'CY' ,'CZ' ,'CD' ,'DK' ,'DJ' ,'DM' ,'DO' ,'EC' ,'EG' ,'SV' ,'GQ' ,'ER' ,'EE' ,'ET' ,'FK' ,'FO' ,'FJ' ,'FI' ,'FR' ,'GF' ,'PF' ,'TF' ,'GA' ,'GM' ,'GE' ,'DE' ,'GH' ,'GI' ,'GR' ,'GL' ,'GD' ,'GP' ,'GU' ,'GT' ,'GG' ,'GN' ,'GW' ,'GY' ,'HT' ,'HM' ,'HN' ,'HK' ,'HU' ,'IS' ,'IN' ,'ID' ,'IR' ,'IQ' ,'IE' ,'IM' ,'IL' ,'IT' ,'CI' ,'JM' ,'JP' ,'JE' ,'JO' ,'KZ' ,'KE' ,'KI' ,'XK' ,'KW' ,'KG' ,'LA' ,'LV' ,'LB' ,'LS' ,'LR' ,'LY' ,'LI' ,'LT' ,'LU' ,'MO' ,'MK' ,'MG' ,'MW' ,'MY' ,'MV' ,'ML' ,'MT' ,'MH' ,'MQ' ,'MR' ,'MU' ,'YT' ,'MX' ,'FM' ,'MD' ,'MC' ,'MN' ,'ME' ,'MS' ,'MA' ,'MZ' ,'MM' ,'NA' ,'NR' ,'NP' ,'NL' ,'AN' ,'NC' ,'NZ' ,'NI' ,'NE' ,'NG' ,'NU' ,'NF' ,'KP' ,'MP' ,'NO' ,'OM' ,'PK' ,'PW' ,'PS' ,'PA' ,'PG' ,'PY' ,'PE' ,'PH' ,'PN' ,'PL' ,'PT' ,'PR' ,'QA' ,'CG' ,'RE' ,'RO' ,'RU' ,'RW' ,'BL' ,'SH' ,'KN' ,'LC' ,'MF' ,'PM' ,'VC' ,'WS' ,'SM' ,'ST' ,'SA' ,'SN' ,'RS' ,'SC' ,'SL' ,'SG' ,'SX' ,'SK' ,'SI' ,'SB' ,'SO' ,'ZA' ,'GS' ,'KR' ,'SS' ,'ES' ,'LK' ,'SD' ,'SR' ,'SJ' ,'SZ' ,'SE' ,'CH' ,'SY' ,'TW' ,'TJ' ,'TZ' ,'TH' ,'TL' ,'TG' ,'TK' ,'TO' ,'TT' ,'TN' ,'TR' ,'TM' ,'TC' ,'TV' ,'VI' ,'UG' ,'UA' ,'AE' ,'GB' ,'US' ,'UM' ,'UY' ,'UZ' ,'VU' ,'VA' ,'VE' ,'VN' ,'WF' ,'EH' ,'YE' ,'ZM' ,'ZW');
203
- sort($codes);
204
- $codes = array_combine($codes, $codes);
205
- echo Mappress_Controls::select($name, $codes, $this->options->country);
206
- echo ' ' . __("Country code for searches", 'mappress-google-maps-for-wordpress') . ' ' . $link;
207
- }
208
-
209
- function set_deregister($name) {
210
- echo Mappress_Controls::checkmark($name, $this->options->deregister, __('Prevent other plugins/themes from loading the Google Maps API', 'mappress-google-maps-for-wordpress'));
211
- }
212
 
213
- function set_directions($name) {
214
- $directions_types = array('google' => __('Google', 'mappress-google-maps-for-wordpress'), 'inline' => __('Inline', 'mappress-google-maps-for-wordpress'));
215
- echo Mappress_Controls::radios($name, $directions_types, $this->options->directions);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
- function set_directions_server($name) {
219
- echo Mappress_Controls::input($name, $this->options->directionsServer, array('size' => 25));
 
 
220
  }
221
 
222
- function set_engine($name) {
223
- $engines = array('leaflet' => __('Leaflet', 'mappress-google-maps-for-wordpress'), 'google' => __('Google', 'mappress-google-maps-for-wordpress'));
224
- echo Mappress_Controls::radios($name, $engines, $this->options->engine);
225
- echo Mappress_Controls::help(__('Leaflet is free and requires no API key. Google requires an API key and has strict usage limits.', 'mappress-google-maps-for-wordpress'), '#toc-picking-a-mapping-api');
 
 
 
 
 
 
 
226
  }
227
 
228
- function set_footer($name) {
229
- // Disable if jetpack infinite scroll is used
230
- if (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )) {
231
- echo Mappress_Controls::checkmark($name, false, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'), array('disabled' => true));
232
- printf("<br/><i>%s</i>", __('Disabled because Jetpack Infinite Scroll is active', 'mappress-google-maps-for-wordpress'));
233
- } else {
234
- echo Mappress_Controls::checkmark($name, $this->options->footer, __('Output scripts in footer', 'mappress-google-maps-for-wordpress'));
235
- printf("<br/><i>(%s)</i>", __('disable if maps are output using AJAX', 'mappress-google-maps-for-wordpress'));
 
 
 
 
 
236
  }
 
237
  }
238
 
239
- function set_initial_open_info($name) {
240
- echo Mappress_Controls::checkmark($name, $this->options->initialOpenInfo, __('Open first POI', 'mappress-google-maps-for-wordpress'));
241
- }
242
-
243
- function set_language($name) {
244
- $url = ($this->options->engine == 'leaflet') ? 'https://en.wikipedia.org/wiki/ISO_639-1' : 'http://code.google.com/apis/maps/faq.html#languagesupport';
245
- $lang_link = sprintf('<a style="vertical-align:text-bottom" target="_blank" href="%s">%s</a>', $url, __("(list)", 'mappress-google-maps-for-wordpress'));
246
- $langs = array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu');
247
- echo Mappress_Controls::select($name, $langs, $this->options->language);
248
- echo ' ' . __('Language for searches and Google map controls', 'mappress-google-maps-for-wordpress') . ' ' . $lang_link;
249
  }
250
 
251
- function set_mapbox($name) {
252
- echo Mappress_Controls::input($name, $this->options->mapbox, array('size' => '50', 'placeholder' => __('Enter token to use Mapbox map tiles', 'mappress-google-maps-for-wordpress')));
253
- echo Mappress_Controls::help('', 'https://www.mapbox.com/help/define-access-token/');
 
 
 
 
254
  }
255
 
256
- function set_map_options($name) {
257
- $labels = array(
258
- 'google' => array(
259
- 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
260
- 'streetViewControl' => __("Street view control", 'mappress-google-maps-for-wordpress'),
261
- 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
262
- ),
263
- 'leaflet' => array(
264
- 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
265
- 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
266
- )
267
- );
268
-
269
- $mapOptions = $this->options->mapOptions;
270
 
271
- foreach($labels[$this->options->engine] as $option => $label) {
272
- $value = (isset($mapOptions->$option)) ? $mapOptions->$option : false;
273
- echo Mappress_Controls::checkmark($name . "[$option]", $value, $label);
274
- }
 
275
  }
276
 
277
- function set_poi_zoom($name) {
278
- $zooms = array_combine(range(1, 17), range(1,17));
279
- echo Mappress_Controls::select($name, $zooms, (int) $this->options->poiZoom);
280
- echo __("Default zoom when displaying a single POI", 'mappress-google-maps-for-wordpress');
 
 
 
 
 
 
281
  }
282
 
283
- function set_post_types($name) {
284
- $post_types = Mappress_Controls::get_post_types();
285
- echo Mappress_Controls::checkboxes($name, $post_types, $this->options->postTypes);
286
- return;
 
 
287
  }
288
 
289
- function set_preview() {
290
- $poi = new Mappress_Poi(array(
291
- 'address' => 'San Francisco, CA',
292
- "title" => "MapPress",
293
- "body" => __("Easy Google Maps", 'mappress-google-maps-for-wordpress'),
294
- "point" => array('lat' => 37.774095, 'lng' => -122.418731)
295
- ));
296
- $pois = array($poi);
297
- $map = new Mappress_Map(array('alignment' => 'default', 'width' => '100%', 'height' => 200, 'pois' => $pois, 'zoom' => 8));
298
- echo "<table class='form-table'><tr><td>" . $map->display() . "</td></tr></table>";
299
- }
300
- function set_sizes($name) {
301
- $headers = array(__('Width (px, %, vh, vw)', 'mappress-google-maps-for-wordpress'), __('Height (px, %, vh, vw)', 'mappress-google-maps-for-wordpress'), __('Default size', 'mappress-google-maps-for-wordpress'));
302
- $rows = array();
303
-
304
- foreach($this->options->sizes as $i => $size) {
305
- $checked = ($i == $this->options->size) ? "checked='checked'" : "";
306
- $rows[] = array(
307
- Mappress_Controls::input("{$name}[$i][width]", $size['width'], array('size' => 4)),
308
- Mappress_Controls::input("{$name}[$i][height]", $size['height'], array('size' => 4)),
309
- Mappress_Controls::input(self::$basename . "[size]", $i, array('type' => 'radio', 'checked' => $checked)),
310
- );
311
- }
312
- echo Mappress_Controls::table($headers, $rows);
313
  }
314
 
315
- function set_tooltips($name) {
316
- echo Mappress_Controls::checkmark($name, $this->options->tooltips, __('Show a tooltip when mouse is over a POI', 'mappress-google-maps-for-wordpress'));
317
- }
318
 
 
 
 
 
319
 
320
- function set_wpml($name) {
321
- echo Mappress_Controls::checkmark($name, $this->options->wpml, __("Copy maps when overwriting a translation", 'mappress-google-maps-for-wordpress'));
322
- echo Mappress_Controls::help(null, 'https://mappresspro.com/mappress-documentation#wpml');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
- function options_page() {
326
  ?>
327
- <div class="wrap mapp-settings-screen">
328
- <div class='mapp-settings-toolbar-top'>
329
- <div class='mapp-settings-toolbar-top-header'>
330
- <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
 
 
331
  <?php echo Mappress::$version; ?>
332
  </div>
333
- <div class='mapp-settings-toolbar-top-links'>
334
  <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'><?php _e('Get help', 'mappress-google-maps-for-wordpress');?></a>
335
  <a target='_blank' href='https://mappresspro.com/whats-new/'><?php _e("What's new", 'mappress-google-maps-for-wordpress');?></a>
336
  <?php if (Mappress::$pro) { ?>
@@ -340,21 +349,7 @@ class Mappress_Settings {
340
  <?php } ?>
341
  </div>
342
  </div>
343
- <form action="options.php" method="post">
344
- <?php // Force default submit button ?>
345
- <div class='mapp-settings-hidden-toolbar'>
346
- <input name='save' type='submit' class='button button-primary' value='<?php _e("Save Changes", 'mappress-google-maps-for-wordpress'); ?>' />
347
- <input name='reset_defaults' type='submit' class='button' value='<?php _e("Reset Defaults", 'mappress-google-maps-for-wordpress'); ?>' />
348
- </div>
349
-
350
- <?php settings_fields('mappress'); ?>
351
- <?php do_settings_sections('mappress'); ?>
352
-
353
- <div class='mapp-settings-toolbar'>
354
- <input name='save' type='submit' class='button button-primary' value='<?php _e("Save Changes", 'mappress-google-maps-for-wordpress'); ?>' />
355
- <input name='reset_defaults' type='submit' class='button' value='<?php _e("Reset Defaults", 'mappress-google-maps-for-wordpress'); ?>' />
356
- </div>
357
- </form>
358
  </div>
359
  <?php
360
  }
21
  $filter,
22
  $footer = true,
23
  $geocoder,
24
+ $highlight,
25
+ $highlightIcon,
26
  $iconScale,
27
  $initialOpenInfo,
28
  $iwType = 'iw',
42
  $postTypes = array('post', 'page'),
43
  $radius = 15,
44
  $search = true,
45
+ $size = 0,
46
+ $sizes = array(
47
+ array('width' => '425', 'height' => '350'),
48
+ array('width' => '50%', 'height' => '50%'),
49
+ array('width' => '75%', 'height' => '50%'),
50
+ array('width' => '100%', 'height' => '50%'),
51
+ array('width' => '100vw', 'height' => '100vh')
52
+ ),
53
  $sort,
54
  $style,
55
  $styles = array(),
56
  $thumbs = true,
57
+ $thumbSize = 'medium',
58
+ $thumbStyle = 'left',
59
+ $thumbWidth,
60
+ $thumbHeight,
61
  $tooltips = false,
62
  $wpml = true
63
  ;
75
  function save() {
76
  return update_option('mappress_options', get_object_vars($this));
77
  }
78
+ }
79
 
80
 
81
  /**
82
  * Options menu display
83
  */
84
  class Mappress_Settings {
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
+ static function register() {
87
+ add_action('wp_ajax_mapp_license_check', array(__CLASS__, 'ajax_license_check'));
88
+ add_action('wp_ajax_mapp_options_reset', array(__CLASS__, 'ajax_reset'));
89
+ add_action('wp_ajax_mapp_options_save', array(__CLASS__, 'ajax_save'));
90
 
91
+ //add_action( 'admin_menu', array(__CLASS__, 'admin_menu'));
92
+ add_action('load-toplevel_page_mappress', array(__CLASS__, 'review_admin_notice'));
93
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
+ static function ajax_license_check() {
96
+ check_ajax_referer('mappress', 'nonce');
 
 
97
 
98
+ if (!current_user_can('manage_options'))
99
+ Mappress::ajax_response('Not authorized');
 
 
 
 
 
100
 
101
+ ob_start();
102
+ $settings = (isset($_POST['license'])) ? (object) $_POST['license'] : null;
103
+ if (!$settings)
104
+ Mappress::ajax_response('Internal error, missing license!');
105
 
106
+ // For now, this just clears the cache because the page must still be reloaded to show (or clear) admin notices
107
+ $result = Mappress::$updater->clear_cache();
108
+ Mappress::ajax_response('OK');
 
 
 
 
109
  }
110
 
111
+ static function ajax_reset() {
112
+ check_ajax_referer('mappress', 'nonce');
113
+
114
+ if (!current_user_can('manage_options'))
115
+ Mappress::ajax_response('Not authorized');
116
 
117
+ ob_start();
118
+ $options = new Mappress_Options();
119
+ $options->save();
120
+ Mappress::ajax_response('OK');
121
  }
122
 
123
+ static function ajax_save() {
124
+ check_ajax_referer('mappress', 'nonce');
 
 
 
 
125
 
126
+ if (!current_user_can('manage_options'))
127
+ Mappress::ajax_response('Not authorized');
 
 
 
128
 
129
+ ob_start();
130
+ $settings = (isset($_POST['settings'])) ? (object) $_POST['settings'] : null;
131
+ if (!$settings)
132
+ Mappress::ajax_response('Internal error, missing settings!');
133
 
134
+ // Convert JS object arrays to PHP associative arrays
135
+ self::assoc($settings->autoicons['values'], true);
136
+ self::assoc($settings->mapboxStyles, true);
137
+ self::assoc($settings->metaKeys, true);
138
+ self::assoc($settings->styles, true);
139
 
140
+ // If license changed, re-check it
141
+ if ($settings->license && $settings->license != Mappress::$options->license)
142
+ Mappress::$updater->clear_cache();
143
 
144
+ $options = new Mappress_Options($settings);
145
+ $options->save();
146
+ Mappress::ajax_response('OK');
147
  }
148
 
149
+ static function get_initial_state() {
150
+ $state = array();
151
+
152
+ // Settings
153
+ $state = Mappress::$options;
154
+
155
+ // Convert PHP associative arrays to object arrays for JS
156
+ self::assoc($state->autoicons['values'], false);
157
+ self::assoc($state->mapboxStyles, false);
158
+ self::assoc($state->metaKeys, false);
159
+ self::assoc($state->styles, false);
160
+
161
+ // Setup helpers
162
+ $languages = array('' => __('Default', 'mappress-google-maps-for-wordpress'), 'ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari languages', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan, Valencian', 'km' => 'Central Khmer', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa, Chewa, Nyanja', 'zh' => 'Chinese', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi, Dhivehi, Maldivian', 'nl' => 'Dutch, Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic, Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'ki' => 'Gikuyu, Kikuyu', 'el' => 'Greek (Modern)', 'kl' => 'Greenlandic, Kalaallisut', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian, Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'rw' => 'Kinyarwanda', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kwanyama, Kuanyama', 'ku' => 'Kurdish', 'ky' => 'Kyrgyz', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'lb' => 'Letzeburgesch, Luxembourgish', 'li' => 'Limburgish, Limburgan, Limburger', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'ro' => 'Moldovan, Moldavian, Romanian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo, Navaho', 'nd' => 'Northern Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nb' => 'Norwegian Bokmål', 'nn' => 'Norwegian Nynorsk', 'ii' => 'Nuosu, Sichuan Yi', 'oc' => 'Occitan (post 1500)', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian, Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi, Punjabi', 'ps' => 'Pashto, Pushto', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'sd' => 'Sindhi', 'si' => 'Sinhala, Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'nr' => 'South Ndebele', 'es' => 'Spanish, Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur, Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volap_k', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang, Chuang', 'zu' => 'Zulu');
163
+ $license_status = self::get_license_status();
164
+
165
+ $helpers = (object) array(
166
+ 'demo_map' => self::demo_map(),
167
+ 'geocoding_errors' => self::geocoding_errors(),
168
+ 'icon_directory' => (class_exists('Mappress_Icons')) ? Mappress_Icons::$icons_dir : null,
169
+ 'is_multisite' => is_multisite(),
170
+ 'is_super_admin' => is_super_admin(),
171
+ 'is_main_site' => is_main_site(),
172
+ 'jetpack' => (class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' )),
173
+ 'languages' => $languages,
174
+ 'license_status' => $license_status->status,
175
+ 'license_message' => $license_status->message,
176
+ 'meta_fields' => self::get_meta_fields(),
177
+ 'meta_keys' => self::get_meta_keys(),
178
+ 'post_types' => self::get_post_types(),
179
+ 'taxonomies' => self::get_taxonomies(),
180
+ 'thumbnail_sizes' => self::get_thumbnail_sizes()
181
  );
182
+ $state->helpers = $helpers;
 
183
 
184
+ return json_encode($state);
 
 
185
  }
186
 
187
+ static function assoc(&$a, $to_assoc) {
188
+ $result = [];
 
 
 
 
 
 
189
 
190
+ if (!is_array($a) || empty($a)) {
191
+ $a = array();
192
+ return;
193
+ }
 
 
 
 
 
 
 
 
 
194
 
195
+ // Convert to associative
196
+ if ($to_assoc) {
197
+ foreach($a as $i => $row) {
198
+ // Sanitize keys
199
+ $key = sanitize_title_with_dashes($row['key'], '', 'save');
200
+ $value = trim($row['value']);
201
+
202
+ // Discard rows with empty key or value
203
+ if (empty($key) && empty($value))
204
+ continue;
205
+ else
206
+ $result[$key] = $value;
207
+ }
208
+ } else {
209
+ // Convert from associative
210
+ foreach($a as $key => $value)
211
+ $result[] = array('key' => $key, 'value' => $value);
212
+ }
213
+ $a = $result;
214
  }
215
 
216
+ static function demo_map() {
217
+ $poi = new Mappress_Poi(array('address' => 'San Francisco, CA', "title" => "MapPress", "body" => __("Easy Google Maps", 'mappress-google-maps-for-wordpress'), "point" => array('lat' => 37.774095, 'lng' => -122.418731)));
218
+ $map = new Mappress_Map(array('alignment' => 'default', 'width' => '100%', 'height' => 300,'pois' => array($poi), 'zoom' => 8));
219
+ return $map;
220
  }
221
 
222
+ static function geocoding_errors() {
223
+ $geocoding_errors = array();
224
+ $query = new WP_Query(array('meta_key' => 'mappress_error', 'posts_per_page' => 20, 'post_type' => Mappress::$options->postTypes));
225
+ foreach($query->posts as $post) {
226
+ $geocoding_errors[] = array(
227
+ 'ID' => $post->ID,
228
+ 'post_title' => $post->post_title,
229
+ 'error' => get_post_meta($post->ID, 'mappress_error', true)
230
+ );
231
+ };
232
+ return $geocoding_errors;
233
  }
234
 
235
+ static function get_license_status() {
236
+ $license = (object) array('status' => null, 'message' => null);
237
+
238
+ if (Mappress::$pro && Mappress::$options->license) {
239
+ $license->status = Mappress::$updater->get_status();
240
+ if ($license->status == 'active')
241
+ $license->message = __('Active', 'mappress-google-maps-for-wordpress');
242
+ else {
243
+ if (is_wp_error($license->status))
244
+ $license->message = sprintf(__('Communication error, please try again later: %s', 'mappress-google-maps-for-wordpress'), $license_status->get_error_message());
245
+ else
246
+ $license->message = __('License is invalid or expired', 'mappress-google-maps-for-wordpress');
247
+ }
248
  }
249
+ return $license;
250
  }
251
 
252
+ static function get_meta_fields() {
253
+ for ($i = 1; $i < 7; $i++)
254
+ $fields['address' . $i] = __('Address line ', 'mappress-google-maps-for-wordpress') . ' ' . $i;
255
+ $fields = array_merge($fields, array('lat' => __('Latitude', 'mappress-google-maps-for-wordpress'), 'lng' => __('Longitude', 'mappress-google-maps-for-wordpress'), 'title' => __('Title', 'mappress-google-maps-for-wordpress'), 'body' => __('Body', 'mappress-google-maps-for-wordpress'), 'iconid' => __('Icon', 'mappress-google-maps-for-wordpress'), 'zoom' => __('Zoom', 'mappress-google-maps-for-wordpress')));
256
+ return $fields;
 
 
 
 
 
257
  }
258
 
259
+ static function get_post_types() {
260
+ $results = array();
261
+ $post_types = get_post_types(array('show_ui' => true, 'public' => true), 'objects');
262
+ unset($post_types['mappress_map'], $post_types['attachment']);
263
+ foreach($post_types as $type => $obj)
264
+ $results[$type] = $obj->label;
265
+ return $results;
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
 
269
+ static function get_thumbnail_sizes() {
270
+ // Note: WP doesn't return dimensions, just the size names - ticket is > 6 months old now: http://core.trac.wordpress.org/ticket/18947
271
+ $sizes = get_intermediate_image_sizes();
272
+ $sizes = array_combine(array_values($sizes), array_values($sizes));
273
+ return $sizes;
274
  }
275
 
276
+ static function get_meta_keys() {
277
+ global $wpdb;
278
+ $keys = $wpdb->get_col( "
279
+ SELECT DISTINCT meta_key
280
+ FROM $wpdb->postmeta
281
+ WHERE meta_key NOT in ('_edit_last', '_edit_lock', '_encloseme', '_pingme', '_thumbnail_id')
282
+ AND meta_key NOT LIKE ('\_wp%')"
283
+ );
284
+ $results = (is_array($keys) && !empty($keys)) ? array_combine($keys, $keys) : array();
285
+ return $results;
286
  }
287
 
288
+ static function get_meta_values($meta_key) {
289
+ global $wpdb;
290
+ $sql = "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value != '' ORDER BY meta_value";
291
+ $meta_values = $wpdb->get_col($wpdb->prepare($sql, $meta_key));
292
+ $results = ($meta_values) ? array_combine($meta_values, $meta_values) : array();
293
+ return $results;
294
  }
295
 
296
+ static function get_taxonomies() {
297
+ $results = array();
298
+ $tax_objs = get_taxonomies(array('public' => true), 'objects');
299
+ unset($tax_objs['post_format']);
300
+ foreach($tax_objs as $tax_obj)
301
+ $results[$tax_obj->name] = $tax_obj->label;
302
+ return $results;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
+ static function review_admin_notice() {
306
+ $first_time = get_option('mappress_review');
 
307
 
308
+ if (!$first_time) {
309
+ update_option('mappress_review', time());
310
+ return;
311
+ }
312
 
313
+ if (time() <= $first_time + (60 * 60 * 24 * 10))
314
+ return;
315
+
316
+ $ids = Mappress_Map::get_list(null, 'ids');
317
+ if (count($ids) < 1)
318
+ return;
319
+
320
+ $review_link = sprintf("<a class='button button-primary mapp-dismiss' href='https://wordpress.org/support/view/plugin-reviews/mappress-google-maps-for-wordpress?filter=5' target='_blank'>%s</a>", __('OK, you deserve it!', 'mappress-google-maps-for-wordpress'));
321
+ $no_link = sprintf("<a class='button mapp-dismiss' href='#'>%s</a>", __('Nope, maybe later', 'mappress-google-maps-for-wordpress'));
322
+ $help_link = sprintf("<a class='mapp-dismiss' href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>", __('I need help using the plugin', 'mappress-google-maps-for-wordpress'));
323
+ $body = "<div class='mapp-review'>";
324
+ $body .= "<h3>" . __("Help Spread the Word", 'mappress-google-maps-for-wordpress') . "</h3>";
325
+ $body .= "<p>" . __("Hi, I hope you're enjoying MapPress. Would you mind taking a moment to write a brief review? It would mean a lot to me!", 'mappress-google-maps-for-wordpress') . "</p>";
326
+ $body .= "<p>" . "~ Chris Richardson" . "</p>";
327
+ $body .= "<div class='mapp-review-options'>" . $review_link . $no_link . $help_link . "</div>";
328
+ $body .= "</div>";
329
+ Mappress::$notices['review'] = array('review', $body);
330
  }
331
 
332
+ static function options_page() {
333
  ?>
334
+ <script>var mappress_options_state=<?php echo self::get_initial_state();?>;</script>
335
+ <div class="wrap mapp-options">
336
+ <h1></h1>
337
+ <div class='mapp-options-header'>
338
+ <div class='mapp-options-header-version'>
339
+ <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
340
  <?php echo Mappress::$version; ?>
341
  </div>
342
+ <div class='mapp-options-header-links'>
343
  <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'><?php _e('Get help', 'mappress-google-maps-for-wordpress');?></a>
344
  <a target='_blank' href='https://mappresspro.com/whats-new/'><?php _e("What's new", 'mappress-google-maps-for-wordpress');?></a>
345
  <?php if (Mappress::$pro) { ?>
349
  <?php } ?>
350
  </div>
351
  </div>
352
+ <div id="mapp-options-settings"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  </div>
354
  <?php
355
  }
mappress_template.php CHANGED
@@ -22,7 +22,6 @@ class Mappress_Template extends Mappress_Obj {
22
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
23
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
24
 
25
-
26
  // Print queued templates
27
  // wp_footer used instead of wp_footer_scripts because NGG reverses calling order of the two hooks
28
  add_action('wp_print_scripts', array(__CLASS__, 'print_templates'), -1);
@@ -83,10 +82,10 @@ class Mappress_Template extends Mappress_Obj {
83
  'content' => ($html) ? $html : $standard,
84
  'path' => $filepath,
85
  'standard' => $standard,
86
- 'exists' => ($html) ? true : false
87
  ));
88
 
89
- Mappress::ajax_response('OK', $template);
90
  }
91
 
92
  static function ajax_save() {
@@ -189,7 +188,7 @@ class Mappress_Template extends Mappress_Obj {
189
 
190
  static function print_template($template_name) {
191
  // Read collections of templates or individual templates
192
- if (in_array($template_name, array('editor', 'map', 'mce', 'widgets')))
193
  require(self::locate_template($template_name));
194
  else {
195
  $template = self::get_template($template_name);
@@ -197,5 +196,19 @@ class Mappress_Template extends Mappress_Obj {
197
  printf("<script type='text/html' id='mapp-tmpl-$template_name'>%s</script>", $template);
198
  }
199
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
  ?>
22
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
23
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
24
 
 
25
  // Print queued templates
26
  // wp_footer used instead of wp_footer_scripts because NGG reverses calling order of the two hooks
27
  add_action('wp_print_scripts', array(__CLASS__, 'print_templates'), -1);
82
  'content' => ($html) ? $html : $standard,
83
  'path' => $filepath,
84
  'standard' => $standard,
85
+ 'exists' => ($html) ? true : false,
86
  ));
87
 
88
+ Mappress::ajax_response('OK', array('template' => $template, 'tokens' => self::$tokens));
89
  }
90
 
91
  static function ajax_save() {
188
 
189
  static function print_template($template_name) {
190
  // Read collections of templates or individual templates
191
+ if (in_array($template_name, array('editor', 'map')))
192
  require(self::locate_template($template_name));
193
  else {
194
  $template = self::get_template($template_name);
196
  printf("<script type='text/html' id='mapp-tmpl-$template_name'>%s</script>", $template);
197
  }
198
  }
199
+
200
+
201
+ static function print_js_templates() {
202
+ $results = array();
203
+ foreach(self::$queue as $template_name => $footer) {
204
+ // Ignore static editor templates
205
+ if (in_array($template_name, array('editor', 'map')))
206
+ continue;
207
+ $template = self::get_template($template_name);
208
+ // JS doesn't like dashes in property names
209
+ $results[str_replace('-', '_', $template_name)] = $template;
210
+ }
211
+ return "var mappress_templates = " . json_encode($results) . ';';
212
+ }
213
  }
214
  ?>
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
  === MapPress Maps for WordPress ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
- Tags: maps, google maps, leaflet maps, map plugin, directions, google map plugin, leaflet map plugin, map widget, mapbox, mapping
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.6
8
- Stable tag: 2.58
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
12
 
13
- Create unlimited maps and locations as Gutenberg blocks - or use the classic editor. Both are fully supported, and the popup map editor makes creating and editing maps easy!
14
 
15
  Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more features, including custom markers, searchable mashups, clustering, and much more. See it in action on the [MapPress Home Page](https://mappresspro.com/mappress) or test it yourself with a [Free Demo Site](https://mappresspro.com/demo)!
16
 
@@ -28,19 +28,21 @@ Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more featur
28
  5. POI with YouTube video
29
 
30
  = Key Features =
 
31
  * Add unlimited maps and markers to any post, page or custom post type
 
32
  * Locations can be added by address, place, or latitude/longitude, or dragged into position
33
  * Markers support custom text and HTML including photos, images, and links
34
  * Google street view and overlays (traffic, bicycling and transit)
35
- * Markers link to Google maps for detailed turn-by-turn directins
36
  * Maps can be generated using PHP for use in themes and templates
37
 
38
  = Pro Version Features =
39
  * Get [MapPress Pro](https://mappresspro.com/mappress) for additional functionality
40
  * Custom marker icons, or upload your own - 100 standard icons included
41
- * Combine maps and locations into a searchable "mashup" map
42
  * Filter locations by by taxonomy, tag or category
43
- * Map and mashup widgets
44
  * Marker clustering for both Leaflet and Google
45
  * Multiple geocoders including Google, Nominatim, Algolia and MapBox
46
  * Customizable marker and list templates
@@ -48,7 +50,7 @@ Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more featur
48
  * Generate maps automatically from custom fields
49
  * Automatically assign marker icons by taxonomy, tag, or category
50
  * KML support for Google Earth
51
- * Google drawing manager for drawing polygons, circles, and lines directly on your maps
52
  * MultiSite compatible
53
  * Compatible with WPML language settings
54
 
@@ -82,6 +84,52 @@ Please see the plugin documentation pages:
82
 
83
  == Changelog ==
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  = 2.58 =
86
  * Added: new infobox with better panning and sizing
87
  * Added: infobox can now be used with Leaflet, in addition to Google
1
  === MapPress Maps for WordPress ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
+ Tags: maps, google maps, map, map markers, google map, leaflet maps, leaflet map plugin, google maps plugin, wp google maps, wp google map, map plugin, store locator, google map plugin, map widget,
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.6
8
+ Stable tag: 2.61
9
 
10
  == Description ==
11
  MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
12
 
13
+ Create unlimited maps and map markers using Gutenberg blocks or the classic editor. The popup map editor makes creating and editing maps easy!
14
 
15
  Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more features, including custom markers, searchable mashups, clustering, and much more. See it in action on the [MapPress Home Page](https://mappresspro.com/mappress) or test it yourself with a [Free Demo Site](https://mappresspro.com/demo)!
16
 
28
  5. POI with YouTube video
29
 
30
  = Key Features =
31
+ * The only full-featured google map plugin and leaflet map plugin that is compatible with the Gutenberg editor
32
  * Add unlimited maps and markers to any post, page or custom post type
33
+ * Maps are fully responsive, and can be sized by pixels, viewport units, percents or aspect ratios
34
  * Locations can be added by address, place, or latitude/longitude, or dragged into position
35
  * Markers support custom text and HTML including photos, images, and links
36
  * Google street view and overlays (traffic, bicycling and transit)
37
+ * Markers link the Google map site for detailed turn-by-turn directins
38
  * Maps can be generated using PHP for use in themes and templates
39
 
40
  = Pro Version Features =
41
  * Get [MapPress Pro](https://mappresspro.com/mappress) for additional functionality
42
  * Custom marker icons, or upload your own - 100 standard icons included
43
+ * Use a Gutenberg "mashup" block to create a searchable map, great for a local directory site or store locator
44
  * Filter locations by by taxonomy, tag or category
45
+ * Map widget and mashup widget are included
46
  * Marker clustering for both Leaflet and Google
47
  * Multiple geocoders including Google, Nominatim, Algolia and MapBox
48
  * Customizable marker and list templates
50
  * Generate maps automatically from custom fields
51
  * Automatically assign marker icons by taxonomy, tag, or category
52
  * KML support for Google Earth
53
+ * Google drawing manager for drawing polygons, circles, and lines on your maps
54
  * MultiSite compatible
55
  * Compatible with WPML language settings
56
 
84
 
85
  == Changelog ==
86
 
87
+ = 2.61 =
88
+ * Added: default sizes are now responsive (%) based, pixel and viewport sizes are still supported
89
+ * Added: default sizes are now editable and sortable
90
+ * Added: new settings have been added for users of the free version
91
+ * Added: support for the new block-based widget editor
92
+ * Changed: plugin setttings screen moved from jQuery to React
93
+ * Changed: POI editor icon picker and color picker have been converted to React
94
+ * Fixed: POI list not updating when POI is changed
95
+ * Fixed: conflict with Yoast preview slug temporarily appearing blank
96
+ * Fixed: Gutenberg editor setting map alignment on settings screen prevents blocks from being selected
97
+ * Fixed: React error for duplicate keys in multiselect
98
+
99
+ = 2.60 =
100
+ * Added: updated flex-based mashup list & popup templates with better thumbnail support - please update any custom template
101
+ * Added: updated map popup template and CSS - please update any custom templates
102
+ * Added: for classic editor: put the cursor on a shortcode to open that map in editor
103
+ * Added: better infobox panning and sizing
104
+ * Added: mashup thumbnail position can now be set in MapPress settings
105
+ * Added: setting to open POIs on mouse hover
106
+ * Added: map library now supports column sorting by mapid, map title, and post title
107
+ * Added: window.location is now passed as argument ($args->url) to filter 'mappress_pre_query'
108
+ * Added: classic editor is now React-based
109
+
110
+ = 2.59 =
111
+ * Fixed: JS files were not compiling for IE11. Note that IE11 is NOT a supported browser.
112
+ * Fixed: Leaflet icons were not setting scale properly, interfering with marker spiderfier
113
+ * Fixed: error when saving map center of 0,0
114
+ * Added: new marker class to enable effects
115
+ * Added: map data can be recovered after deletion
116
+ * Added: highlighting on mouse over for list and marker hover
117
+ * Added: better z-indexing for hovered marker
118
+
119
+ = 2.58.3 =
120
+ * Added: selected icon can now be highlighted with a special icon or a circle
121
+ * Fixed: error preventing KML files from being added to map
122
+
123
+ = 2.58.2 =
124
+ * Fixed: jQuery warning was causing maps to not display in older WP versions
125
+
126
+ = 2.58.1 =
127
+ * Fixed: places strim trim() not working for maps with center specified by lat/lng
128
+ * Fixed: better error message for sites with obsolete jQuery and jQuery UI
129
+ * Fixed: admin notices not showing correctly on settings page
130
+ * Fixed: added warning for expired license
131
+ * Fixed: errors for invalid KML files were not displaying
132
+
133
  = 2.58 =
134
  * Added: new infobox with better panning and sizing
135
  * Added: infobox can now be used with Leaflet, in addition to Google
templates/map-directions.php CHANGED
@@ -1,19 +1,19 @@
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-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
- <span class='mapp-spinner'></span>
16
- </div>
17
- <div class='mapp-dir-renderer'></div>
18
- </div>
19
  <# } #>
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-button-submit' data-mapp-action='dir-get'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
15
+ <span class='mapp-spinner'></span>
16
+ </div>
17
+ <div class='mapp-dir-renderer'></div>
18
+ </div>
19
  <# } #>
templates/map-filters.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php if (Mappress::$pro) { ?>
2
  <# if (map.query && mappl10n.options.filter) { #>
3
- <div class='mapp-filters'>
4
- <div class='mapp-filters-list'>
5
- <?php $filter = new Mappress_Filter(array('key' => Mappress::$options->filter, 'format' => null)); ?>
6
- <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
7
- <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
8
- <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
9
- </div>
10
- </div>
11
- <div class='mapp-filters-toolbar'>
12
- <span class='mapp-button-submit mapp-filters-done' data-mapp-action='filters-toggle'><?php _e('Done', 'mappress-google-maps-for-wordpress');?></span>
13
- <span class='mapp-button mapp-filters-reset' data-mapp-action='filters-reset'><?php _e('Reset', 'mappress-google-maps-for-wordpress');?></span>
14
- </div>
15
- </div>
16
  <# } #>
17
  <?php } ?>
1
  <?php if (Mappress::$pro) { ?>
2
  <# if (map.query && mappl10n.options.filter) { #>
3
+ <div class='mapp-filters'>
4
+ <div class='mapp-filters-list'>
5
+ <?php $filter = new Mappress_Filter(array('key' => Mappress::$options->filter, 'format' => null)); ?>
6
+ <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
7
+ <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
8
+ <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
9
+ </div>
10
+ </div>
11
+ <div class='mapp-filters-toolbar'>
12
+ <span class='mapp-button-submit mapp-filters-done' data-mapp-action='filters-toggle'><?php _e('Done', 'mappress-google-maps-for-wordpress');?></span>
13
+ <span class='mapp-button mapp-filters-reset' data-mapp-action='filters-reset'><?php _e('Reset', 'mappress-google-maps-for-wordpress');?></span>
14
+ </div>
15
+ </div>
16
  <# } #>
17
  <?php } ?>
templates/map-loop.php CHANGED
@@ -5,7 +5,7 @@
5
  <# } #>
6
 
7
  <# if (map.layout != 'inline') { #>
8
- <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
9
  <# } #>
10
 
11
  <div class="mapp-items">
5
  <# } #>
6
 
7
  <# if (map.layout != 'inline') { #>
8
+ <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
9
  <# } #>
10
 
11
  <div class="mapp-items">
templates/map-popup.php CHANGED
@@ -1,3 +1,7 @@
1
- <div class='mapp-title'>{{{poi.title}}}</div>
2
- <div class='mapp-body'>{{{poi.body}}}</div>
3
- <div class='mapp-links'><a href='#' data-mapp-action='dir'><?php _e('Directions', 'mappress-google-maps-for-wordpress'); ?></a><div>
 
 
 
 
1
+ <div class='mapp-info'>
2
+ <div class='mapp-title'>{{{poi.title}}}</div>
3
+ <div class='mapp-body'>{{{poi.body}}}</div>
4
+ <div class='mapp-links'>
5
+ <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
6
+ </div>
7
+ </div>
templates/map.php CHANGED
@@ -7,9 +7,11 @@
7
  classes += (layout == 'left') ? ' mapp-left' : ' mapp-inline';
8
  classes += (mappl10n.options.engine == 'leaflet') ? ' mapp-leaflet ' : ' mapp-google ';
9
 
10
- let alignment = (map.alignment) ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
 
 
13
  // Gutenberg additional classes https://core.trac.wordpress.org/ticket/45882
14
  classes += (map.classname) ? ' ' + map.classname : '';
15
  #>
7
  classes += (layout == 'left') ? ' mapp-left' : ' mapp-inline';
8
  classes += (mappl10n.options.engine == 'leaflet') ? ' mapp-leaflet ' : ' mapp-google ';
9
 
10
+ let alignment = (typeof map.alignment != 'undefined') ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
13
+ classes += (mappl10n.options.isIE) ? ' mapp-ie' : '';
14
+
15
  // Gutenberg additional classes https://core.trac.wordpress.org/ticket/45882
16
  classes += (map.classname) ? ' ' + map.classname : '';
17
  #>
templates/mashup-modal.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Default template for displaying a mashup post in a modal dialog
4
+ *
5
+ */
6
+ ?>
7
+
8
+ <div class="mapp-modal-featured">
9
+ <?php the_post_thumbnail(); ?>
10
+ </div>
11
+
12
+ <article tabindex="0" class="mapp-modal-article mapp-modal-focus">
13
+ <div class="mapp-modal-title">
14
+ <?php the_title('<h1>', '</h1>' ); ?>
15
+ </div>
16
+
17
+ <div class="mapp-modal-body">
18
+ <?php the_content(__('Continue reading', 'mappress-google-maps-for-wordpress') ); ?>
19
+ </div>
20
+
21
+ <div class="mapp-modal-meta">
22
+ <div>
23
+ <div><a href="<?php the_permalink(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></div>
24
+ <div><?php printf(/* translators: %s: Author name. */ __( 'By %s' , 'mappress-google-maps-for-wordpress'), '<a href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a>');?></div>
25
+ </div>
26
+
27
+ <div>
28
+ <div><?php _e( 'In' , 'mappress-google-maps-for-wordpress'); ?> <?php the_category( ', ' ); ?></div>
29
+ <div><?php _e(' Tagged ' , 'mappress-google-maps-for-wordpress'); ?><?php the_tags( '', ', ', '' ); ?></div>
30
+ </div>
31
+ </div>
32
+ </article>
33
+
templates/mashup-popup.php CHANGED
@@ -1,6 +1,8 @@
1
- <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
2
- <div class='mapp-body'>
3
- <a href='{{{poi.url}}}' target='_blank'>{{{poi.thumbnail}}}</a>
4
- {{{poi.body}}}
5
- </div>
6
- <div class='mapp-links'><a href='#' data-mapp-action='dir'><?php _e('Directions', 'mappress-google-maps-for-wordpress'); ?></a><div>
 
 
1
+ <div class='mapp-thumbnail'><a href='{{{poi.url}}}' target='_blank'>{{{poi.thumbnail}}}</a></div>
2
+ <div class='mapp-info'>
3
+ <div class='mapp-title'><a href='{{{poi.url}}}' target='_blank'>{{{poi.title}}}</a></div>
4
+ <div class='mapp-body'>{{{poi.body}}}</div>
5
+ <div class='mapp-links'>
6
+ <div class='mapp-dir' data-mapp-action='dir'><?php _e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></div>
7
+ </div>
8
+ </div>
templates_admin/editor.php CHANGED
@@ -1,35 +1,20 @@
1
- <script type='text/template' id='mapp-tmpl-edit-loop'>
2
- <div class='mapp-list-toggle' data-mapp-action='list-toggle'></div>
3
- <div class='mapp-items'>
4
- <# _.forEach(pois, function(poi, i) { #>
5
- <div class='mapp-item' data-mapp-action='open' data-mapp-poi='{{{i}}}'><# print(poi.render('item')); #></div>
6
- <# }); #>
7
- </div>
8
- </script>
9
-
10
- <script type='text/template' id='mapp-tmpl-edit-item'>
11
- <img class="mapp-icon" src="{{{poi.icon}}}">
12
- <div class='mapp-title'>{{{poi.title}}}</div>
13
- </script>
14
-
15
  <script type='text/template' id='mapp-tmpl-edit-popup'>
16
  <div class='mapp-poi-header'>
17
  <input class='mapp-poi-title' type='text' value='{{poi.title}}'>
18
- <# if (!poi.type) { #>
19
- <img data-mapp-iconpicker data-mapp-iconid='{{{poi.iconid}}}' class='mapp-icon'>
20
  <# } else if (poi.isPoly()) { #>
21
- <# var colors = poi.getTemplateColors(); #>
22
- <span data-mapp-colorpicker class='mapp-colorpicker-toggle' data-mapp-color='{{{colors.color}}}' data-mapp-opacity='{{{colors.opacity}}}' data-mapp-weight='{{{colors.weight}}}' tabindex='0'></span>
23
  <# } #>
24
  </div>
25
 
26
- <div class='mapp-poi-editor-toolbar'>
27
- <# if (poi.type == 'kml') { #>
28
- <div class='mapp-poi-kml'>
29
- <input class='mapp-poi-url' type='text' readonly='readonly' value='<# print( (poi.kml) ? poi.kml.url : '' );#>'/>
30
- </div>
31
- <# } #>
32
 
 
33
  <div class='mapp-poi-editor-tabs'>
34
  <a class='mapp-poi-visual'><?php _e('Visual', 'mappress-google-maps-for-wordpress'); ?></a> | <a class='mapp-poi-html'><?php _e('HTML', 'mappress-google-maps-for-wordpress');?></a>
35
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <script type='text/template' id='mapp-tmpl-edit-popup'>
2
  <div class='mapp-poi-header'>
3
  <input class='mapp-poi-title' type='text' value='{{poi.title}}'>
4
+ <# if (mappl10n.options.pro && !poi.type) { #>
5
+ <div id='mapp-poi-iconpicker'></div>
6
  <# } else if (poi.isPoly()) { #>
7
+ <div id='mapp-poi-colorpicker'></div>
 
8
  <# } #>
9
  </div>
10
 
11
+ <# if (poi.type == 'kml') { #>
12
+ <div class='mapp-poi-kml'>
13
+ <input class='mapp-poi-url' type='text' readonly='readonly' value='<# print( (poi.kml) ? poi.kml.url : '' );#>'/>
14
+ </div>
15
+ <# } #>
 
16
 
17
+ <div class='mapp-poi-editor-toolbar'>
18
  <div class='mapp-poi-editor-tabs'>
19
  <a class='mapp-poi-visual'><?php _e('Visual', 'mappress-google-maps-for-wordpress'); ?></a> | <a class='mapp-poi-html'><?php _e('HTML', 'mappress-google-maps-for-wordpress');?></a>
20
  </div>
templates_admin/mce.php DELETED
@@ -1,109 +0,0 @@
1
- <script type='text/template' id='mapp-tmpl-mce'>
2
- <div class='mapp-mce'>
3
- <div class='mapp-mce-list-panel mapp-open'>
4
- <div class='mapp-mce-header'>
5
- <div class='mapp-mce-header-left'>
6
- <h1><?php _e('Select a map', 'mappress-google-maps-for-wordpress');?></h1>
7
- <input data-mapp-mce='add' class='button' type='button' value='<?php esc_attr_e('Add New', 'mappress-google-maps-for-wordpress')?>' />
8
- </div>
9
- </div>
10
- <div class='mapp-mce-filter-block'>
11
- <div class='mapp-mce-search-block'>
12
- <?php _e('Search', 'mappress-google-maps-for-wordpress'); ?>
13
- <input type='text' size="15" class='mapp-mce-search' placeholder='<?php _e('post title', 'mappress-google-maps-for-wordpress');?>'>
14
- <span class='spinner'></span>
15
- </div>
16
- <div class='mapp-mce-types-block'>
17
- <label><input type='radio' name='mapp-mce-list-type' checked value='post'><?php _e('Attached to this post', 'mappress-google-maps-for-wordpress');?></label>
18
- <label><input type='radio' name='mapp-mce-list-type' value='all'><?php _e('All maps', 'mappress-google-maps-for-wordpress');?></label>
19
- </div>
20
- </div>
21
- <div class='mapp-mce-list'></div>
22
- <div class='mapp-mce-toolbar'>
23
- <input data-mapp-mce='close' class='button' type='button' value='<?php esc_attr_e('Close', 'mappress-google-maps-for-wordpress'); ?>' />
24
- </div>
25
- </div>
26
-
27
- <div class='mapp-mce-edit-panel'>
28
- <div class='mapp-mce-header'>
29
- <input class='mapp-mce-title' type='text' placeholder='<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>' />
30
- </div>
31
- <div class='mapp-mce-settings'>
32
- <div class='mapp-mce-setting'>
33
- <div class='mapp-mce-label'><?php _e('Size', 'mappress-google-maps-for-wordpress');?></div>
34
- <div class='mapp-mce-sizes'>
35
- <?php
36
- $sizes = array();
37
- foreach(Mappress::$options->sizes as $i => $size)
38
- $sizes[] = "<a href='#' class='mapp-mce-size' data-width='{$size['width']}' data-height='{$size['height']}'>" . $size['width'] . 'x' . $size['height'] . "</a>";
39
- echo implode(' | ', $sizes);
40
- ?>
41
- </div>
42
- <div class='mapp-mce-custom'>
43
- <input type='text' class='mapp-mce-width' size='2' value='' /> x <input type='text' class='mapp-mce-height' size='2' value='' />
44
- </div>
45
- </div>
46
- <div class='mapp-mce-setting'>
47
- <div class='mapp-mce-label'><?php _e('Map ID', 'mappress-google-maps-for-wordpress');?></div>
48
- <div class='mapp-mce-mapid'></div>
49
- </div>
50
- </div>
51
- <div class='mapp-edit'></div>
52
- <div class='mapp-mce-toolbar'>
53
- <input data-mapp-mce='save' class='button button-primary' type='button' value='<?php esc_attr_e('Save', 'mappress-google-maps-for-wordpress'); ?>' />
54
- <input data-mapp-mce='cancel' class='button' type='button' value='<?php esc_attr_e('Cancel', 'mappress-google-maps-for-wordpress'); ?>' />
55
- <label class='mapp-mce-viewport-block'>
56
- <input type='checkbox' class='mapp-mce-viewport'>
57
- <?php _e('Save center / zoom', 'mappress-google-maps-for-wordpress');?>
58
- </label>
59
- </div>
60
- </div>
61
- </div>
62
- </script>
63
-
64
- <script type='text/template' id='mapp-tmpl-mce-list'>
65
- <div class='mapp-mce-list-header'>
66
- <div class='mapp-mce-col-map-title'><?php _e('Map title', 'mappress-google-maps-for-wordpress');?></div>
67
- <div class='mapp-mce-col-mapid'><?php _e('Map ID', 'mappress-google-maps-for-wordpress');?></div>
68
- <# if (type == 'all') { #>
69
- <div class='mapp-mce-col-post-title'><?php _e('Attached to', 'mappress-google-maps-for-wordpress');?></div>
70
- <# } #>
71
- <div class='mapp-mce-col-actions'><?php _e('Action', 'mappress-google-maps-for-wordpress');?></div>
72
- </div>
73
- <div class='mapp-mce-items'>
74
- <# _.forEach(items, function(item, i) { #>
75
- <# var className = (item.mapid == selected) ? 'mapp-mce-item mapp-selected' : 'mapp-mce-item'; #>
76
- <div class='{{className}}' data-mapp-mce-list='edit' data-mapp-mapid='{{ item.mapid }}'>
77
- <div class='mapp-mce-col-map-title'>
78
- <# if (item.map_title) { #>{{ item.map_title }}<# } else { #><?php _e('Untitled', 'mappress-google-maps-for-wordpress');?><# } #>
79
- </div>
80
-
81
- <div class='mapp-mce-col-mapid'>{{item.mapid}}</div>
82
-
83
- <# if (type == 'all') {
84
- var postTitle = (item.post_title) ? item.post_title : '<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>';
85
- postTitle = (item.postid == mappl10n.options.postid) ? '<?php _e('Current post', 'mappress-google-maps-for-wordpress');?>' : postTitle;
86
- var link = '';
87
- if (item.postid > 0) {
88
- link = (item.postid == mappl10n.options.postid) ? postTitle : '<a href="' + mappl10n.options.editurl + '?post=' + item.postid + '&action=edit" target="_blank">' + postTitle + '</a>';
89
- } else {
90
- link = '<?php _e('Unattached', 'mappress-google-maps-for-wordpress');?>';
91
- }
92
- #>
93
- <div class='mapp-mce-col-post-title'>{{{link}}}</div>
94
- <# } #>
95
-
96
- <div class='mapp-mce-col-actions'>
97
- <a href='#' data-mapp-mce-list='insert'><?php _e('Insert into post', 'mappress-google-maps-for-wordpress');?></a> |&nbsp;
98
- <a href='#' data-mapp-mce-list='remove'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
99
- </div>
100
- </div>
101
- <# }); #>
102
- </div>
103
- <div class='mapp-mce-list-footer'>
104
- <# if (items.length == 0) { #>
105
- <?php _e('No maps found', 'mappress-google-maps-for-wordpress');?>
106
- <# } #>
107
- </div>
108
- </div>
109
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates_admin/widgets.php DELETED
@@ -1,98 +0,0 @@
1
- <script type='text/html' id='mapp-tmpl-color-picker'>
2
- <# var colors = ['#F4EB37','#CDDC39','#62AF44','#009D57','#0BA9CC','#4186F0','#3F5BA9','#7C3592','#A61B4A','#DB4436','#F8971B','#F4B400','#795046','#F9F7A6','#E6EEA3','#B7DBAB','#7CCFA9','#93D7E8','#9FC3FF','#A7B5D7','#C6A4CF','#D698AD','#EE9C96','#FAD199','#FFDD5E','#B29189','#FFFFFF','#CCCCCC','#777777','#000000']; #>
3
- <div class='mapp-colorpicker' tabindex='0'>
4
- <# _.each(colors, function(color, i) { #>
5
- <span data-mapp-color='{{color}}' class='mapp-color' style='background-color: {{color}}' tabindex='0'></span>
6
- <# }); #>
7
- <?php _e('Opacity', 'mappress-google-maps-for-wordpress'); ?>
8
- <select class='mapp-opacity'>
9
- <# for (var i = 100; i >= 0; i -= 10) { #>
10
- <option value='{{i}}'>{{i}}</option>
11
- <# } #>
12
- </select>
13
- <?php _e('Weight', 'mappress-google-maps-for-wordpress'); ?>
14
- <select class='mapp-weight'>
15
- <# for (var i = 1; i <= 20; i++) { #>
16
- <option value='{{i}}'>{{i}}</option>
17
- <# } #>
18
- </select>
19
- </div>
20
- </script>
21
-
22
- <script type='text/html' id='mapp-tmpl-icon-editor'>
23
- <div class='mapp-icon-editor'>
24
- <div class='mapp-icon-editor-wrapper'>
25
- <ul class='mapp-icon-editor-list'>
26
- <# if (!mappl10n.options.userIcons.length) { #>
27
- <h2 class='mapp-icon-editor-msg'>
28
- <?php _e('No custom icons have been added yet.', 'mappress-google-maps-for-wordpress');?>
29
- </h2>
30
- <# } #>
31
- <# _.each(mappl10n.options.userIcons, function(icon, i) { #>
32
- <li data-mapp-iconid='{{icon}}'>
33
- <span><img class='mapp-icon' title='{{icon}}' alt='{{icon}}' src='{{mappl10n.options.iconsUrl}}/{{icon}}'></span>
34
- <span>{{icon}}</span>
35
- <span data-mapp-action='delete' class='dashicons dashicons-trash'></span>
36
- </li>
37
- <# }); #>
38
- </ul>
39
- </div>
40
- <div class='mapp-icon-editor-toolbar'>
41
- <input type='file' multiple name='mapp-icon-files' class='mapp-icon-files'>
42
- <button data-mapp-action='add' class='button mapp-icon-add'><?php _e('Add', 'mappress-google-maps-for-wordpress');?></button>
43
- </div>
44
- </div>
45
- </script>
46
-
47
- <script type='text/html' id='mapp-tmpl-icon-picker'>
48
- <div class='mapp-iconpicker' tabindex='0'>
49
- <div class='mapp-iconpicker-wrapper'>
50
- <# _.each(mappl10n.options.userIcons, function(iconid, i) { #>
51
- <img class='mapp-icon' data-mapp-iconid='{{iconid}}' src='{{mappl10n.options.iconsUrl}}{{iconid}}' alt='iconid' title='iconid'>
52
- <# }); #>
53
- <br/>
54
- <# _.each(mappl10n.options.standardIcons, function(iconid, i) { #>
55
- <span data-mapp-iconid='{{iconid}}' class='mapp-icon-sprite' style='background-position: <# print(i * -24) #>px 0px' alt='{{iconid}}' title='{{iconid}}'></span>
56
- <# }); #>
57
- </div>
58
- <div class='mapp-iconpicker-toolbar'>
59
- <input class='button' data-mapp-iconid='' type='button' value='<?php _e('Use default icon', 'mappress-google-maps-for-wordpress');?>'>
60
- </div>
61
- </div>
62
- </div>
63
- </script>
64
-
65
- <script type='text/html' id='mapp-tmpl-tp-master'>
66
- <div class='mapp-tp-editor'>
67
- <?php echo Mappress_Controls::select('', array('map-popup' => __('Map popup', 'mappress-google-maps-for-wordpress'), 'map-item' => __('Map list item', 'mappress-google-maps-for-wordpress'), 'mashup-popup' => __('Mashup popup', 'mappress-google-maps-for-wordpress'), 'mashup-item' => __('Mashup list item', 'mappress-google-maps-for-wordpress')), 'map-tmpl-poi', array('class' => 'mapp-tp-select')); ?>
68
- <?php echo Mappress_Controls::button('', __('Edit', 'mappress-google-maps-for-wordpress'), array('class' => 'button button-primary', 'data-mapp-action' => 'edit')); ?>
69
- </div>
70
- </script>
71
-
72
- <script type='text/html' id='mapp-tmpl-tp-detail'>
73
- <div class='mapp-tp-detail'>
74
- <div class='mapp-tp-name'>{{ model.name }} <# if (!model.exists) { #>(<?php _e('New', 'mappress-google-maps-for-wordpress');?>)<# } else { #>(<?php _e('Custom', 'mappress-google-maps-for-wordpress');?>)<# } #></div>
75
- <div class='mapp-tp-path'>{{ model.path }}</div>
76
- <div class='mapp-tabs'>
77
- <div class='mapp-tab-label mapp-active' class='mapp-active'><?php _e('Editor', 'mappress-google-maps-for-wordpress');?></div>
78
- <div class='mapp-tab-label'><?php _e('Default', 'mappress-google-maps-for-wordpress');?></div>
79
- <div class='mapp-tab mapp-tab-content mapp-active'>
80
- <# _.each(tokens, function (token, i) { #>
81
- <code data-mapp-action='insert' data-mapp-insert='{{{i}}}' title='{{{i}}}'>{{{token}}}</code>
82
- <# }); #>
83
- <hr/>
84
- <textarea class='mapp-tp-content'>{{{ model.content }}}</textarea>
85
- </div>
86
- <div class='mapp-tab mapp-tab-standard'>
87
- <textarea readonly class='mapp-tp-standard'>{{{ model.standard }}}</textarea>
88
- </div>
89
- </div>
90
- <div class='mapp-tp-toolbar'>
91
- <input type='button' class='button button-primary' data-mapp-action='save' value='<?php _e('Save', 'mappress-google-maps-for-wordpress');?>'>
92
- <input type='button' class='button' data-mapp-action='cancel' value='<?php _e('Cancel', 'mappress-google-maps-for-wordpress');?>'>
93
- <# if (model.exists) { #>
94
- <a href='#' data-mapp-action='destroy'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
95
- <# } #>
96
- </div>
97
- </div>
98
- </script>