(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["mbmp_pvm_MglIcon"],{"3e72":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{display:"none"}},[r("div",{staticClass:"test-div"}),t._t("icon"),t.marker?t._t("default"):t._e()],2)},i=[],a=(r("4160"),r("caad"),r("d81d"),r("b64b"),r("07ac"),r("2532"),r("159b"),r("5530")),s=r("9f0b"),o=r("81e1"),c={drag:"drag",dragstart:"dragstart",dragend:"dragend"},d={click:"click",mouseenter:"mouseenter",mouseleave:"mouseleave"},u={name:"MapIcon",mixins:[s["a"],o["a"]],inject:["mapbox","map"],provide:function(){var t=this;return{get marker(){return t.marker}}},props:{offset:{type:[Object,Array],default:function(){return[0,0]}},coordinates:{type:Array,required:!0},color:{type:String},anchor:{type:String,default:"center"},draggable:{type:Boolean,default:!1}},data:function(){return{initial:!0,marker:void 0}},watch:{coordinates:function(t){this.initial||this.marker.setLngLat(t)},draggable:function(t){this.initial||this.marker.setDraggable(t)}},mounted:function(){var t=this,e=Object(a["a"])({},this.$props);console.log("Icon.vue, markerOptions:",e),this.$slots.marker&&(e.element=this.$slots.marker[0].elm);var r=document.createElement("div");r.className="test-div",this.marker=new this.mapbox.Marker(r),this.$listeners["update:coordinates"]&&this.marker.on("dragend",(function(e){var r;r=t.coordinates instanceof Array?[e.target._lngLat.lng,e.target._lngLat.lat]:e.target._lngLat,t.$emit("update:coordinates",r)}));var n=Object.keys(c);this.$_bindSelfEvents(n,this.marker),this.initial=!1,this.$_addMarker()},beforeDestroy:function(){void 0!==this.map&&void 0!==this.marker&&this.marker.remove()},methods:{$_addMarker:function(){this.marker.setLngLat(this.coordinates).addTo(this.map),this.$_bindMarkerDOMEvents(),this.$_emitEvent("added",{marker:this.marker})},$_emitSelfEvent:function(t){this.$_emitMapEvent(t,{marker:this.marker})},$_bindMarkerDOMEvents:function(){var t=this;Object.keys(this.$listeners).forEach((function(e){Object.values(d).includes(e)&&t.marker._element.addEventListener(e,(function(e){t.$_emitSelfEvent(e)}))}))},remove:function(){this.marker.remove(),this.$_emitEvent("removed")},togglePopup:function(){return this.marker.togglePopup()}}},f=u,m=(r("f425"),r("2877")),l=Object(m["a"])(f,n,i,!1,null,null,null);e["default"]=l.exports},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b");var n=r("ade3");function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}},"6d0d":function(t,e,r){},"81e1":function(t,e,r){"use strict";e["a"]={methods:{$_emitSelfEvent(t,e={}){this.$_emitMapEvent(t,{control:this.control,...e})},$_bindSelfEvents(t,e){Object.keys(this.$listeners).forEach(r=>{t.includes(r)&&e.on(r,this.$_emitSelfEvent)})},$_unbindSelfEvents(t,e){0!==t.length&&e&&t.forEach(t=>{e.off(t,this.$_emitSelfEvent)})}}}},"9f0b":function(t,e,r){"use strict";e["a"]={methods:{$_emitEvent(t,e={}){this.$emit(t,{map:this.map,component:this,...e})},$_emitMapEvent(t,e={}){this.$_emitEvent(t.type,{mapboxEvent:t,...e})}}}},dbb4:function(t,e,r){var n=r("23e7"),i=r("83ab"),a=r("56ef"),s=r("fc6a"),o=r("06cf"),c=r("8418");n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){var e,r,n=s(t),i=o.f,d=a(n),u={},f=0;while(d.length>f)r=i(n,e=d[f++]),void 0!==r&&c(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),i=r("d039"),a=r("fc6a"),s=r("06cf").f,o=r("83ab"),c=i((function(){s(1)})),d=!o||c;n({target:"Object",stat:!0,forced:d,sham:!o},{getOwnPropertyDescriptor:function(t,e){return s(a(t),e)}})},f425:function(t,e,r){"use strict";var n=r("6d0d"),i=r.n(n);i.a}}]);
//# sourceMappingURL=mbmp_pvm_MglIcon.23e1d321.js.map