Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-maplibre-gl

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-maplibre-gl - npm Package Compare versions

Comparing version 1.0.0-beta.4 to 1.0.0-beta.5

6

dist/vue-maplibre-gl.esm.js

@@ -966,10 +966,12 @@ import { reactive, watch, defineComponent, getCurrentInstance, ref, provide, onMounted, onBeforeUnmount, h, inject, createCommentVNode, Teleport, nextTick, warn, renderSlot, createTextVNode } from 'vue';

}, this.mapStyles.map(s => {
var _this$intModelValue, _this$intModelValue2;
return s.icon ? h(MglButton, {
type: ButtonType.MDI,
path: s.icon.path,
'class': this.intModelValue === s ? 'is-active' : '',
'class': ((_this$intModelValue = this.intModelValue) === null || _this$intModelValue === void 0 ? void 0 : _this$intModelValue.name) === s.name ? 'is-active' : '',
onClick: () => this.setStyle(s)
}, createTextVNode(s.label)) : h('button', {
type: 'button',
'class': this.intModelValue === s ? 'is-active' : '',
'class': ((_this$intModelValue2 = this.intModelValue) === null || _this$intModelValue2 === void 0 ? void 0 : _this$intModelValue2.name) === s.name ? 'is-active' : '',
onClick: () => this.setStyle(s)

@@ -976,0 +978,0 @@ }, createTextVNode(s.label));

@@ -1,1 +0,1 @@

var VueMaplibreGl=function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),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 a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var o,r,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(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 u(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 u(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 l=Symbol("map"),c=Symbol("isLoaded"),s=Symbol("componentId"),d=Symbol("sourceId"),m=Symbol("emitter"),f=e.reactive({style:"https://demotiles.maplibre.org/style.json",center:Object.freeze([0,0]),zoom:1}),p=new Map,v=Symbol("default");var y,g=function(){function e(){n(this,e)}return r(e,null,[{key:"createEventHandler",value:function(e,t,n,o){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.emit(o,{type:r.type,map:t,component:e,event:r})}}}]),e}();i(g,"MAP_OPTION_KEYS",["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","crossSourceCollisions","container","customAttribution","dragPan","dragRotate","doubleClickZoom","hash","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","interactive","keyboard","locale","localIdeographFontFamily","logoPosition","maxBounds","maxPitch","maxZoom","minPitch","minZoom","preserveDrawingBuffer","pitch","pitchWithRotate","refreshExpiredTiles","renderWorldCopies","scrollZoom","mapStyle","trackResize","transformRequest","touchZoomRotate","touchPitch","zoom","maxTileCacheSize","accessToken"]),i(g,"MARKER_OPTION_KEYS",["element","offset","anchor","color","draggable","clickTolerance","rotation","rotationAlignment","pitchAlignment","scale"]),i(g,"MAP_EVENT_TYPES",["error","load","idle","remove","render","resize","webglcontextlost","webglcontextrestored","dataloading","data","tiledataloading","sourcedataloading","styledataloading","sourcedata","styledata","boxzoomcancel","boxzoomstart","boxzoomend","touchcancel","touchmove","touchend","touchstart","click","contextmenu","dblclick","mousemove","mouseup","mousedown","mouseout","mouseover","movestart","move","moveend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","dragstart","drag","dragend","pitchstart","pitch","pitchend","wheel"]),function(e){e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right"}(y||(y={}));var b=Object.values(y);function h(t,n,o){e.watch(t,(function(e){e&&-1===b.indexOf(e)||(n.value.hasControl(o)&&n.value.removeControl(o),n.value.addControl(o,e))}),{immediate:!0})}var S,C=e.defineComponent({name:"MglMap",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},antialias:{type:Boolean,default:function(){return f.antialias}},attributionControl:{type:Boolean,default:function(){return f.attributionControl}},bearing:{type:Number,default:function(){return f.bearing}},bearingSnap:{type:Number,default:function(){return f.bearingSnap}},bounds:{type:[Array,Object],default:function(){return f.bounds}},boxZoom:{type:Boolean,default:function(){return f.boxZoom}},center:{type:[Array,Object],default:function(){return f.center}},clickTolerance:{type:Number,default:function(){return f.clickTolerance}},collectResourceTiming:{type:Boolean,default:function(){return f.collectResourceTiming}},crossSourceCollisions:{type:Boolean,default:function(){return f.crossSourceCollisions}},customAttribution:{type:[String,Array],default:function(){return f.customAttribution}},dragPan:{type:Boolean,default:function(){return f.dragPan}},dragRotate:{type:Boolean,default:function(){return f.dragRotate}},doubleClickZoom:{type:Boolean,default:function(){return f.doubleClickZoom}},hash:{type:[Boolean,String],default:function(){return f.hash}},fadeDuration:{type:Number,default:function(){return f.fadeDuration}},failIfMajorPerformanceCaveat:{type:Boolean,default:function(){return f.failIfMajorPerformanceCaveat}},fitBoundsOptions:{type:Object,default:function(){return f.fitBoundsOptions}},interactive:{type:Boolean,default:function(){return f.interactive}},keyboard:{type:Boolean,default:function(){return f.keyboard}},locale:{type:Object,default:function(){return f.locale}},localIdeographFontFamily:{type:String,default:function(){return f.localIdeographFontFamily}},logoPosition:{type:[String],validate:function(e){return e in y},default:function(){return f.logoPosition}},maxBounds:{type:[Array,Object],default:function(){return f.maxBounds}},maxPitch:{type:Number,default:function(){return f.maxPitch}},maxZoom:{type:Number,default:function(){return f.maxZoom}},minPitch:{type:Number,default:function(){return f.minPitch}},minZoom:{type:Number,default:function(){return f.minZoom}},preserveDrawingBuffer:{type:Boolean,default:function(){return f.preserveDrawingBuffer}},pitch:{type:Number,default:function(){return f.pitch}},pitchWithRotate:{type:Boolean,default:function(){return f.pitchWithRotate}},refreshExpiredTiles:{type:Boolean,default:function(){return f.refreshExpiredTiles}},renderWorldCopies:{type:Boolean,default:function(){return f.renderWorldCopies}},scrollZoom:{type:Boolean,default:function(){return f.scrollZoom}},mapStyle:{type:[String,Object],default:function(){return f.style}},trackResize:{type:Boolean,default:function(){return f.trackResize}},transformRequest:{type:Function,default:f.transformRequest},touchZoomRotate:{type:Boolean,default:function(){return f.touchZoomRotate}},touchPitch:{type:Boolean,default:function(){return f.touchPitch}},zoom:{type:Number,default:function(){return f.zoom}},maxTileCacheSize:{type:Number,default:function(){return f.maxTileCacheSize}},accessToken:{type:String,default:function(){return f.accessToken}},mapKey:{type:[String,Symbol]}},emits:["map:error","map:load","map:idle","map:remove","map:render","map:resize","map:webglcontextlost","map:webglcontextrestored","map:dataloading","map:data","map:tiledataloading","map:sourcedataloading","map:styledataloading","map:sourcedata","map:styledata","map:boxzoomcancel","map:boxzoomstart","map:boxzoomend","map:touchcancel","map:touchmove","map:touchend","map:touchstart","map:click","map:contextmenu","map:dblclick","map:mousemove","map:mouseup","map:mousedown","map:mouseout","map:mouseover","map:movestart","map:move","map:moveend","map:zoomstart","map:zoom","map:zoomend","map:rotatestart","map:rotate","map:rotateend","map:dragstart","map:drag","map:dragend","map:pitchstart","map:pitch","map:pitchend","map:wheel"],setup:function(n,o){console.log("PROPS",n);var r,i,a=e.getCurrentInstance(),u=e.ref(null),f=e.ref(null),p=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=new Map,h={all:r=r||new Map,on:function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},off:function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var n=r.get(e);n&&n.slice().map((function(e){e(t)})),(n=r.get("*"))&&n.slice().map((function(n){n(e,t)}))}};return e.provide(l,p),e.provide(c,y),e.provide(s,a.uid),e.provide(d,""),e.provide(m,h),e.watch((function(){return n.bearing}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setBearing(e)})),e.watch((function(){return n.bounds}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.fitBounds(e,n.fitBoundsOptions)})),e.watch((function(){return n.center}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setCenter(e)})),e.watch((function(){return n.maxBounds}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxBounds(e)})),e.watch((function(){return n.maxPitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxPitch(e)})),e.watch((function(){return n.maxZoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxZoom(e)})),e.watch((function(){return n.minPitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMinPitch(e)})),e.watch((function(){return n.minZoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMinZoom(e)})),e.watch((function(){return n.pitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setPitch(e)})),e.watch((function(){return n.renderWorldCopies}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setRenderWorldCopies(e)})),e.watch((function(){return n.mapStyle}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setStyle(e)})),e.watch((function(){return n.transformRequest}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setTransformRequest(e)})),e.watch((function(){return n.zoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setZoom(e)})),e.watch((function(){return n.zoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setZoom(e)})),e.onMounted((function(){var e=Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==g.MAP_OPTION_KEYS.indexOf(e)})).reduce((function(e,t){return e["mapStyle"===t?"style":t]=n[t],e}),{container:f.value});if(console.log("map opts",e),p.value=new t.Map(e),v.value=!0,b.set("__load",(function(){return y.value=!0})),p.value.on("load",b.get("__load")),a.vnode.props)for(var r=0,l=g.MAP_EVENT_TYPES.length;r<l;r++)if(a.vnode.props["onMap:"+g.MAP_EVENT_TYPES[r]]){var c=g.createEventHandler(a,p.value,o,"map:"+g.MAP_EVENT_TYPES[r]);b.set(g.MAP_EVENT_TYPES[r],c),p.value.on(g.MAP_EVENT_TYPES[r],c)}(i=new ResizeObserver(p.value.resize.bind(p.value))).observe(u.value)})),e.onBeforeUnmount((function(){i&&i.disconnect(),p.value&&b.forEach((function(e,t){p.value.off(t.startsWith("__")?t.substr(2):t,e)}))})),{map:p,componentContainer:u,container:f,isLoaded:y,isInitialized:v}},created:function(){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;p.has(t)||p.set(t,e)}(this,this.mapKey)},render:function(){return e.h("div",{ref:"componentContainer",class:"mgl-container",style:{height:this.$props.height,width:this.$props.width}},[e.h("div",{ref:"container",class:"mgl-wrapper"}),this.isInitialized&&this.$slots.default?this.$slots.default():void 0])}}),M=e.defineComponent({name:"MglAttributionControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},compact:Boolean,customAttribution:[String,Array]},setup:function(n){var o=e.inject(l),r=new t.AttributionControl({compact:n.compact,customAttribution:n.customAttribution});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),O=e.defineComponent({name:"MglNavigationControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},showCompass:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},visualizePitch:Boolean},setup:function(n){var o=e.inject(l),r=new t.NavigationControl({showCompass:n.showCompass,showZoom:n.showZoom,visualizePitch:n.visualizePitch});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}});!function(e){e.IMPERIAL="imperial",e.METRIC="metric",e.NAUTICAL="nautical"}(S||(S={}));var j=Object.values(S),L=e.defineComponent({name:"MglScaleControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},maxWidth:{type:Number,default:100},unit:{type:String,default:S.METRIC,validator:function(e){return-1!==j.indexOf(e)}}},setup:function(n){var o=e.inject(l),r=new t.ScaleControl({maxWidth:n.maxWidth,unit:n.unit});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),w=e.defineComponent({name:"MglFullscreenControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},container:{type:HTMLElement,default:null}},setup:function(n){var o=e.inject(l),r=new t.FullscreenControl({container:n.container});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),x=e.defineComponent({name:"MglGeolocationControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},positionOptions:{type:Object,default:{enableHighAccuracy:!1,timeout:6e3}},fitBoundsOptions:{type:Object,default:{maxZoom:15}},trackUserLocation:{type:Boolean,default:!1},showAccuracyCircle:{type:Boolean,default:!0},showUserLocation:{type:Boolean,default:!0}},setup:function(n){var o=e.inject(l),r=new t.GeolocateControl({positionOptions:n.positionOptions,fitBoundsOptions:n.fitBoundsOptions,trackUserLocation:n.trackUserLocation,showAccuracyCircle:n.showAccuracyCircle,showUserLocation:n.showUserLocation});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),I=function(){function t(e,o){n(this,t),this.isAdded=e,this.container=document.createElement("div"),this.setClasses(o)}return r(t,[{key:"getDefaultPosition",value:function(){return y.TOP_LEFT}},{key:"onAdd",value:function(){var t=this;return e.nextTick((function(){return t.isAdded.value=!0})),this.container}},{key:"onRemove",value:function(){this.isAdded.value=!1}},{key:"setClasses",value:function(e){e?(this.container.classList.remove(t.CONTROL_CLASS),this.container.classList.remove(t.CONTROL_GROUP_CLASS)):(this.container.classList.add(t.CONTROL_CLASS),this.container.classList.add(t.CONTROL_GROUP_CLASS))}}]),t}();i(I,"CONTROL_CLASS","maplibregl-ctrl"),i(I,"CONTROL_GROUP_CLASS","maplibregl-ctrl-group");var T,B,N=e.defineComponent({name:"MglCustomControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},noClasses:{type:Boolean,default:!1}},setup:function(t){var n=e.inject(l),o=e.ref(!1),r=new I(o,t.noClasses);return h((function(){return t.position}),n,r),e.watch((function(){return t.noClasses}),(function(e){return r.setClasses(e)})),e.onBeforeUnmount((function(){return n.value.removeControl(r)})),{isAdded:o,container:r.container}},render:function(){return this.isAdded?e.h(e.Teleport,{to:this.container},this.$slots.default?this.$slots.default():void 0):e.createCommentVNode("custom-component")}});!function(e){e.DEFAULT="default",e.TEXT="text",e.MDI="mdi",e.SIMPLE_ICON="simple-icons"}(B||(B={}));var A=Object.values(B),P=(i(T={},B.TEXT,void 0),i(T,B.MDI,{size:21,viewbox:"0 0 24 24"}),i(T,B.SIMPLE_ICON,{size:21,viewbox:"0 0 24 24"}),i(T,B.DEFAULT,{size:0,viewbox:"0 0 0 0"}),T),z=e.defineComponent({name:"MglButton",props:{type:{type:String,default:B.DEFAULT,validator:function(e){return-1!==A.indexOf(e)}},path:{type:String},size:Number,viewbox:String},setup:function(t){t.path||t.type===B.TEXT||e.warn("property `path` must be set on MaplibreButton");var n=e.ref(P[t.type]||P.default);return e.watch((function(){return t.type}),(function(e){return n.value=P[e]||P.default})),{defaults:n}},render:function(){return this.type===B.TEXT?e.h("button",{type:"button"},this.$slots.default?this.$slots.default():void 0):e.h("button",{type:"button",class:"maplibregl-ctrl-icon"},[e.h("svg",{width:this.size||this.defaults.size,height:this.size||this.defaults.size,viewBox:this.viewbox||this.defaults.viewbox},e.h("path",{fill:"currentColor",d:this.path})),this.$slots.default?this.$slots.default():void 0])}});function E(e){return!!e.stopPropagation}var R=e.defineComponent({name:"MglStyleSwitchControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},mapStyles:{type:Array,required:!0,default:[]},modelValue:{type:Object},isOpen:{type:Boolean,default:void 0}},emits:["update:modelValue","update:isOpen"],setup:function(t,n){var o=e.inject(l),r=e.inject(c),i=e.inject(m),a=e.ref(!1),u=e.ref(void 0!==t.isOpen&&t.isOpen),s=e.ref(void 0===t.modelValue?t.mapStyles.length?t.mapStyles[0]:null:t.modelValue),d=new I(a,!1),f=y.bind(null,!1);function p(){for(var e=o.value.getStyle().name,n=0,r=t.mapStyles.length;n<r;n++)if(t.mapStyles[n].name===e){v(t.mapStyles[n]);break}}function v(e){var r;(null===(r=s.value)||void 0===r?void 0:r.name)!==e.name&&(i.emit("styleSwitched",e),o.value.setStyle(e.style),void 0===t.modelValue&&(s.value=e),n.emit("update:modelValue",e),y(!1))}function y(e,o){E(o)?o.stopPropagation():E(e)&&e.stopPropagation(),void 0!==t.isOpen&&t.isOpen===e||u.value===e||(console.log("toggleOpen",e,o),void 0===t.isOpen?(u.value="boolean"==typeof e?e:!u.value,n.emit("update:isOpen",u.value)):n.emit("update:isOpen","boolean"==typeof e?e:!t.isOpen))}return e.watch(r,(function(e){e&&p()}),{immediate:!0}),o.value.on("style.load",p),document.addEventListener("click",f),h((function(){return t.position}),o,d),void 0!==t.modelValue&&e.watch((function(){return t.modelValue}),(function(e){void 0!==e&&(s.value=e)})),void 0!==t.isOpen&&e.watch((function(){return t.isOpen}),(function(e){void 0!==e&&(u.value=e)})),e.onBeforeUnmount((function(){o.value.removeControl(d),o.value.off("style.load",p),document.removeEventListener("click",f)})),{isAdded:a,container:d.container,setStyle:v,toggleOpen:y,intIsOpen:u,intModelValue:s}},template:'\n\t\t<div class="maplibregl-ctrl maplibregl-ctrl-group">\n\t\t<slot name="button">\n\t\t\t<button type="button" class="maplibregl-ctrl-icon maplibregl-style-switch"></button>\n\t\t</slot>\n\t\t<slot name="styleList">\n\t\t\t<div class="maplibregl-style-list" style="display: none;">\n\t\t\t\t<button type="button" class="Dark" data-uri="&quot;mapbox://styles/mapbox/dark-v10&quot;">Dark</button>\n\t\t\t\t<button type="button" class="Light" data-uri="&quot;mapbox://styles/mapbox/light-v10&quot;">Light</button>\n\t\t\t\t<button type="button" class="Outdoors" data-uri="&quot;mapbox://styles/mapbox/outdoors-v11&quot;">Outdoors</button>\n\t\t\t\t<button type="button" class="Satellite" data-uri="&quot;mapbox://styles/mapbox/satellite-streets-v11&quot;">Satellite</button>\n\t\t\t\t<button type="button" class="Streets active" data-uri="&quot;mapbox://styles/mapbox/streets-v11&quot;">Streets</button>\n\t\t\t</div>\n\t\t</slot>\n\t\t</div>\n\t',render:function(){var t=this;return this.isAdded?e.h(e.Teleport,{to:this.container},[e.renderSlot(this.$slots,"button",{isOpen:this.intIsOpen,toggleOpen:this.toggleOpen},(function(){return[e.h(z,{type:B.MDI,path:"M12,18.54L19.37,12.8L21,14.07L12,21.07L3,14.07L4.62,12.81L12,18.54M12,16L3,9L12,2L21,9L12,16M12,4.53L6.26,9L12,13.47L17.74,9L12,4.53Z",class:["maplibregl-ctrl-icon maplibregl-style-switch",t.intIsOpen?"is-open":""],onClick:t.toggleOpen.bind(null,!0)})]})),e.renderSlot(this.$slots,"styleList",{mapStyles:this.mapStyles,setStyle:this.setStyle},(function(){return[e.h("div",{class:["maplibregl-style-list",t.intIsOpen?"is-open":""]},t.mapStyles.map((function(n){return n.icon?e.h(z,{type:B.MDI,path:n.icon.path,class:t.intModelValue===n?"is-active":"",onClick:function(){return t.setStyle(n)}},e.createTextVNode(n.label)):e.h("button",{type:"button",class:t.intModelValue===n?"is-active":"",onClick:function(){return t.setStyle(n)}},e.createTextVNode(n.label))})))]}))]):e.createCommentVNode("style-switch-control")}}),k=e.defineComponent({name:"MglMarker",props:{coordinates:{type:[Object,Array],required:!0},offset:[Object,Array],anchor:String,color:String,clickTolerance:Number,rotation:Number,rotationAlignment:String,pitchAlignment:String,scale:Number},setup:function(n){var o=e.inject(l),r=Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==g.MARKER_OPTION_KEYS.indexOf(e)})).reduce((function(e,t){return e[t]=n[t],e}),{}),i=new t.Marker(r);return i.setLngLat(n.coordinates).addTo(o.value),e.watch((function(){return n.coordinates}),(function(e){return i.setLngLat(e)})),e.watch((function(){return n.offset}),(function(e){return i.setOffset(e||[0,0])})),e.watch((function(){return n.pitchAlignment}),(function(e){return i.setPitchAlignment(e||"auto")})),e.watch((function(){return n.rotationAlignment}),(function(e){return i.setRotationAlignment(e||"auto")})),e.onBeforeUnmount(i.remove.bind(i)),{marker:i}},render:function(){}});var _=new Map;function V(t,n){var o="string"==typeof n,r=String(t)+(o?n:""),i=_.get(r);return i||(i=e.ref(o?null:void 0),_.set(r,i)),i}function U(t,n,o,r,i,a,u){function l(){o.value&&(t.value.addSource(i.sourceId,function(e,t,n){return Object.keys(t).filter((function(e){return void 0!==t[e]&&-1!==n.indexOf(e)})).reduce((function(e,n){return e[n]=t[n],e}),{type:e})}(a,i,u)),n.value=t.value.getSource(i.sourceId))}function c(){n.value=null}return e.watch(o,l,{immediate:!0}),t.value.on("style.load",l),r.on("styleSwitched",c),e.onBeforeUnmount((function(){o.value&&t.value.removeSource(i.sourceId),t.value.off("style.load",l),r.off("styleSwitched",c)}))}var Z=["animate","coordinates","canvas"],F=e.defineComponent({name:"MglCanvasSource",props:{sourceId:{type:String,required:!0},coordinates:Array,animate:Boolean,canvas:[HTMLCanvasElement,String]},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"canvas",Z),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return[e.createCommentVNode("Canvas Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),q=["data","maxzoom","attribution","buffer","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","promoteId","filter"],D=e.defineComponent({name:"MglGeoJsonSource",props:{sourceId:{type:String,required:!0},data:[Object,String],maxzoom:Number,attribution:String,buffer:Number,tolerance:Number,cluster:[Number,Boolean],clusterRadius:Number,clusterMaxZoom:Number,clusterMinPoints:Number,clusterProperties:Object,lineMetrics:Boolean,generateId:Boolean,promoteId:Object,filter:[Array,String,Object]},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"geojson",q),e.watch((function(){return t.data}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setData(e||"")})),{source:i}},render:function(){return[e.createCommentVNode("GeoJSON Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),H=["url","coordinates"],$=e.defineComponent({name:"MglImageSource",props:{sourceId:{type:String,required:!0},url:String,coordinates:Array},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"image",H),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return[e.createCommentVNode("Image Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),G=["url","tiles","bounds","minzoom","maxzoom","tileSize","scheme","attribution"],W=e.defineComponent({name:"MglRasterSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,minzoom:Number,maxzoom:Number,tileSize:Number,scheme:String,attribution:String},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"raster",G),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),Y=["url","tiles","bounds","minzoom","maxzoom","tileSize","attribution","encoding"],K=e.defineComponent({name:"MglRasterDemSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,minzoom:Number,maxzoom:Number,tileSize:Number,attribution:String,encoding:String},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"raster-dem",Y),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),J=["url","tiles","bounds","scheme","minzoom","maxzoom","attribution","promoteId"],X=e.defineComponent({name:"MglVectorSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,scheme:String,minzoom:Number,maxzoom:Number,attribution:String,promoteId:Object},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"vector",J),e.watch((function(){return t.tiles}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setTiles(e||[])})),e.watch((function(){return t.url}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setUrl(e||"")})),{source:i}},render:function(){return e.createCommentVNode("Vector Source")}}),Q=["urls","coordinates"],ee=e.defineComponent({name:"MglVideoSource",props:{sourceId:{type:String,required:!0},urls:Array,coordinates:Array},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"video",Q),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),te=["metadata","ref","source","sourceLayer","minzoom","maxzoom","interactive","filter","layout","paint"],ne=e.defineComponent({props:{layerId:{type:String,required:!0},source:[String,Object],metadata:[Object,Array,String,Number],ref:String,sourceLayer:String,minzoom:Number,maxzoom:Number,interactive:Boolean,filter:Array,before:String}});function oe(e,t,n,o){return Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==te.indexOf(e)})).reduce((function(e,t){return e["sourceLayer"===t?"source-layer":t]=n[t],e}),{type:t,source:n.source||o,id:e})}var re=e.defineComponent({name:"MglBackgroundLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"background",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Background Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Background Layer")}}),ie=e.defineComponent({name:"MglCircleLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"circle",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Circle Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Circle Layer")}}),ae=e.defineComponent({name:"MglFillLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"fill",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Fill Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Fill Layer")}}),ue=e.defineComponent({name:"MglFillExtrusionLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"fill-extrusion",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Fill Extrude Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Fill Extrusion Layer")}}),le=e.defineComponent({name:"MglHeatmapLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"heatmap",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Heatmap Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Heatmap Layer")}}),ce=e.defineComponent({name:"MglHillshadeLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"hillshade",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Hillshade Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Hillshade Layer")}}),se=e.defineComponent({name:"MglLineLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"line",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Line Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Line Layer")}}),de=e.defineComponent({name:"MglRasterLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"raster",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Raster Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Raster Layer")}}),me=e.defineComponent({name:"MglSymbolLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"symbol",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Symbol Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Symbol Layer")}}),fe=Object.freeze({__proto__:null,MglMap:C,MglAttributionControl:M,MglNavigationControl:O,MglScaleControl:L,MglFullscreenControl:w,MglGeolocationControl:x,MglCustomControl:N,MglStyleSwitchControl:R,MglButton:z,MglMarker:k,MglCanvasSource:F,MglGeoJsonSource:D,MglImageSource:$,MglRasterSource:W,MglRasterDemSource:K,MglVectorSource:X,MglVideoSource:ee,MglBackgroundLayer:re,MglCircleLayer:ie,MglFillLayer:ae,MglFillExtrusionLayer:ue,MglHeatmapLayer:le,MglHillshadeLayer:ce,MglLineLayer:se,MglRasterLayer:de,MglSymbolLayer:me}),pe=function(e){Object.entries(fe).forEach((function(t){var n=a(t,2),o=n[0],r=n[1];e.component(o,r)}))},ve=Object.freeze({__proto__:null,default:pe,useMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=p.get(e);return{component:t,map:null==t?void 0:t.map}},MglDefaults:f,usePositionWatcher:h,get Position(){return y},MglMap:C,MglAttributionControl:M,MglNavigationControl:O,MglScaleControl:L,MglFullscreenControl:w,MglGeolocationControl:x,MglCustomControl:N,MglStyleSwitchControl:R,MglButton:z,MglMarker:k,MglCanvasSource:F,MglGeoJsonSource:D,MglImageSource:$,MglRasterSource:W,MglRasterDemSource:K,MglVectorSource:X,MglVideoSource:ee,MglBackgroundLayer:re,MglCircleLayer:ie,MglFillLayer:ae,MglFillExtrusionLayer:ue,MglHeatmapLayer:le,MglHillshadeLayer:ce,MglLineLayer:se,MglRasterLayer:de,MglSymbolLayer:me,mapSymbol:l,isLoadedSymbol:c,componentIdSymbol:s,sourceIdSymbol:d,emitterSymbol:m});return Object.entries(ve).forEach((function(e){var t=a(e,2),n=t[0],o=t[1];"default"!==n&&(pe[n]=o)})),pe}(Vue,maplibreGl);
var VueMaplibreGl=function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),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 a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var o,r,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(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 u(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 u(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 l=Symbol("map"),c=Symbol("isLoaded"),s=Symbol("componentId"),d=Symbol("sourceId"),m=Symbol("emitter"),f=e.reactive({style:"https://demotiles.maplibre.org/style.json",center:Object.freeze([0,0]),zoom:1}),p=new Map,v=Symbol("default");var y,g=function(){function e(){n(this,e)}return r(e,null,[{key:"createEventHandler",value:function(e,t,n,o){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.emit(o,{type:r.type,map:t,component:e,event:r})}}}]),e}();i(g,"MAP_OPTION_KEYS",["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","crossSourceCollisions","container","customAttribution","dragPan","dragRotate","doubleClickZoom","hash","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","interactive","keyboard","locale","localIdeographFontFamily","logoPosition","maxBounds","maxPitch","maxZoom","minPitch","minZoom","preserveDrawingBuffer","pitch","pitchWithRotate","refreshExpiredTiles","renderWorldCopies","scrollZoom","mapStyle","trackResize","transformRequest","touchZoomRotate","touchPitch","zoom","maxTileCacheSize","accessToken"]),i(g,"MARKER_OPTION_KEYS",["element","offset","anchor","color","draggable","clickTolerance","rotation","rotationAlignment","pitchAlignment","scale"]),i(g,"MAP_EVENT_TYPES",["error","load","idle","remove","render","resize","webglcontextlost","webglcontextrestored","dataloading","data","tiledataloading","sourcedataloading","styledataloading","sourcedata","styledata","boxzoomcancel","boxzoomstart","boxzoomend","touchcancel","touchmove","touchend","touchstart","click","contextmenu","dblclick","mousemove","mouseup","mousedown","mouseout","mouseover","movestart","move","moveend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","dragstart","drag","dragend","pitchstart","pitch","pitchend","wheel"]),function(e){e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right"}(y||(y={}));var b=Object.values(y);function h(t,n,o){e.watch(t,(function(e){e&&-1===b.indexOf(e)||(n.value.hasControl(o)&&n.value.removeControl(o),n.value.addControl(o,e))}),{immediate:!0})}var S,C=e.defineComponent({name:"MglMap",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},antialias:{type:Boolean,default:function(){return f.antialias}},attributionControl:{type:Boolean,default:function(){return f.attributionControl}},bearing:{type:Number,default:function(){return f.bearing}},bearingSnap:{type:Number,default:function(){return f.bearingSnap}},bounds:{type:[Array,Object],default:function(){return f.bounds}},boxZoom:{type:Boolean,default:function(){return f.boxZoom}},center:{type:[Array,Object],default:function(){return f.center}},clickTolerance:{type:Number,default:function(){return f.clickTolerance}},collectResourceTiming:{type:Boolean,default:function(){return f.collectResourceTiming}},crossSourceCollisions:{type:Boolean,default:function(){return f.crossSourceCollisions}},customAttribution:{type:[String,Array],default:function(){return f.customAttribution}},dragPan:{type:Boolean,default:function(){return f.dragPan}},dragRotate:{type:Boolean,default:function(){return f.dragRotate}},doubleClickZoom:{type:Boolean,default:function(){return f.doubleClickZoom}},hash:{type:[Boolean,String],default:function(){return f.hash}},fadeDuration:{type:Number,default:function(){return f.fadeDuration}},failIfMajorPerformanceCaveat:{type:Boolean,default:function(){return f.failIfMajorPerformanceCaveat}},fitBoundsOptions:{type:Object,default:function(){return f.fitBoundsOptions}},interactive:{type:Boolean,default:function(){return f.interactive}},keyboard:{type:Boolean,default:function(){return f.keyboard}},locale:{type:Object,default:function(){return f.locale}},localIdeographFontFamily:{type:String,default:function(){return f.localIdeographFontFamily}},logoPosition:{type:[String],validate:function(e){return e in y},default:function(){return f.logoPosition}},maxBounds:{type:[Array,Object],default:function(){return f.maxBounds}},maxPitch:{type:Number,default:function(){return f.maxPitch}},maxZoom:{type:Number,default:function(){return f.maxZoom}},minPitch:{type:Number,default:function(){return f.minPitch}},minZoom:{type:Number,default:function(){return f.minZoom}},preserveDrawingBuffer:{type:Boolean,default:function(){return f.preserveDrawingBuffer}},pitch:{type:Number,default:function(){return f.pitch}},pitchWithRotate:{type:Boolean,default:function(){return f.pitchWithRotate}},refreshExpiredTiles:{type:Boolean,default:function(){return f.refreshExpiredTiles}},renderWorldCopies:{type:Boolean,default:function(){return f.renderWorldCopies}},scrollZoom:{type:Boolean,default:function(){return f.scrollZoom}},mapStyle:{type:[String,Object],default:function(){return f.style}},trackResize:{type:Boolean,default:function(){return f.trackResize}},transformRequest:{type:Function,default:f.transformRequest},touchZoomRotate:{type:Boolean,default:function(){return f.touchZoomRotate}},touchPitch:{type:Boolean,default:function(){return f.touchPitch}},zoom:{type:Number,default:function(){return f.zoom}},maxTileCacheSize:{type:Number,default:function(){return f.maxTileCacheSize}},accessToken:{type:String,default:function(){return f.accessToken}},mapKey:{type:[String,Symbol]}},emits:["map:error","map:load","map:idle","map:remove","map:render","map:resize","map:webglcontextlost","map:webglcontextrestored","map:dataloading","map:data","map:tiledataloading","map:sourcedataloading","map:styledataloading","map:sourcedata","map:styledata","map:boxzoomcancel","map:boxzoomstart","map:boxzoomend","map:touchcancel","map:touchmove","map:touchend","map:touchstart","map:click","map:contextmenu","map:dblclick","map:mousemove","map:mouseup","map:mousedown","map:mouseout","map:mouseover","map:movestart","map:move","map:moveend","map:zoomstart","map:zoom","map:zoomend","map:rotatestart","map:rotate","map:rotateend","map:dragstart","map:drag","map:dragend","map:pitchstart","map:pitch","map:pitchend","map:wheel"],setup:function(n,o){console.log("PROPS",n);var r,i,a=e.getCurrentInstance(),u=e.ref(null),f=e.ref(null),p=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=new Map,h={all:r=r||new Map,on:function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},off:function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var n=r.get(e);n&&n.slice().map((function(e){e(t)})),(n=r.get("*"))&&n.slice().map((function(n){n(e,t)}))}};return e.provide(l,p),e.provide(c,y),e.provide(s,a.uid),e.provide(d,""),e.provide(m,h),e.watch((function(){return n.bearing}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setBearing(e)})),e.watch((function(){return n.bounds}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.fitBounds(e,n.fitBoundsOptions)})),e.watch((function(){return n.center}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setCenter(e)})),e.watch((function(){return n.maxBounds}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxBounds(e)})),e.watch((function(){return n.maxPitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxPitch(e)})),e.watch((function(){return n.maxZoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMaxZoom(e)})),e.watch((function(){return n.minPitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMinPitch(e)})),e.watch((function(){return n.minZoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setMinZoom(e)})),e.watch((function(){return n.pitch}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setPitch(e)})),e.watch((function(){return n.renderWorldCopies}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setRenderWorldCopies(e)})),e.watch((function(){return n.mapStyle}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setStyle(e)})),e.watch((function(){return n.transformRequest}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setTransformRequest(e)})),e.watch((function(){return n.zoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setZoom(e)})),e.watch((function(){return n.zoom}),(function(e){var t;return null===(t=p.value)||void 0===t?void 0:t.setZoom(e)})),e.onMounted((function(){var e=Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==g.MAP_OPTION_KEYS.indexOf(e)})).reduce((function(e,t){return e["mapStyle"===t?"style":t]=n[t],e}),{container:f.value});if(console.log("map opts",e),p.value=new t.Map(e),v.value=!0,b.set("__load",(function(){return y.value=!0})),p.value.on("load",b.get("__load")),a.vnode.props)for(var r=0,l=g.MAP_EVENT_TYPES.length;r<l;r++)if(a.vnode.props["onMap:"+g.MAP_EVENT_TYPES[r]]){var c=g.createEventHandler(a,p.value,o,"map:"+g.MAP_EVENT_TYPES[r]);b.set(g.MAP_EVENT_TYPES[r],c),p.value.on(g.MAP_EVENT_TYPES[r],c)}(i=new ResizeObserver(p.value.resize.bind(p.value))).observe(u.value)})),e.onBeforeUnmount((function(){i&&i.disconnect(),p.value&&b.forEach((function(e,t){p.value.off(t.startsWith("__")?t.substr(2):t,e)}))})),{map:p,componentContainer:u,container:f,isLoaded:y,isInitialized:v}},created:function(){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;p.has(t)||p.set(t,e)}(this,this.mapKey)},render:function(){return e.h("div",{ref:"componentContainer",class:"mgl-container",style:{height:this.$props.height,width:this.$props.width}},[e.h("div",{ref:"container",class:"mgl-wrapper"}),this.isInitialized&&this.$slots.default?this.$slots.default():void 0])}}),M=e.defineComponent({name:"MglAttributionControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},compact:Boolean,customAttribution:[String,Array]},setup:function(n){var o=e.inject(l),r=new t.AttributionControl({compact:n.compact,customAttribution:n.customAttribution});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),O=e.defineComponent({name:"MglNavigationControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},showCompass:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},visualizePitch:Boolean},setup:function(n){var o=e.inject(l),r=new t.NavigationControl({showCompass:n.showCompass,showZoom:n.showZoom,visualizePitch:n.visualizePitch});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}});!function(e){e.IMPERIAL="imperial",e.METRIC="metric",e.NAUTICAL="nautical"}(S||(S={}));var j=Object.values(S),L=e.defineComponent({name:"MglScaleControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},maxWidth:{type:Number,default:100},unit:{type:String,default:S.METRIC,validator:function(e){return-1!==j.indexOf(e)}}},setup:function(n){var o=e.inject(l),r=new t.ScaleControl({maxWidth:n.maxWidth,unit:n.unit});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),w=e.defineComponent({name:"MglFullscreenControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},container:{type:HTMLElement,default:null}},setup:function(n){var o=e.inject(l),r=new t.FullscreenControl({container:n.container});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),x=e.defineComponent({name:"MglGeolocationControl",props:{position:{type:String,default:y.TOP_RIGHT,validator:function(e){return-1!==b.indexOf(e)}},positionOptions:{type:Object,default:{enableHighAccuracy:!1,timeout:6e3}},fitBoundsOptions:{type:Object,default:{maxZoom:15}},trackUserLocation:{type:Boolean,default:!1},showAccuracyCircle:{type:Boolean,default:!0},showUserLocation:{type:Boolean,default:!0}},setup:function(n){var o=e.inject(l),r=new t.GeolocateControl({positionOptions:n.positionOptions,fitBoundsOptions:n.fitBoundsOptions,trackUserLocation:n.trackUserLocation,showAccuracyCircle:n.showAccuracyCircle,showUserLocation:n.showUserLocation});h((function(){return n.position}),o,r),e.onBeforeUnmount((function(){return o.value.removeControl(r)}))},render:function(){}}),I=function(){function t(e,o){n(this,t),this.isAdded=e,this.container=document.createElement("div"),this.setClasses(o)}return r(t,[{key:"getDefaultPosition",value:function(){return y.TOP_LEFT}},{key:"onAdd",value:function(){var t=this;return e.nextTick((function(){return t.isAdded.value=!0})),this.container}},{key:"onRemove",value:function(){this.isAdded.value=!1}},{key:"setClasses",value:function(e){e?(this.container.classList.remove(t.CONTROL_CLASS),this.container.classList.remove(t.CONTROL_GROUP_CLASS)):(this.container.classList.add(t.CONTROL_CLASS),this.container.classList.add(t.CONTROL_GROUP_CLASS))}}]),t}();i(I,"CONTROL_CLASS","maplibregl-ctrl"),i(I,"CONTROL_GROUP_CLASS","maplibregl-ctrl-group");var T,B,N=e.defineComponent({name:"MglCustomControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},noClasses:{type:Boolean,default:!1}},setup:function(t){var n=e.inject(l),o=e.ref(!1),r=new I(o,t.noClasses);return h((function(){return t.position}),n,r),e.watch((function(){return t.noClasses}),(function(e){return r.setClasses(e)})),e.onBeforeUnmount((function(){return n.value.removeControl(r)})),{isAdded:o,container:r.container}},render:function(){return this.isAdded?e.h(e.Teleport,{to:this.container},this.$slots.default?this.$slots.default():void 0):e.createCommentVNode("custom-component")}});!function(e){e.DEFAULT="default",e.TEXT="text",e.MDI="mdi",e.SIMPLE_ICON="simple-icons"}(B||(B={}));var A=Object.values(B),P=(i(T={},B.TEXT,void 0),i(T,B.MDI,{size:21,viewbox:"0 0 24 24"}),i(T,B.SIMPLE_ICON,{size:21,viewbox:"0 0 24 24"}),i(T,B.DEFAULT,{size:0,viewbox:"0 0 0 0"}),T),z=e.defineComponent({name:"MglButton",props:{type:{type:String,default:B.DEFAULT,validator:function(e){return-1!==A.indexOf(e)}},path:{type:String},size:Number,viewbox:String},setup:function(t){t.path||t.type===B.TEXT||e.warn("property `path` must be set on MaplibreButton");var n=e.ref(P[t.type]||P.default);return e.watch((function(){return t.type}),(function(e){return n.value=P[e]||P.default})),{defaults:n}},render:function(){return this.type===B.TEXT?e.h("button",{type:"button"},this.$slots.default?this.$slots.default():void 0):e.h("button",{type:"button",class:"maplibregl-ctrl-icon"},[e.h("svg",{width:this.size||this.defaults.size,height:this.size||this.defaults.size,viewBox:this.viewbox||this.defaults.viewbox},e.h("path",{fill:"currentColor",d:this.path})),this.$slots.default?this.$slots.default():void 0])}});function E(e){return!!e.stopPropagation}var R=e.defineComponent({name:"MglStyleSwitchControl",props:{position:{type:String,validator:function(e){return-1!==b.indexOf(e)}},mapStyles:{type:Array,required:!0,default:[]},modelValue:{type:Object},isOpen:{type:Boolean,default:void 0}},emits:["update:modelValue","update:isOpen"],setup:function(t,n){var o=e.inject(l),r=e.inject(c),i=e.inject(m),a=e.ref(!1),u=e.ref(void 0!==t.isOpen&&t.isOpen),s=e.ref(void 0===t.modelValue?t.mapStyles.length?t.mapStyles[0]:null:t.modelValue),d=new I(a,!1),f=y.bind(null,!1);function p(){for(var e=o.value.getStyle().name,n=0,r=t.mapStyles.length;n<r;n++)if(t.mapStyles[n].name===e){v(t.mapStyles[n]);break}}function v(e){var r;(null===(r=s.value)||void 0===r?void 0:r.name)!==e.name&&(i.emit("styleSwitched",e),o.value.setStyle(e.style),void 0===t.modelValue&&(s.value=e),n.emit("update:modelValue",e),y(!1))}function y(e,o){E(o)?o.stopPropagation():E(e)&&e.stopPropagation(),void 0!==t.isOpen&&t.isOpen===e||u.value===e||(console.log("toggleOpen",e,o),void 0===t.isOpen?(u.value="boolean"==typeof e?e:!u.value,n.emit("update:isOpen",u.value)):n.emit("update:isOpen","boolean"==typeof e?e:!t.isOpen))}return e.watch(r,(function(e){e&&p()}),{immediate:!0}),o.value.on("style.load",p),document.addEventListener("click",f),h((function(){return t.position}),o,d),void 0!==t.modelValue&&e.watch((function(){return t.modelValue}),(function(e){void 0!==e&&(s.value=e)})),void 0!==t.isOpen&&e.watch((function(){return t.isOpen}),(function(e){void 0!==e&&(u.value=e)})),e.onBeforeUnmount((function(){o.value.removeControl(d),o.value.off("style.load",p),document.removeEventListener("click",f)})),{isAdded:a,container:d.container,setStyle:v,toggleOpen:y,intIsOpen:u,intModelValue:s}},template:'\n\t\t<div class="maplibregl-ctrl maplibregl-ctrl-group">\n\t\t<slot name="button">\n\t\t\t<button type="button" class="maplibregl-ctrl-icon maplibregl-style-switch"></button>\n\t\t</slot>\n\t\t<slot name="styleList">\n\t\t\t<div class="maplibregl-style-list" style="display: none;">\n\t\t\t\t<button type="button" class="Dark" data-uri="&quot;mapbox://styles/mapbox/dark-v10&quot;">Dark</button>\n\t\t\t\t<button type="button" class="Light" data-uri="&quot;mapbox://styles/mapbox/light-v10&quot;">Light</button>\n\t\t\t\t<button type="button" class="Outdoors" data-uri="&quot;mapbox://styles/mapbox/outdoors-v11&quot;">Outdoors</button>\n\t\t\t\t<button type="button" class="Satellite" data-uri="&quot;mapbox://styles/mapbox/satellite-streets-v11&quot;">Satellite</button>\n\t\t\t\t<button type="button" class="Streets active" data-uri="&quot;mapbox://styles/mapbox/streets-v11&quot;">Streets</button>\n\t\t\t</div>\n\t\t</slot>\n\t\t</div>\n\t',render:function(){var t=this;return this.isAdded?e.h(e.Teleport,{to:this.container},[e.renderSlot(this.$slots,"button",{isOpen:this.intIsOpen,toggleOpen:this.toggleOpen},(function(){return[e.h(z,{type:B.MDI,path:"M12,18.54L19.37,12.8L21,14.07L12,21.07L3,14.07L4.62,12.81L12,18.54M12,16L3,9L12,2L21,9L12,16M12,4.53L6.26,9L12,13.47L17.74,9L12,4.53Z",class:["maplibregl-ctrl-icon maplibregl-style-switch",t.intIsOpen?"is-open":""],onClick:t.toggleOpen.bind(null,!0)})]})),e.renderSlot(this.$slots,"styleList",{mapStyles:this.mapStyles,setStyle:this.setStyle},(function(){return[e.h("div",{class:["maplibregl-style-list",t.intIsOpen?"is-open":""]},t.mapStyles.map((function(n){var o,r;return n.icon?e.h(z,{type:B.MDI,path:n.icon.path,class:(null===(o=t.intModelValue)||void 0===o?void 0:o.name)===n.name?"is-active":"",onClick:function(){return t.setStyle(n)}},e.createTextVNode(n.label)):e.h("button",{type:"button",class:(null===(r=t.intModelValue)||void 0===r?void 0:r.name)===n.name?"is-active":"",onClick:function(){return t.setStyle(n)}},e.createTextVNode(n.label))})))]}))]):e.createCommentVNode("style-switch-control")}}),k=e.defineComponent({name:"MglMarker",props:{coordinates:{type:[Object,Array],required:!0},offset:[Object,Array],anchor:String,color:String,clickTolerance:Number,rotation:Number,rotationAlignment:String,pitchAlignment:String,scale:Number},setup:function(n){var o=e.inject(l),r=Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==g.MARKER_OPTION_KEYS.indexOf(e)})).reduce((function(e,t){return e[t]=n[t],e}),{}),i=new t.Marker(r);return i.setLngLat(n.coordinates).addTo(o.value),e.watch((function(){return n.coordinates}),(function(e){return i.setLngLat(e)})),e.watch((function(){return n.offset}),(function(e){return i.setOffset(e||[0,0])})),e.watch((function(){return n.pitchAlignment}),(function(e){return i.setPitchAlignment(e||"auto")})),e.watch((function(){return n.rotationAlignment}),(function(e){return i.setRotationAlignment(e||"auto")})),e.onBeforeUnmount(i.remove.bind(i)),{marker:i}},render:function(){}});var _=new Map;function V(t,n){var o="string"==typeof n,r=String(t)+(o?n:""),i=_.get(r);return i||(i=e.ref(o?null:void 0),_.set(r,i)),i}function U(t,n,o,r,i,a,u){function l(){o.value&&(t.value.addSource(i.sourceId,function(e,t,n){return Object.keys(t).filter((function(e){return void 0!==t[e]&&-1!==n.indexOf(e)})).reduce((function(e,n){return e[n]=t[n],e}),{type:e})}(a,i,u)),n.value=t.value.getSource(i.sourceId))}function c(){n.value=null}return e.watch(o,l,{immediate:!0}),t.value.on("style.load",l),r.on("styleSwitched",c),e.onBeforeUnmount((function(){o.value&&t.value.removeSource(i.sourceId),t.value.off("style.load",l),r.off("styleSwitched",c)}))}var Z=["animate","coordinates","canvas"],F=e.defineComponent({name:"MglCanvasSource",props:{sourceId:{type:String,required:!0},coordinates:Array,animate:Boolean,canvas:[HTMLCanvasElement,String]},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"canvas",Z),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return[e.createCommentVNode("Canvas Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),q=["data","maxzoom","attribution","buffer","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","promoteId","filter"],D=e.defineComponent({name:"MglGeoJsonSource",props:{sourceId:{type:String,required:!0},data:[Object,String],maxzoom:Number,attribution:String,buffer:Number,tolerance:Number,cluster:[Number,Boolean],clusterRadius:Number,clusterMaxZoom:Number,clusterMinPoints:Number,clusterProperties:Object,lineMetrics:Boolean,generateId:Boolean,promoteId:Object,filter:[Array,String,Object]},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"geojson",q),e.watch((function(){return t.data}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setData(e||"")})),{source:i}},render:function(){return[e.createCommentVNode("GeoJSON Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),H=["url","coordinates"],$=e.defineComponent({name:"MglImageSource",props:{sourceId:{type:String,required:!0},url:String,coordinates:Array},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"image",H),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return[e.createCommentVNode("Image Source"),this.source&&this.$slots.default?this.$slots.default():void 0]}}),G=["url","tiles","bounds","minzoom","maxzoom","tileSize","scheme","attribution"],W=e.defineComponent({name:"MglRasterSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,minzoom:Number,maxzoom:Number,tileSize:Number,scheme:String,attribution:String},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"raster",G),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),Y=["url","tiles","bounds","minzoom","maxzoom","tileSize","attribution","encoding"],K=e.defineComponent({name:"MglRasterDemSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,minzoom:Number,maxzoom:Number,tileSize:Number,attribution:String,encoding:String},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"raster-dem",Y),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),J=["url","tiles","bounds","scheme","minzoom","maxzoom","attribution","promoteId"],X=e.defineComponent({name:"MglVectorSource",props:{sourceId:{type:String,required:!0},url:String,tiles:Array,bounds:Array,scheme:String,minzoom:Number,maxzoom:Number,attribution:String,promoteId:Object},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"vector",J),e.watch((function(){return t.tiles}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setTiles(e||[])})),e.watch((function(){return t.url}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setUrl(e||"")})),{source:i}},render:function(){return e.createCommentVNode("Vector Source")}}),Q=["urls","coordinates"],ee=e.defineComponent({name:"MglVideoSource",props:{sourceId:{type:String,required:!0},urls:Array,coordinates:Array},setup:function(t){var n=e.inject(l),o=e.inject(c),r=e.inject(m),i=V(e.inject(s),t.sourceId);return e.provide(d,t.sourceId),U(n,i,o,r,t,"video",Q),e.watch((function(){return t.coordinates}),(function(e){var t;return null===(t=i.value)||void 0===t?void 0:t.setCoordinates(e||[])})),{source:i}},render:function(){return e.createCommentVNode("Video Source")}}),te=["metadata","ref","source","sourceLayer","minzoom","maxzoom","interactive","filter","layout","paint"],ne=e.defineComponent({props:{layerId:{type:String,required:!0},source:[String,Object],metadata:[Object,Array,String,Number],ref:String,sourceLayer:String,minzoom:Number,maxzoom:Number,interactive:Boolean,filter:Array,before:String}});function oe(e,t,n,o){return Object.keys(n).filter((function(e){return void 0!==n[e]&&-1!==te.indexOf(e)})).reduce((function(e,t){return e["sourceLayer"===t?"source-layer":t]=n[t],e}),{type:t,source:n.source||o,id:e})}var re=e.defineComponent({name:"MglBackgroundLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"background",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Background Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Background Layer")}}),ie=e.defineComponent({name:"MglCircleLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"circle",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Circle Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Circle Layer")}}),ae=e.defineComponent({name:"MglFillLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"fill",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Fill Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Fill Layer")}}),ue=e.defineComponent({name:"MglFillExtrusionLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"fill-extrusion",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Fill Extrude Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Fill Extrusion Layer")}}),le=e.defineComponent({name:"MglHeatmapLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"heatmap",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Heatmap Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Heatmap Layer")}}),ce=e.defineComponent({name:"MglHillshadeLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"hillshade",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Hillshade Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Hillshade Layer")}}),se=e.defineComponent({name:"MglLineLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"line",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Line Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Line Layer")}}),de=e.defineComponent({name:"MglRasterLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"raster",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Raster Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Raster Layer")}}),me=e.defineComponent({name:"MglSymbolLayer",mixins:[ne],props:{layout:Object,paint:Object},setup:function(t){var n=e.inject(d);if(n||t.source){var o=e.inject(l),r=e.inject(c),i=V(e.inject(s),t.source||n);e.watch([r,i],(function(e){var r=a(e,2),i=r[0],u=r[1];i&&(u||void 0===u)&&o.value.addLayer(oe(t.layerId,"symbol",t,n),t.before||void 0)}),{immediate:!0}),e.onBeforeUnmount((function(){r.value&&o.value.removeLayer(t.layerId)}))}else e.warn("Symbol Layer: layer must be used inside source tag or source prop must be set")},render:function(){return e.createCommentVNode("Symbol Layer")}}),fe=Object.freeze({__proto__:null,MglMap:C,MglAttributionControl:M,MglNavigationControl:O,MglScaleControl:L,MglFullscreenControl:w,MglGeolocationControl:x,MglCustomControl:N,MglStyleSwitchControl:R,MglButton:z,MglMarker:k,MglCanvasSource:F,MglGeoJsonSource:D,MglImageSource:$,MglRasterSource:W,MglRasterDemSource:K,MglVectorSource:X,MglVideoSource:ee,MglBackgroundLayer:re,MglCircleLayer:ie,MglFillLayer:ae,MglFillExtrusionLayer:ue,MglHeatmapLayer:le,MglHillshadeLayer:ce,MglLineLayer:se,MglRasterLayer:de,MglSymbolLayer:me}),pe=function(e){Object.entries(fe).forEach((function(t){var n=a(t,2),o=n[0],r=n[1];e.component(o,r)}))},ve=Object.freeze({__proto__:null,default:pe,useMap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=p.get(e);return{component:t,map:null==t?void 0:t.map}},MglDefaults:f,usePositionWatcher:h,get Position(){return y},MglMap:C,MglAttributionControl:M,MglNavigationControl:O,MglScaleControl:L,MglFullscreenControl:w,MglGeolocationControl:x,MglCustomControl:N,MglStyleSwitchControl:R,MglButton:z,MglMarker:k,MglCanvasSource:F,MglGeoJsonSource:D,MglImageSource:$,MglRasterSource:W,MglRasterDemSource:K,MglVectorSource:X,MglVideoSource:ee,MglBackgroundLayer:re,MglCircleLayer:ie,MglFillLayer:ae,MglFillExtrusionLayer:ue,MglHeatmapLayer:le,MglHillshadeLayer:ce,MglLineLayer:se,MglRasterLayer:de,MglSymbolLayer:me,mapSymbol:l,isLoadedSymbol:c,componentIdSymbol:s,sourceIdSymbol:d,emitterSymbol:m});return Object.entries(ve).forEach((function(e){var t=a(e,2),n=t[0],o=t[1];"default"!==n&&(pe[n]=o)})),pe}(Vue,maplibreGl);

@@ -1151,6 +1151,8 @@ 'use strict';var vue=require('vue'),maplibreGl=require('maplibre-gl');function _classCallCheck(instance, Constructor) {

}, _this.mapStyles.map(function (s) {
var _this$intModelValue, _this$intModelValue2;
return s.icon ? vue.h(MglButton, {
type: ButtonType.MDI,
path: s.icon.path,
'class': _this.intModelValue === s ? 'is-active' : '',
'class': ((_this$intModelValue = _this.intModelValue) === null || _this$intModelValue === void 0 ? void 0 : _this$intModelValue.name) === s.name ? 'is-active' : '',
onClick: function onClick() {

@@ -1161,3 +1163,3 @@ return _this.setStyle(s);

type: 'button',
'class': _this.intModelValue === s ? 'is-active' : '',
'class': ((_this$intModelValue2 = _this.intModelValue) === null || _this$intModelValue2 === void 0 ? void 0 : _this$intModelValue2.name) === s.name ? 'is-active' : '',
onClick: function onClick() {

@@ -1164,0 +1166,0 @@ return _this.setStyle(s);

{
"name": "vue-maplibre-gl",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Vue 3 plugin for maplibre-gl",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc