text: (window.webpackJsonp=window.webpackJsonp||[]).push([[24],{382:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"googleMapsContainer",staticClass:"maps-component position-relative",class:this.aspectClass},[this.scriptBlocked?t("div",[this._t("default")],2):this._e()])};i._withStripped=!0;o(36),o(25),o(3);var n=o(115),s=o(1),a={props:{address:{type:String,required:!1},lat:{type:Number,required:!1},lng:{type:Number,required:!1},zoom:{type:Number,default:16},maptype:{type:String,default:"roadmap"},aspectRatio:{type:String,default:"3-1"}},data:function(){return{scriptBlocked:!0}},computed:{aspectClass:function(){return"prop-"+this.aspectRatio}},mounted:function(){var e=this;this.$nextTick((function(){e.createScript().then((function(){e.initializeMap()})).catch((function(){}))}))},methods:{createScript:function(){var e=this;return new Promise((function(t,o){var i=document.querySelector("script#google-maps-api");Object(s.e)(i)?Object(n.a)("media.googleMaps",(function(){e.scriptBlocked=!1;var i=document.createElement("script");i.type="text/javascript",i.id="google-maps-api",i.src="https://maps.googleapis.com/maps/api/js?key=".concat(App.config.global.googleMapsApiKey),i.addEventListener("load",(function(){return t(i)}),!1),i.addEventListener("error",(function(){return o(i)}),!1),document.body.appendChild(i)}),(function(){e.scriptBlocked=!0})):(e.scriptBlocked=!1,Object(s.e)(window.google)?i.addEventListener("load",(function(){return t(i)}),!1):t(i))}))},getCoordinates:function(){var e=this,t=!isNaN(this.lat)&&this.lat>-90&&this.lat<90,o=!isNaN(this.lng)&&this.lng>-180&&this.lng<180;return t&&o?Promise.resolve({lat:this.lat,lng:this.lng}):this.address&&window.google?new Promise((function(t,o){(new google.maps.Geocoder).geocode({address:e.address},(function(e,i){e&&e.length>0&&e[0].geometry?t(e[0].geometry.location):o()}))})):Promise.reject()},initializeMap:function(){var e=this;this.getCoordinates().then((function(t){var o=new google.maps.Map(e.$refs.googleMapsContainer,{center:t,zoom:e.zoom,mapTypeId:e.maptype});new google.maps.Marker({map:o,position:t})}))}}},r=o(5),c=Object(r.a)(a,i,[],!1,null,null,null);c.options.__file="resources/js/src/app/components/common/GoogleMaps.vue";t.default=c.exports}}]);
  //# sourceMappingURL=ceres-24.min.js.map