(window["aioseopjsonp"]=window["aioseopjsonp"]||[]).push([["local-seo-pro-Maps-vue"],{"56bf":function(s,e,t){"use strict";t("c341")},9268:function(s,e,t){"use strict";t.r(e);var i=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"aioseo-local-maps"},[t("core-card",{attrs:{slug:"localBusinessMapsApiKey"},scopedSlots:s._u([{key:"header",fn:function(){return[s._v(" "+s._s(s.strings.googleMapsApiKey)+" ")]},proxy:!0}])},[t("div",{staticClass:"aioseo-settings-row"},[t("p",{staticClass:"apikey-description",domProps:{innerHTML:s._s(s.strings.description)}})]),t("core-settings-row",{attrs:{name:s.strings.apiKey,align:""},scopedSlots:s._u([{key:"content",fn:function(){return[t("base-input",{class:{"aioseo-error":!1===s.options.localBusiness.maps.apiKeyValid},attrs:{size:"medium",spellcheck:!1},on:{input:function(e){return s.checkApiKey()}},scopedSlots:s._u([{key:"append-icon",fn:function(){return[t("div",{staticClass:"append-icon"},[[!1===s.options.localBusiness.maps.apiKeyValid?t("svg-circle-close"):s._e()]],2)]},proxy:!0}]),model:{value:s.options.localBusiness.maps.apiKey,callback:function(e){s.$set(s.options.localBusiness.maps,"apiKey",e)},expression:"options.localBusiness.maps.apiKey"}}),t("div",{staticClass:"aioseo-description",domProps:{innerHTML:s._s(s.strings.apiKeyDescription)}}),!1===s.options.localBusiness.maps.apiKeyValid?t("core-alert",{attrs:{type:"red"},domProps:{innerHTML:s._s(s.strings.apiKeyInvalid)}}):s._e(),s.options.localBusiness.maps.apiKey&&s.options.localBusiness.maps.apiKeyValid&&!1===s.options.localBusiness.maps.mapsEmbedApiEnabled?t("core-alert",{attrs:{type:"yellow"},domProps:{innerHTML:s._s(s.strings.placeSelected)}}):s._e()]},proxy:!0}])}),s.options.localBusiness.maps.apiKey?t("core-settings-row",{attrs:{name:s.strings.mapPreview,align:""},scopedSlots:s._u([{key:"content",fn:function(){return[t("core-map",{attrs:{apiKey:s.options.localBusiness.maps.apiKey,options:s.defaultMapOptions,placeId:s.options.localBusiness.maps.placeId,marker:s.currentMarker}})]},proxy:!0}],null,!1,1669766895)}):s._e()],1),s.options.localBusiness.maps.apiKey?t("core-card",{attrs:{slug:"localBusinessMapsSettings"},scopedSlots:s._u([{key:"header",fn:function(){return[s._v(" "+s._s(s.strings.mapSettings)+" ")]},proxy:!0}],null,!1,2727138174)},[t("local-business-map-display-info",{attrs:{label:s.strings.displayMap,displayOptions:s.displayInfo}}),t("local-business-map-default-style"),t("local-business-map-custom-marker")],1):s._e()],1)},a=[],o=t("5530"),n=(t("d4ec"),t("bee2"),t("ade3"),t("1da1")),p=(t("96cf"),t("a15b"),t("d3b7"),t("159b"),t("a026"));function l(s,e){return r.apply(this,arguments)}function r(){return r=Object(n["a"])(regeneratorRuntime.mark((function s(e,t){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(e&&t){s.next=2;break}return s.abrupt("return",!1);case 2:s.t0=t,s.next="places/embed"===s.t0?5:8;break;case 5:return s.next=7,p["default"].prototype.$http.post(p["default"].prototype.$links.restUrl("local-business/maps/check-api-enabled")).send({apiKey:e,apiName:t}).then((function(s){return 200===s.statusCode})).catch((function(s){return!1}));case 7:return s.abrupt("return",s.sent);case 8:return s.abrupt("return",!1);case 9:case"end":return s.stop()}}),s)}))),r.apply(this,arguments)}var c=t("2f62"),u={data:function(){return{strings:{googleMapsApiKey:this.$t.__("Google Maps API Key",this.$td),description:this.$t.sprintf(this.$t.__("Integrating with Google Maps will allow your users to find exactly where your business is located. Our interactive maps let them see your Google Reviews and get directions directly from your site. Create multiple maps for use with multiple locations. %s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"localSeoMapSetup",!0)),apiKey:this.$t.__("API Key",this.$td),apiKeyDescription:this.$t.sprintf(this.$t.__("A Google API Key is necessary to render your maps. %s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"localSeoMapSetup",!0)),mapSettings:this.$t.__("Map Settings",this.$td),apiKeyInvalid:this.$t.sprintf(this.$t.__("Your API Key is invalid. Please make sure you have set your key correctly. %1$s",this.$td),this.$links.getDocLink(this.$t.__("Learn more",this.$td),"localSeoMapSetup",!0)),placeSelected:this.$t.sprintf(this.$t.__("Your Maps Embed API is not enabled. For a more seamless experience with rich information cards, please enable it in your Google Project. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"localSeoMapEmbedApi",!0)),displayMap:this.$t.__("Display Map",this.$td),mapPreview:this.$t.__("Map Preview",this.$td)},displayInfo:{widget:{copy:"",desc:this.$t.sprintf(this.$t.__('To add this widget, visit the %1$swidgets page%2$s and look for the "%3$s Local - Map" widget.',this.$td),''),"","AIOSEO")},shortcode:{copy:"[aioseo_local_map]",desc:this.$t.sprintf(this.$t.__("Use the following shortcode to display the location map. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"localSeoShortcodeMap",!0))},block:{copy:"",desc:this.$t.sprintf(this.$t.__('To add this block, edit a page or post and search for the "%1$s Local - Map" block.',this.$td),"AIOSEO")},php:{copy:"",desc:this.$t.sprintf(this.$t.__("Use the following PHP code anywhere in your theme to display the location map. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"localSeoFunctionMap",!0))}}}},computed:Object(o["a"])(Object(o["a"])({},Object(c["e"])(["options"])),{},{defaultMapOptions:function(){return Object(o["a"])(Object(o["a"])({},this.options.localBusiness.maps.mapOptions),this.$aioseo.localBusiness.mapDefaults)},currentMarker:function(){return{position:this.options.localBusiness.maps.mapOptions.center,icon:this.options.localBusiness.maps.customMarker}}}),methods:{apiKeyFailed:function(){this.options.localBusiness.maps.apiKeyValid=!1},checkApiKey:function(){this.options.localBusiness.maps.apiKeyValid=!0,this.options.localBusiness.maps.mapsEmbedApiEnabled=null,window.gm_authFailure=this.apiKeyFailed,this.checkMapEmbedApi()},checkMapEmbedApi:function(){var s=this;l(this.options.localBusiness.maps.apiKey,"places/embed").then((function(e){s.options.localBusiness.maps.mapsEmbedApiEnabled=e}))}},mounted:function(){this.options.localBusiness.maps.apiKey&&this.checkMapEmbedApi()}},d=u,h=(t("56bf"),t("2877")),m=Object(h["a"])(d,i,a,!1,null,null,null);e["default"]=m.exports},c341:function(s,e,t){}}]);