(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pvm_MapboxBasemapSelectControl"],{"81e1":function(e,t,o){"use strict";t["a"]={methods:{$_emitSelfEvent(e,t={}){this.$_emitMapEvent(e,{control:this.control,...t})},$_bindSelfEvents(e,t){Object.keys(this.$listeners).forEach(o=>{e.includes(o)&&t.on(o,this.$_emitSelfEvent)})},$_unbindSelfEvents(e,t){0!==e.length&&t&&e.forEach(e=>{t.off(e,this.$_emitSelfEvent)})}}}},"9f0b":function(e,t,o){"use strict";t["a"]={methods:{$_emitEvent(e,t={}){this.$emit(e,{map:this.map,component:this,...t})},$_emitMapEvent(e,t={}){this.$_emitEvent(e.type,{mapboxEvent:e,...t})}}}},aa65:function(e,t,o){"use strict";var n=o("9f0b"),s=o("81e1");t["a"]={mixins:[n["a"],s["a"]],inject:["mapbox","map","actions"],props:{position:{type:String,default:"top-right"}},beforeDestroy(){this.map&&this.control&&this.map.removeControl(this.control)},methods:{$_addControl(){try{this.map.addControl(this.control,this.position)}catch(e){return void this.$_emitEvent("error",{error:e})}this.$_emitEvent("added",{control:this.control})}},render(){}}},b3e7:function(e,t,o){"use strict";var n=o("c48b"),s=o.n(n);s.a},c48b:function(e,t,o){},e1e0:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{directives:[{name:"show",rawName:"v-show",value:e.shouldShowBasemapSelectControl,expression:"shouldShowBasemapSelectControl"}],class:"basemap-select-control "+e.isMobile},[o("select",{attrs:{id:"year-select"},on:{change:e.handleImageryChange}},e._l(e.imageryTypes,(function(t,n){return o("optgroup",{key:n,attrs:{label:t.label}},e._l(e.basemapsForImageryType(n),(function(t){return o("option",{key:t.key,attrs:{"data-key":t.key}},[e._v(" "+e._s(t.label)+" ")])})),0)})),0)])},s=[],a=(o("d81d"),o("b64b"),o("ac1f"),o("5319"),o("aa65"),{name:"MapboxBasemapSelectControl",props:["position"],computed:{shouldShowBasemapSelectControl:function(){return this.$store.state.map.shouldShowBasemapSelectControl},imageryTypes:function(){return this.$config.map.imageryTypes},currentImagery:function(){return this.$store.state.map.imagery},isMobile:function(){var e;return this.$store.state.isMobileOrTablet&&(e="mobile"),e}},methods:{handleImageryChange:function(){var e=document.getElementById("year-select"),t=e.options[e.selectedIndex].parentElement.label,o=e.options[e.selectedIndex].value,n=t.toLowerCase()+o;n=n.replace(/\s/g,""),this.$store.commit("setImagery",n)},basemapsForImageryType:function(e){for(var t=this.$config.map.basemaps,o=Object.keys(t),n=[],s=0,a=o;s<a.length;s++){var r=a[s],i=t[r],l=i.type;if(l===e){var c=i.label;n.push({type:l,label:c})}}return n}}}),r=a,i=(o("b3e7"),o("2877")),l=Object(i["a"])(r,n,s,!1,null,"24e9a9cb",null);t["default"]=l.exports}}]);
//# sourceMappingURL=pvm_MapboxBasemapSelectControl.96e1656e.js.map