zh-mapbox 0.0.113 → 0.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -75,6 +75,10 @@ RegisterMapBoxModel(THREE,GLTFLoader)
75
75
  | **clearData**()-(0.0.108) | - | 清除数据(初始化时调用) |
76
76
  | **getTileByPosition**(position,zoom?)-(0.0.108) | position:[lng,lat]<br/>zoom?:number | 根据经纬度获取瓦片 |
77
77
  | **getPositionByTile**(range)-(0.0.108) | range:[x,y,z] | 根据瓦片获取经纬度四至 |
78
+ | **getTilesByBounds**(zoom,options)-(0.0.114) | zoom:层级<br />options:{<br />expand:number 扩散瓦片数量<br />reversal:boolean 反转排列方式<br />} | 根据层级获取当前视口瓦片 |
79
+ | **loadSpriteGraph**(sprite)-(0.0.114) | sprite:{<br />image:string 图片地址<br />json:string\|object json数据<br />} | 加载精灵图 |
80
+ | **MapClusterMarker**(options)-(0.0.114) | options: marker参数 | 聚合marker |
81
+ | **MapSourceEvent**(name,options)-(0.0.114) | name:source<br />options:{<br />once:true 执行一次<br />sourceLayer: 图层源 vector时必传<br />filter:过滤<br />} | 获取source源信息 |
78
82
 
79
83
  ### Map.Style
80
84
 
@@ -194,6 +198,48 @@ layerConfig:{
194
198
  | **animate**() | - | 开始动画 |
195
199
  | **destroy**() | - | 销毁动画 |
196
200
 
201
+ **MapClusterMarker**
202
+
203
+ | 方法名 | 参数 | 描述 |
204
+ | ----------------------------------------- | --------------------------------------------------------- | ---------- |
205
+ | **draw**( sourceName,<br />htmlCallback ) | sourceName:源名称<br />htmlCallback ({lngLat,properties}) | 绘制marker |
206
+ | **destroy**() | - | 销毁 |
207
+ | **visible**(show) | show:boolean | 显示隐藏 |
208
+
209
+ **MapSourceEvent**
210
+
211
+ | 方法名 | 参数 | 描述 |
212
+ | -------------------- | --------------------- | -------- |
213
+ | **open**(callback) | callback 结果返回方法 | 开启事件 |
214
+ | **destroy**() | - | 销毁事件 |
215
+
216
+
217
+
218
+ #### 公共方法
219
+
220
+ | 方法名 | 参数 | 描述 |
221
+ | -------------------------------- | ---------------------------------------------------- | ------------------------------- |
222
+ | **isValidNumber**(number) | number | 判断数字是否为有效数字 |
223
+ | **deepClone**(data) | data | 深度克隆 |
224
+ | **hexToRgba**(color,pure) | color:十六进制颜色<br />pure:false 是否返回数组格式 | hex颜色转rgba颜色 |
225
+ | **isGeoJSON**(data) | data | 浅判断是否为geojson格式 |
226
+ | **isNumber**(number) | number | 判断是否为数字 字符串类型也为真 |
227
+ | **judgeSizeLngLat**(point,isLng) | point:经纬度数字<br />isLng:true 是否经度在前 | 反转经纬度 |
228
+ | **object2Geojson** | | 对象转geojson |
229
+ | **resversalGeojson** | | 反转geojson |
230
+ | **reversalLngLat** | | 反转多维经纬度 |
231
+ | **mergeGeoJson** | | 合并geojson |
232
+ | **getPositionType** | | 判断多维数组类型 |
233
+ | **getArrayDepth** | | 获取多维数组深度 |
234
+ | **latFromMercatorY** | | 墨卡托转纬度 |
235
+ | **lngFromMercatorX** | | 墨卡托转经度 |
236
+ | **outOfChina** | | 判断点是否在国内 |
237
+ | **gcj02ToWgs84** | | gcj02转wgs84 |
238
+ | **wgs84ToGcj02** | | wgs84转gcj02 |
239
+ | **getSymbolRipple** | | 动态canvas点 |
240
+ | **transformGeojson** | | 自定义转换geojson |
241
+ | **transformLngLat** | | 自定义转换position |
242
+
197
243
 
198
244
 
199
245
  #### 使用
package/dist/index.d.ts CHANGED
@@ -77,6 +77,12 @@ export declare function isNumber(value: any): boolean;
77
77
  */
78
78
  export declare function isValidNumber(value: number): boolean;
79
79
 
80
+ /**
81
+ * 深克隆
82
+ * @param data
83
+ */
84
+ export declare function deepClone(data: any): any;
85
+
80
86
  /**
81
87
  * 创建一组地图图层
82
88
  */
@@ -164,6 +170,32 @@ export declare function gcj02ToWgs84(lng, lat): [number, number];
164
170
  */
165
171
  export declare function wgs84ToGcj02(lng, lat): [number, number];
166
172
 
173
+ /**
174
+ * 墨卡托转纬度
175
+ * @param y
176
+ */
177
+ export declare function latFromMercatorY(y: number): number;
178
+
179
+ /**
180
+ * 墨卡托转经度
181
+ * @param x
182
+ */
183
+ export declare function lngFromMercatorX(x: number): number;
184
+
185
+ /**
186
+ * 转换geojson坐标
187
+ * @param geojson
188
+ * @param func
189
+ */
190
+ export declare function transformGeojson(geojson: any, func: Function): any;
191
+
192
+ /**
193
+ * 转换数组坐标
194
+ * @param position
195
+ * @param func
196
+ */
197
+ export declare function transformLngLat(position: any, func: Function): any;
198
+
167
199
  declare module 'mapbox-gl' {
168
200
  interface Map {
169
201
  /**
@@ -413,6 +445,27 @@ declare module 'mapbox-gl' {
413
445
  * @param options.reversal 是否反转
414
446
  */
415
447
  getTilesByBounds(zoom?: number, options?: { expand?: number, reversal?: boolean }): [number, number, number][];
448
+
449
+ /**
450
+ * 加载精灵图
451
+ * @param sprite
452
+ */
453
+ loadSpriteGraph(sprite: { image: string, json: string | object }): Promise<any>;
454
+
455
+ /**
456
+ * 聚合marker
457
+ * @param options marker参数
458
+ * @constructor
459
+ */
460
+ MapClusterMarker(options?: any): any;
461
+
462
+ /**
463
+ * 获取source图层
464
+ * @param sourceName
465
+ * @param options
466
+ * @constructor
467
+ */
468
+ MapSourceEvent(sourceName: string, options?: { once?: boolean, sourceLayer?: string, filter?: Array<any>, validate?: boolean })
416
469
  }
417
470
  }
418
471
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(w="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",u=w.asyncIterator||"@@asyncIterator",l=w.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function p(e,r,n,o){var i,s,u,l;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),o=new k(o||[]),a(r,"_invoke",{value:(i=e,s=n,u=o,l=h,function(e,r){if(l===d)throw new Error("Generator is already running");if(l===m){if("throw"===e)throw r;return{value:t,done:!0}}for(u.method=e,u.arg=r;;){var n=u.delegate;if(n&&(n=function e(r,n){var o=n.method,i=r.iterator[o];return i===t?(n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v):"throw"===(o=f(i,r.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,v):(i=o.arg)?i.done?(n[r.resultName]=i.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,u),n)){if(n===v)continue;return n}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(l===h)throw l=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);if(l=d,"normal"===(n=f(i,s,u)).type){if(l=u.done?m:y,n.arg===v)continue;return{value:n.arg,done:u.done}}"throw"===n.type&&(l=m,u.method="throw",u.arg=n.arg)}})}),r}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h="suspendedStart",y="suspendedYield",d="executing",m="completed",v={};function g(){}function b(){}function L(){}var w,A,E=(c(w={},s,(function(){return this})),(A=(A=Object.getPrototypeOf)&&A(A(P([]))))&&A!==o&&i.call(A,s)&&(w=A),L.prototype=g.prototype=Object.create(w));function M(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var r;a(this,"_invoke",{value:function(o,a){function s(){return new t((function(r,s){!function r(o,a,s,u){var l;if("throw"!==(o=f(e[o],e,a)).type)return(a=(l=o.arg).value)&&"object"==n(a)&&i.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(a).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}));u(o.arg)}(o,a,r,s)}))}return r=r?r.then(s,s):s()}})}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(e){if(e||""===e){var r,o=e[s];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=o}throw new TypeError(n(e)+" is not iterable")}return a(E,"constructor",{value:b.prototype=L,configurable:!0}),a(L,"constructor",{value:b,configurable:!0}),b.displayName=c(L,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,L):(e.__proto__=L,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},r.awrap=function(e){return{__await:e}},M(x.prototype),c(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new x(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},M(E),c(E,l,"Generator"),c(E,s,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,C(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),i=0;i<o.length;i++)r=o[i],0<=t.indexOf(r)||(n[r]=e[r]);return n}function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>K,RegisterMapBoxMethod:()=>function(e,n){if(e&&e.Map){oe=e,-1===(window.mapboxgl=oe).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(a=oe.Map.prototype._setupPainter,oe.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},a.apply(this),this._canvas.getContext=e});var a,s,u=e.Map,l=function(e,n){var a=[],s=[];n&&Array.isArray(n)&&0<n.length&&n.every((function(e){return"string"==typeof e}))&&(s=n),a=s;var u=e.prototype.setStyle,l={layers:[],sources:[]},c=[],p={},f=[],h=!1,v=null,g={};return{clearData:function(){a=s,l={layers:[],sources:[]},c=[],p={},h=!(f=[]),v=null,g={}},setPaint:function(e,t){fe(this,e,t,"setPaintProperty")},setLayout:function(e,t){fe(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?pe(this,t,n):Array.isArray(n)&&(ae(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),pe(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===e&&(e=a),void 0===t&&(t=!0);for(var r,n=this.getStyle(),i=n.layers,s=n.sources,u={layers:[],sources:[]},l=0;l<i.length;)"background"===i[l].type||e.includes(i[l].source)||(r=i[l].id,this.getLayer(r)&&(u.layers.push(o(i[l])),t||this.removeLayer(r))),l++;var c,p=[];for(c in s)p.push(c);for(var f=0;f<p.length;){var h=p[f];e.includes(h)||this.isSourceLoaded(h)&&(u.sources.push({name:h,source:o(s[h])}),t||this.removeSource(h)),f++}return u},removeAllCustomLayer:function(){var e=this;c.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)}))},removeAllLayerAndSource:function(e){return void 0===e&&(e=a),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){void 0===t&&(t=a);for(var r=this.getStyle().layers,n=[],o=0;o<r.length;)"background"===r[o].type||t.includes(r[o].source)||n.push(r[o]),o++;if(e){if("string"==typeof e)return n.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return n.filter((function(t){return e.includes(t.type)}))}return n},MapTooltip:function(e,t){return new k(this,e,t)},MapPopup:function(e,t){return new S(this,e,t)},addLayer:function(e,t){var n;return this._lazyInitEmptyStyle(),"custom"===e.type&&c.push({layer:e,beforeId:t}),t?-1!==(n=f.findIndex((function(e){return e.id===t})))&&f.splice(n,0,{type:e.type,id:e.id}):f.push({type:e.type,id:e.id}),this.style.addLayer(e,t),this.fire("layerdata",r({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),n=c.findIndex((function(t){return t.layer.id===e}));return-1!==n&&c.splice(n,1),n=f.findIndex((function(t){return t.id===e})),-1!==n&&f.splice(n,1),this.style.removeLayer(e),this.fire("layerdata",r({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=f.findIndex((function(t){return t.id===e})),o=f.findIndex((function(e){return e.id===t}));return-1!==n&&-1!==o&&(r=f.splice(n,1)[0],o<0?o=0:o>f.length&&(o=f.length),f.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new T(this)},MapCustom:function(){return new j(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=J(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,n,o){var i,a,s,u;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(i=void 0===(i=(n=null!=n?n:{}).padding)?40:i,a=void 0===(a=n.animate)||a,s=void 0===(s=n.maxZoom)?15:s,u=void 0===(u=n.essential)||u,n=t(n,re),this.fitBounds(e,r({linear:!1,padding:i,animate:a,essential:u,maxZoom:s},n),o))},getInvertMask:function(e,t){var n;if(i(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return n=[],e.forEach((function(e){n.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,r({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(n)}}}},e)},fitMap:function(){for(var e={},t=!1,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=void 0===(s=o[0])?null:s,u=void 0===(u=o[1])?null:u;s?i(s)?(t=!1,v=s,u&&!i(u)&&"object"==typeof u&&(g=u)):"object"==typeof s&&(t=!0,e=s):v&&(t=!0),t&&v&&this.fitBoundsGeoJson(v,r({},g,e))},loadImages:function(e){var r=this;return new Promise((function(n){var o={};if(e&&0!==Object.keys(e).length)for(var i in e){var a,s,u=e[i];"string"==typeof u?r.loadImage(u,l(i)):"object"==typeof u&&(u.url?(a=u.url,s=t(u,ne),r.loadImage(a,l(i,s))):u.layer&&u.layer.render&&"function"==typeof u.layer.render&&l(i,u.config||{})(null,u.layer))}else n(o);function l(t,r){return function(i,a){o[t]={data:r,url:i?null:a},Object.keys(o).length===Object.keys(e).length&&n(o)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(n){t.loadImages(e).then((function(e){for(var o in e){var i=e[o],a=r({},null==i?void 0:i.data,{type:"custom"});t.hasImage(o)||t.addImage(o,i.url,a)}n()}))}))},MapCircle:function(){return new Y(this)},MapEvent:function(e){return new U(this,e)},MapMoreCustom:function(){return new X(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,o=null!=(o=e.sources)?o:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==o?void 0:o.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),o.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(Object.keys(e).includes("destroy")&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new ee(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=[];return c.map((function(r){e.getLayer(r.layer.id)&&t.push(r.layer)})),t},setStyle:function(e,t,r){var n,o,i,a=this;return null!=t&&t.save&&(i=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,i=null!=(n=i=void 0===i?[]:i)?n:[],p=this.findCustomIcon(),Array.isArray(i)&&0!==i.length?o||(i=Array.from(new Set([].concat(i,["composite","mapbox://mapbox.satellite"])))):i=["composite","mapbox://mapbox.satellite"],l=this.getAllLayerAndSource(i),this.once("style.load",(function(n){var o,i=[];for(o in p)i.push(o),a.style.imageManager.images[o]=p[o];var s=[];l.sources.map((function(e){var t=l.layers.filter((function(t){return t.source===e.name}));s.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(s),s.map((function(e){a.getSource(e.name)||a.addSource(e.name,e.source),e.layer.map((function(e){a.getLayer(e.id)||a.addLayer(e)}))})),c.forEach((function(e){a.getLayer(e.layer.id)||a.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:i,layerSource:l})}))),u.call(this,e,t)},getLayerIndex:function(e){if(e){var t=f.findIndex((function(t){return t.id===e}));if(-1!==t)return t}return 0===f.length?0:f.length-1},getLayerId:function(e,t){return e+=t=void 0===t?0:t,t=Number(e),isNaN(t)||e<0&&e>=f.length?"":null!=(e=null==(t=f)||null==(t=t[e])?void 0:t.id)?e:void 0},getMinLayerId:function(){var e;return null!=(e=null==(e=f)||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e;return null!=(e=null==(e=f)||null==(e=e[f.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return f.map((function(e){return e.id}))},getAllLayer:function(){return f},getLineLayer:function(){return f.map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new te(this,e,t)},addHeader:function(e,t){var n;t&&"function"==typeof t&&!h&&(n=this._requestManager.transformRequest,this._requestManager.transformRequest=function(o,i){return i=n.call(this,o,i),(o=t(o))&&"boolean"==typeof o?(h=!0,r({headers:e},i)):i})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=oe.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,o;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(o=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),o<0)||t<0||e<=o||e<=t?[]:(r=m(t/e),n=d(o/e),o=d((o+1)/e),[n,m((t+1)/e),o,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(o=e)?o:this.getZoom(),Math.floor(e)),o=this.getBounds().toArray(),i=(e=this.getTileByPosition(o[0],n))[0],a=e[1],s=(e=this.getTileByPosition(o[1],n))[0],u=e[1];if(u-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(y(i-=r)&&y(s)&&y(u)&&y(a)))return[];var l=[];if(t)for(var c=u;c<=a;c++)for(var p=i;p<=s;p++)l.push([p,c,n]);else for(var f=i;f<=s;f++)for(var h=u;h<=a;h++)l.push([f,h,n]);var d=Math.pow(2,n);return l.forEach((function(e){e[0]<0&&(e[0]=e[0]+d)})),l.filter((function(e){return 0<=e[1]}))}}}(u,n);for(s in new Event("layerdata"),l)u.prototype[s]=l[s];var c,p=oe.Style,f=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,o=e.prototype.queryRenderedFeatures,i=e.prototype.addLayer,a=e.prototype.removeLayer,s={};return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,o=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=o._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var i=o._availableImages.slice(r),a=0;a<i.length;a++)o.imageManager.images[i[a]].type="custom";o.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){var r=e.interactive;s[e.id]=void 0===r||r,i.call(this,e,t)},removeLayer:function(e){s[e]&&delete s[e],a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=o.call(this,e,t,r);if(0<n.length)for(var i=0;i<n.length;i++){var a=s[n[i].layer.id];n[i].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))}}}(p);for(c in f)p.prototype[c]=f[c];var h=(e=oe.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=h.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(oe&&e&&t){(ie=e).GLTFLoader=t,window.THREE=ie;var r,n=oe.Map,o={initGLTF:function(e,t,r){return new _(e,t,r)}};for(r in o)n.prototype[r]=o[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>o,gcj02ToWgs84:()=>function(e,t){var r,n,o,i,a;return A(e,t)?[e,t]:(r=L(e-105,t-35),n=w(e-105,t-35),o=t/180*v,i=Math.sin(o),i=1-b*i*i,a=Math.sqrt(i),r=180*r/(g*(1-b)/(i*a)*v),[2*e-(e+(n=180*n/(g/a*Math.cos(o)*v))),2*t-(t+r)])},getArrayDepth:()=>p,getPositionType:()=>c,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,o=void 0===(t=e.color)?"#f00":t,i=e.custom,a=f(o,!0),s=!1;return i&&"function"==typeof i&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,u,l=this.context;return s?l=i({width:this.width,height:this.height,duration:n,color:o,context:l}):(e=performance.now()%n/n,t=r/2*.2,u=r/2*e,l.clearRect(0,0,this.width,this.height),l.beginPath(),l.arc(this.width/2,this.height/2,u,0,2*Math.PI),l.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",l.lineWidth=2,l.stroke(),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.fill(),l.beginPath(),l.arc(this.width/2,this.height/2,t,0,2*Math.PI),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.lineWidth=2+4*(1-e),l.fill()),this.data=l.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>f,isGeoJSON:()=>i,isNumber:()=>h,isValidNumber:()=>y,judgeSizeLngLat:()=>s,latFromMercatorY:()=>m,lngFromMercatorX:()=>d,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var a=0;a<n.length;a++)Array.isArray(n[a])?t.push.apply(t,n[a]):n[a]&&"object"==typeof n[a]&&t.push(n[a]);for(var s,u=0;u<t.length;u++){var l=t[u];i(l)&&(l=l.features,(s=e.features).push.apply(s,l))}return e},object2Geojson:()=>function(e,t,r){var n=o(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var i=[],a=function(e){var o=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return l(e,r);if(r=e[r[0]])return[u(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return l(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(o,t);0<a.length&&a.map((function(t){var a=c(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a))||s)&&(s={type:"Feature"},"Feature"!==a?(s.properties=o,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),i.push(s))}))},s=0;s<n.length;s++)a(s);return e.features=i,e},outOfChina:()=>A,resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),i(e)){for(var n={type:"FeatureCollection",features:[]},o=e.features,u=0;u<o.length;u++){var l,c=o[u],p={};for(l in c)"geometry"!==l&&"properties"!==l&&"type"!==l&&(p[l]=c[l]);var f=c.geometry.coordinates,h=c.geometry.type,y={type:h,coordinates:null};y.coordinates=("Point"===h?s:a)(f,t),n.features.push(r({type:"Feature",geometry:y,properties:c.properties},p))}return n}return null},reversalLngLat:()=>a,wgs84ToGcj02:()=>function(e,t){var r,n,o,i,a;return A(e=+e,t=+t)?[e,t]:(r=L(e-105,t-35),n=w(e-105,t-35),o=t/180*v,i=Math.sin(o),i=1-b*i*i,a=Math.sqrt(i),r=180*r/(g*(1-b)/(i*a)*v),[e+(n=180*n/(g/a*Math.cos(o)*v)),t+r])}});var o=function e(t){var r,n,o="object"!=(o=typeof(r=t))?o:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===o)n=[];else{if("Object"!==o)return t;n={}}if("Array"===o)for(var i=0,a=t.length;i<a;i++)n.push(e(t[i]));else if("Object"===o)for(var s in t)n[s]=e(t[s]);return n};function i(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function a(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?h(e[0])?s(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var o=t[n];h(o[0])?r.push(s(o)):r.push(e(o))}return r}(e):[]}function s(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function u(e){return"string"==typeof e?JSON.parse(e):e}function l(e,t,r){var n=[],i=2===(r=void 0===r?[]:r).length;return function e(t,a){var s;t&&a.length&&(s=a.shift(),t.hasOwnProperty(s))&&(t=t[s],Array.isArray(t)?0!==a.length||i?t.forEach((function(t){i?n.push([t[r[0]],t[r[1]]]):e(t,o(a))})):t&&(s=u(t),n.push(s)):"object"==typeof t?0===a.length?n.push(i?[t[r[0]],t[r[1]]]:t):e(t,a):0===a.length&&t&&(s=u(t),n.push(s)))}(e,t),n}function c(e){if(Array.isArray(e)){var t=p(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:var r=(n=e[0])[0],n=n[n.length-1];return r[0]===n[0]&&r[1]===n[1]?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature"}return null}function p(e){return Array.isArray(e)?Array.isArray(e[0])?1+p(e[0]):1:0}function f(e,t){void 0===t&&(t=!1);var r,n,o=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o))?(r=parseInt(o[1],16),n=parseInt(o[2],16),o=parseInt(o[3],16),t?[r,n,o,1]:"rgba("+r+","+n+","+o+",1)"):e}function h(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function y(e){return isFinite(e)&&!isNaN(e)}function d(e){return 360*e-180}function m(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var v=Math.PI,g=6378245,b=.006693421622965943;function L(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*v)+20*Math.sin(2*e*v))/3)+2*(20*Math.sin(t*v)+40*Math.sin(t/3*v))/3+2*(160*Math.sin(t/12*v)+320*Math.sin(t*v/30))/3}function w(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*v)+20*Math.sin(2*e*v))/3)+2*(20*Math.sin(e*v)+40*Math.sin(e/3*v))/3+2*(150*Math.sin(e/12*v)+300*Math.sin(e/30*v))/3}function A(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}function E(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function M(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){E(i,n,o,a,s,"next",e)}function s(e){E(i,n,o,a,s,"throw",e)}a(void 0)}))}}var x=e(687),N=e.n(x),C=["customName"],k=function(){function e(e,n,o){var i=this,a=(this._mouseEnter=function(){var e=M(N().mark((function e(t){var r,n,o,a,s,u,l,c;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,o=i.map.queryRenderedFeatures(r),u=null!=(u=o[0])?u:{},a=u.properties,s=u.geometry,u.source,u=u.layer,i.layerName.includes(u.id)){e.next=8;break}return null!=(u=i.popup)&&u.remove(),e.abrupt("return");case 8:if(u=s.coordinates,l=[n.lng,n.lat],"mouseenter"===i.mouseType&&(l=i._getPosition(u)),0<(null==(c=l)?void 0:c.length))return e.next=14,i.htmlCallBack(a,l,{lngLat:n,geometry:s,point:r,features:o,feature:o[0]});e.next=16;break;case 14:c=e.sent,i.popup.setLngLat(l).setHTML(c).addTo(i.map);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){i.popup.remove()},this.map=e,"string"==typeof n?this.layerName=[n]:Array.isArray(n)&&(this.layerName=n),e=null!=(n=e.tooltipClass)?n:"commonTooltip",void 0!==(a=(n=null!=o?o:{}).customName)&&a);n=t(n,C),a=a?"":e+" ",this.className=a,null!=o&&o.className&&(a+=o.className),this.fullName=a,this.popup=new mapboxgl.Popup(r({},n,{className:a,closeButton:null!=(e=null==o?void 0:o.closeButton)&&e,closeOnClick:null!=(n=null==o?void 0:o.closeOnClick)&&n,anchor:null!=(a=null==o?void 0:o.anchor)?a:"left",type:"tooltip"}))}var n=e.prototype;return n.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},n.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},n.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},n._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),P=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],S=function(){function e(e,n,o){var i=this,a=(this._closeOtherPopup=function(){var e;i.closeOther&&null!=(e=i.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(i.noCloseLayerName)&&0<i.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(i.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=M(N().mark((function e(t){var r,n,o,a,s,u,l,c,p,f,h,y;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(i._closeOtherPopup(),r=t.point,n=t.lngLat,o=i.map.queryRenderedFeatures(r),l=null!=(l=o[0])?l:{},a=l.properties,s=l.geometry,l.source,l=l.layer,i.layerName.includes(l.id)){e.next=8;break}return e.abrupt("return");case 8:if(i.customClick){e.next=28;break}return c=s.coordinates,p=s.type,e.next=12,null==(l=i.componentCallBack)?void 0:l.call(i,{properties:a,lngLat:n,coordinates:c,point:r,features:o,feature:o[0]});case 12:if(e.t1=u=e.sent,e.t0=null!==e.t1,!e.t0){e.next=16;break}e.t0=void 0!==u;case 16:e.t0?(e.t2=u,e.next=21):e.next=20;break;case 20:e.t2={};case 21:h=e.t2,f=h.component,h=h.instance,y=n,"Point"===p&&(y=c),i.vueInstance=h,f&&(i.popup.setOffset(i.offset),i.popup.setLngLat(y).setDOMContent(f).addTo(i.map));case 28:"function"==typeof i.callBack&&i.callBack({lngLat:n,properties:a,geometry:s,point:r});case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof n?this.layerName=[n]:Array.isArray(n)&&(this.layerName=n),void 0!==(s=(n=o||{}).destroyComponent)&&s),s=void 0!==(s=n.customClick)&&s,u=void 0!==(u=n.popupClose)&&u,l=void 0===(l=n.closeOther)||l,c=void 0===(c=n.noCloseLayerName)?[]:c,p=void 0!==(p=n.customName)&&p,f=void 0===(f=n.offset)?[0,0]:f,h=n.closeClick;n=t(n,P),e=null!=(e=e.popupClass)?e:"commonPopup",p=p?"":e+" ",this.className=p,null!=o&&o.className&&(p+=o.className),this.fullName=p,this.noCloseLayerName=c,this.noCloseLayerName=[],this.customClick=s,this.popupCloseSign=u,this.closeOther=l,this.offset=f="number"==typeof f?[f,f]:f,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(r({},n,{offset:f,className:p,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(o=null==n?void 0:n.closeOnClick)&&o,anchor:null!=(c=null==n?void 0:n.anchor)?c:"bottom",focusAfterOpen:null!=(s=null==n?void 0:n.focusAfterOpen)&&s,type:"popup",sourceName:this.layerName})),h&&"function"==typeof h&&(this.popup._closeClick=h),null!=(u=this.popup)&&u.on("close",(function(e){"function"==typeof i.closeCallback&&i.closeCallback(e),i.popupCloseSign&&null!=(e=i.vueInstance)&&e.popupClose&&"function"==typeof i.vueInstance.popupClose&&i.vueInstance.popupClose(),i.vueInstance&&a&&null!=(e=i.vueInstance)&&e.$destroy()})))}var n=e.prototype;return n.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},n.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},n.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},n.close=function(){var e;null!=(e=this.popup)&&e._onClose()},n.closeBack=function(e){this.closeCallback=e},n.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),_=function(){function e(e,t,r){var n=this,o=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(o=t.scale)?1:o),i=void 0===(i=t.height)?0:i,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,u=void 0===(u=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:u,l=void 0===(l=t.DirectionalLight)?[]:l,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=o,this.height=i,this.rotate=a,this.properties=s,this.AmbientLight=u,this.DirectionalLight=l,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,i),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:o*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,o=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,i=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,i)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=o.properties,e.scene.children[t].lngLat=o.lngLat;o.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),o=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),i=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(o),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=i.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),T=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,n){"vector"===this.sourceType?this.map.addSource(e,r({},t,n.sourceConfig)):this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=n.beforeId||null,this.map.addLayer(r({id:e,type:"line",source:e},n.layerConfig),t),n.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(r({id:this.lineName,type:"line",source:e},n.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.lineName&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),j=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var o=r.sliceNum;if(!o||o<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var i=0,a=0;a<e.features.length;a+=o){var s={type:"FeatureCollection",features:[]},u=e.features.slice(a,o);s.features=[].concat(u),u=t+"-"+i,this.sourceName.push(u),this._addSourceLayer(u,s,r),i++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,n){"vector"===this.sourceType?this.map.addSource(e,r({},t,n.sourceConfig)):this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=n.beforeId||null,this.map.addLayer(r({id:e,type:this.type,source:e},n.layerConfig),t)},e}(),I={centimeters:100*(x=6371008.8),centimetres:100*x,degrees:x/111325,feet:3.28084*x,inches:39.37*x,kilometers:x/1e3,kilometres:x/1e3,meters:x,metres:x,miles:x/1609.344,millimeters:1e3*x,millimetres:1e3*x,nauticalmiles:x/1852,radians:1,yards:1.0936*x};function O(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function R(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(G(e[0])&&G(e[1]))return O({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}function F(e,t,r){void 0===r&&(r={});for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}return O({type:"Polygon",coordinates:e},t,r)}function B(e){return e%(2*Math.PI)*180/Math.PI}function H(e){return e%360*Math.PI/180}function G(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function q(e,t,r){if(null!==e)for(var n,o,i,a=0,s=e.type,u="FeatureCollection"===s,l="Feature"===s,c=u?e.features.length:1,p=0;p<c;p++)for(var f,h,y=(h=!!(f=u?e.features[p].geometry:l?e.geometry:e)&&"GeometryCollection"===f.type)?f.geometries.length:1,d=0;d<y;d++){var m=0,v=0,g=h?f.geometries[d]:f;if(null!==g){var b=g.coordinates,L=g.type,w=!r||"Polygon"!==L&&"MultiPolygon"!==L?0:1;switch(L){case null:break;case"Point":if(!1===t(b,a,p,m,v))return!1;a++,m++;break;case"LineString":case"MultiPoint":for(n=0;n<b.length;n++){if(!1===t(b[n],a,p,m,v))return!1;a++,"MultiPoint"===L&&m++}"LineString"===L&&m++;break;case"Polygon":case"MultiLineString":for(n=0;n<b.length;n++){for(o=0;o<b[n].length-w;o++){if(!1===t(b[n][o],a,p,m,v))return!1;a++}"MultiLineString"===L&&m++,"Polygon"===L&&v++}"Polygon"===L&&m++;break;case"MultiPolygon":for(n=0;n<b.length;n++){for(o=v=0;o<b[n].length;o++){for(i=0;i<b[n][o].length-w;i++){if(!1===t(b[n][o][i],a,p,m,v))return!1;a++}v++}m++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===q(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function D(e){var t=[1/0,1/0,-1/0,-1/0];return q(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const z=D.default=D,J=function(e){e=z(e);var t=void 0,r=(void 0===t&&(t={}),Number(e[0])),n=Number(e[1]),o=Number(e[2]),i=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return F([[a,[o,n],[o,i],[r,i],a]],t.properties,{bbox:e,id:t.id})};function Z(e,t,r,n){void 0===n&&(n={});var o=H((e=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e))[0]),i=(e=H(e[1]),r=H(r),t=function(e,t){var r=I[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return R([B(o+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(i))),B(i)],n.properties)}const V=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,o=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),i=[],a=0;a<n;a++)i.push(Z(e,t,-360*a/n,r).geometry.coordinates);return i.push(i[0]),F([i],o)};var Y=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,o=null!=r?r:{},i=void 0===(n=o.radius)?0:n,a=void 0===(n=o.steps)?64:n,s=o.endRadius,u=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var l=e.features,c=0;c<l.length;c++){var p,f,h,y,d,m=l[c].geometry.coordinates;"number"==typeof m[0]&&"number"==typeof m[1]&&(m[0]<m[1]&&(p=[m[1],m[0]],m[0]=p[0],m[1]=p[1]),p=!1,f=0<(f=(p="string"==typeof i||p)?l[c].properties[i]:i)?f:0,h={steps:a,units:"kilometers",properties:l[c].properties},y=V(m,f,h),s?(d=!1,d=0<(d=(d="string"==typeof s||d)?l[c].properties[s]:s)?d:0,m=V(m,s,h),u.push(f===d?y:f<d?this._getRingJson(m.geometry.coordinates[0],y.geometry.coordinates[0],y.properties):this._getRingJson(y.geometry.coordinates[0],m.geometry.coordinates[0],y.properties))):u.push(y))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:u},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,n){this.map.addSource(e,r({type:"geojson",data:t},n.sourceConfig)),t=(null!=n?n:{}).beforeId,this.map.addLayer(r({id:e,type:"fill",source:e},n.layerConfig),t),n.lineConfig&&(this.lineName=e+"-line",this.map.addLayer(r({id:this.lineName,type:"line",source:e},n.lineConfig),t))},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.removeLayer(e),t.lineName&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),U=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,o=function(t){var n,o;r.event.push(t),0<(null==(o=r.name)?void 0:o.length)?null!=(o=r.name)&&o.forEach((function(n){function o(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var i;r[t]=o,null!=(i=r.map)&&i.on(t,n,o)})):(r[t]=o=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,o))};for(n in e)o(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,o;r.event.includes(e)&&(o=r[e],null!=(n=r.map))&&n.off(e,t,o)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,o=r[t];null!=(n=r.map)&&n.off(t,e,o)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),$=["id","type"],W=["id","type","beforeId"],X=function(){function e(e){this.map=e,this.sourceName=[]}var n=e.prototype;return n.draw=function(e,n){var o,a,s,u,l=this;return i(e)||"vector"===e.type?(o=(a=null!=(a=n.sourceConfig)?a:{}).id,u=void 0===(u=a.type)?"geojson":u,a=t(a,$),s=o,"vector"===e.type?this.map.addSource(o,r({},a,e)):this.map.addSource(o,r({type:u,data:e},a)),u=null!=(o=n.layerConfig)?o:{},e=[],Array.isArray(u)?e=u:"object"==typeof u&&e.push(u),e.forEach((function(e){var n=e.id,o=e.type,i=e.beforeId;e=t(e,W),l.map.addLayer(r({id:n,type:o,source:s},e),i)})),this.sourceName=[s].concat(e.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},n.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},n.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),K=function(){function e(t,n,o){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var i={layer:null,tooltip:null,popup:null};return n&&"object"==typeof n&&(i=r({},i,n)),this.name=t,this.layers=i,this.prop=null!=o?o:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ee=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(i(e))for(var n,o=null!=(n=this.options)?n:{},a=0,s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Q(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=s()).done;){var u,l,c=c.value;"Point"===c.geometry.type&&(u=o,t&&"function"==typeof t&&1===(null==(l=t({lngLat:c.geometry.coordinates,properties:c.properties,index:a}))?void 0:l.nodeType)&&(u=r({},u,{element:l})),l=new mapboxgl.Marker(u).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(l),this.properties.push(c.properties),a++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var n=0;n<this.markers.length;n++)!function(n){["dragstart","drag","dragend"].forEach((function(o){e[o]&&"function"==typeof e[o]&&t.markers[n].on(o,(function(i){e[o](r({},i,{properties:t.properties[n]}))}))}))}(n)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),te=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),re=["padding","animate","maxZoom","essential"],ne=["url"],oe=null,ie=null,ae=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},se=["line-color","line-opacity"],ue=["fill-color","fill-opacity"],le=["background-color","background-opacity"],ce=["text-color","text-opacity"],pe=function(e,t,r,n){if(r&&(ae(r)||Array.isArray(r))){var o=e.getLayer(t);if(o){var i=[];switch(o.type){case"line":i=se;break;case"fill":i=ue;break;case"background":i=le;break;case"symbol":i=ce}0<i.length&&(e.setPaintProperty(t,i[0],r),null!==n)&&e.setPaintProperty(t,i[1],n)}}},fe=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var o in r)null!==r[o]&&void 0!==r[o]&&e[n](t,o,r[o])}})(),n;function e(n){var o=r[n];return void 0!==o||(o=r[n]={exports:{}},t[n](o,o.exports,e)),o.exports}var t,r,n}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(L="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",u=L.asyncIterator||"@@asyncIterator",l=L.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function h(e,r,n,o){var i,s,u,l;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),o=new C(o||[]),a(r,"_invoke",{value:(i=e,s=n,u=o,l=f,function(e,r){if(l===d)throw new Error("Generator is already running");if(l===m){if("throw"===e)throw r;return{value:t,done:!0}}for(u.method=e,u.arg=r;;){var n=u.delegate;if(n&&(n=function e(r,n){var o=n.method,i=r.iterator[o];return i===t?(n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v):"throw"===(o=p(i,r.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,v):(i=o.arg)?i.done?(n[r.resultName]=i.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,u),n)){if(n===v)continue;return n}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(l===f)throw l=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);if(l=d,"normal"===(n=p(i,s,u)).type){if(l=u.done?m:y,n.arg===v)continue;return{value:n.arg,done:u.done}}"throw"===n.type&&(l=m,u.method="throw",u.arg=n.arg)}})}),r}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var f="suspendedStart",y="suspendedYield",d="executing",m="completed",v={};function g(){}function b(){}function w(){}var L,E,x=(c(L={},s,(function(){return this})),(E=(E=Object.getPrototypeOf)&&E(E(S([]))))&&E!==o&&i.call(E,s)&&(L=E),w.prototype=g.prototype=Object.create(L));function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){var r;a(this,"_invoke",{value:function(o,a){function s(){return new t((function(r,s){!function r(o,a,s,u){var l;if("throw"!==(o=p(e[o],e,a)).type)return(a=(l=o.arg).value)&&"object"==n(a)&&i.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):t.resolve(a).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,u)}));u(o.arg)}(o,a,r,s)}))}return r=r?r.then(s,s):s()}})}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e||""===e){var r,o=e[s];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=o}throw new TypeError(n(e)+" is not iterable")}return a(x,"constructor",{value:b.prototype=w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=c(w,l,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},A(M.prototype),c(M.prototype,u,(function(){return this})),r.AsyncIterator=M,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new M(h(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(x),c(x,l,"Generator"),c(x,s,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=S,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,N(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),i=0;i<o.length;i++)r=o[i],0<=t.indexOf(r)||(n[r]=e[r]);return n}function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>K,RegisterMapBoxMethod:()=>function(e,t){if(e&&e.Map){de=e,-1===(window.mapboxgl=de).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(n=de.Map.prototype._setupPainter,de.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},n.apply(this),this._canvas.getContext=e});var n,a,c=e.Map,h=function(e,t){var n=[],a=[];t&&Array.isArray(t)&&0<t.length&&t.every((function(e){return"string"==typeof e}))&&(a=t),n=a;var c=e.prototype.setStyle,h={layers:[],sources:[]},p=[],f={},y=[],d=!1,m=null,v={};return{clearData:function(){n=a,h={layers:[],sources:[]},p=[],f={},d=!(y=[]),m=null,v={}},setPaint:function(e,t){xe(this,e,t,"setPaintProperty")},setLayout:function(e,t){xe(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?Ee(this,t,n):Array.isArray(n)&&(ve(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),Ee(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===e&&(e=n),void 0===t&&(t=!0);for(var r,o=this.getStyle(),i=o.layers,a=o.sources,s={layers:[],sources:[]},l=0;l<i.length;)"background"===i[l].type||e.includes(i[l].source)||(r=i[l].id,this.getLayer(r)&&(s.layers.push(u(i[l])),t||this.removeLayer(r))),l++;var c,h=[];for(c in a)h.push(c);for(var p=0;p<h.length;){var f=h[p];e.includes(f)||this.isSourceLoaded(f)&&(s.sources.push({name:f,source:u(a[f])}),t||this.removeSource(f)),p++}return s},removeAllCustomLayer:function(){var e=this;p.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)}))},removeAllLayerAndSource:function(e){return void 0===e&&(e=n),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){void 0===t&&(t=n);for(var r=this.getStyle().layers,o=[],i=0;i<r.length;)"background"===r[i].type||t.includes(r[i].source)||o.push(r[i]),i++;if(e){if("string"==typeof e)return o.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return o.filter((function(t){return e.includes(t.type)}))}return o},MapTooltip:function(e,t){return new S(this,e,t)},MapPopup:function(e,t){return new _(this,e,t)},addLayer:function(e,t){var r;return this._lazyInitEmptyStyle(),"custom"===e.type&&p.push({layer:e,beforeId:t}),t?-1!==(r=y.findIndex((function(e){return e.id===t})))&&y.splice(r,0,{type:e.type,id:e.id}):y.push({type:e.type,id:e.id}),this.style.addLayer(e,t),this.fire("layerdata",i({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),r=p.findIndex((function(t){return t.layer.id===e}));return-1!==r&&p.splice(r,1),r=y.findIndex((function(t){return t.id===e})),-1!==r&&y.splice(r,1),this.style.removeLayer(e),this.fire("layerdata",i({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=y.findIndex((function(t){return t.id===e})),o=y.findIndex((function(e){return e.id===t}));return-1!==n&&-1!==o&&(r=y.splice(n,1)[0],o<0?o=0:o>y.length&&(o=y.length),y.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new T(this)},MapCustom:function(){return new I(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=z(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,t,r){var n,a,s,u;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(n=void 0===(n=(t=null!=t?t:{}).padding)?40:n,a=void 0===(a=t.animate)||a,s=void 0===(s=t.maxZoom)?15:s,u=void 0===(u=t.essential)||u,t=o(t,fe),this.fitBounds(e,i({linear:!1,padding:n,animate:a,essential:u,maxZoom:s},t),r))},getInvertMask:function(e,t){var r;if(l(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return r=[],e.forEach((function(e){r.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,i({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(r)}}}},e)},fitMap:function(){for(var e={},t=!1,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=void 0===(a=n[0])?null:a,s=void 0===(s=n[1])?null:s;a?l(a)?(t=!1,m=a,s&&!l(s)&&"object"==typeof s&&(v=s)):"object"==typeof a&&(t=!0,e=a):m&&(t=!0),t&&m&&this.fitBoundsGeoJson(m,i({},v,e))},loadImages:function(e){var t=this;return new Promise((function(r){var n={};if(e&&0!==Object.keys(e).length)for(var i in e){var a,s,u=e[i];"string"==typeof u?t.loadImage(u,l(i)):"object"==typeof u&&(u.url?(a=u.url,s=o(u,ye),t.loadImage(a,l(i,s))):u.layer&&u.layer.render&&"function"==typeof u.layer.render&&l(i,u.config||{})(null,u.layer))}else r(n);function l(t,o){return function(i,a){n[t]={data:o,url:i?null:a},Object.keys(n).length===Object.keys(e).length&&r(n)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(r){t.loadImages(e).then((function(e){for(var n in e){var o=e[n],a=i({},null==o?void 0:o.data,{type:"custom"});t.hasImage(n)||t.addImage(n,o.url,a)}r()}))}))},MapCircle:function(){return new Z(this)},MapEvent:function(e){return new V(this,e)},MapMoreCustom:function(){return new W(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,o=null!=(o=e.sources)?o:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==o?void 0:o.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),o.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(Object.keys(e).includes("destroy")&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new oe(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=[];return p.map((function(r){e.getLayer(r.layer.id)&&t.push(r.layer)})),t},setStyle:function(e,t,r){var n,o,i,a=this;return null!=t&&t.save&&(i=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,i=null!=(n=i=void 0===i?[]:i)?n:[],f=this.findCustomIcon(),Array.isArray(i)&&0!==i.length?o||(i=Array.from(new Set([].concat(i,["composite","mapbox://mapbox.satellite"])))):i=["composite","mapbox://mapbox.satellite"],h=this.getAllLayerAndSource(i),this.once("style.load",(function(n){var o,i=[];for(o in f)i.push(o),a.style.imageManager.images[o]=f[o];var s=[];h.sources.map((function(e){var t=h.layers.filter((function(t){return t.source===e.name}));s.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(s),s.map((function(e){a.getSource(e.name)||a.addSource(e.name,e.source),e.layer.map((function(e){a.getLayer(e.id)||a.addLayer(e)}))})),p.forEach((function(e){a.getLayer(e.layer.id)||a.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:i,layerSource:h})}))),c.call(this,e,t)},getLayerIndex:function(e){if(e){var t=y.findIndex((function(t){return t.id===e}));if(-1!==t)return t}return 0===y.length?0:y.length-1},getLayerId:function(e,t){return e+=t=void 0===t?0:t,t=Number(e),isNaN(t)||e<0&&e>=y.length?"":null!=(e=null==(t=y)||null==(t=t[e])?void 0:t.id)?e:void 0},getMinLayerId:function(){var e;return null!=(e=null==(e=y)||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e;return null!=(e=null==(e=y)||null==(e=e[y.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return y.map((function(e){return e.id}))},getAllLayer:function(){return y},getLineLayer:function(){return y.map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new ie(this,e,t)},addHeader:function(e,t){var r;t&&"function"==typeof t&&!d&&(r=this._requestManager.transformRequest,this._requestManager.transformRequest=function(n,o){return o=r.call(this,n,o),(n=t(n))&&"boolean"==typeof n?(d=!0,i({headers:e},o)):o})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=de.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,o;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(o=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),o<0)||t<0||e<=o||e<=t?[]:(r=w(t/e),n=b(o/e),o=b((o+1)/e),[n,w((t+1)/e),o,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(o=e)?o:this.getZoom(),Math.floor(e)),o=this.getBounds().toArray(),i=(e=this.getTileByPosition(o[0],n))[0],a=e[1],s=(e=this.getTileByPosition(o[1],n))[0],u=e[1];if(u-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(g(i-=r)&&g(s)&&g(u)&&g(a)))return[];var l=[];if(t)for(var c=u;c<=a;c++)for(var h=i;h<=s;h++)l.push([h,c,n]);else for(var p=i;p<=s;p++)for(var f=u;f<=a;f++)l.push([p,f,n]);var y=Math.pow(2,n);return l.forEach((function(e){e[0]<0&&(e[0]=e[0]+y)})),l.filter((function(e){return 0<=e[1]}))},loadSpriteGraph:function(e){var t=this;return new Promise(function(){var n=r(s().mark((function n(o){var i,a,u,l;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e)return i=[],"object"==typeof e&&e.image&&e.json?i=[e]:Array.isArray(e)&&e.every((function(e){return"object"==typeof e&&e.image&&e.json}))&&(i=e),a={},u=function(){var e=r(s().mark((function e(){var t,r,n,o,u,l,c,h,p,f,y,d,m,v,g,b,w;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(t<i.length){if(r=i[t].image,n=i[t].json,o={},"string"==typeof n)return e.next=8,fetch(n).then((function(e){return e.json()}));e.next=12}else e.next=20;break;case 8:u=e.sent,o="object"==typeof u?u:{},e.next=13;break;case 12:"object"==typeof n&&(o=n);case 13:return e.next=15,function(){return ue.apply(this,arguments)}(r);case 15:for(c in l=e.sent,o)b=o[c],h=b.width,p=b.height,f=b.x,y=b.y,d=b.sdf,m=b.pixelRatio,v=b.stretchX,g=b.stretchY,b=b.content,w=new ae({width:h,height:p}),ae.copy(l,w,{x:f,y},{x:0,y:0},{width:h,height:p}),a[c]={data:w,pixelRatio:m,sdf:d,stretchX:v,stretchY:g,content:b};case 17:t++,e.next=1;break;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.next=7,u();n.next=9;break;case 7:for(l in a)t.style.addImage(l,a[l]);o();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},MapClusterMarker:function(e){return new ce(this,e)},MapSourceEvent:function(e,t){return new pe(this,e,t)}}}(c,t);for(a in new Event("layerdata"),h)c.prototype[a]=h[a];var p,f=de.Style,y=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,o=e.prototype.queryRenderedFeatures,i=e.prototype.addLayer,a=e.prototype.removeLayer,s={};return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,o=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=o._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var i=o._availableImages.slice(r),a=0;a<i.length;a++)o.imageManager.images[i[a]].type="custom";o.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){var r=e.interactive;s[e.id]=void 0===r||r,i.call(this,e,t)},removeLayer:function(e){s[e]&&delete s[e],a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=o.call(this,e,t,r);if(0<n.length)for(var i=0;i<n.length;i++){var a=s[n[i].layer.id];n[i].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))}}}(f);for(p in y)f.prototype[p]=y[p];var d=(e=de.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=d.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(de&&e&&t){(me=e).GLTFLoader=t,window.THREE=me;var r,n=de.Map,o={initGLTF:function(e,t,r){return new j(e,t,r)}};for(r in o)n.prototype[r]=o[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>u,gcj02ToWgs84:()=>function(e,t){var r,n,o,i,a;return N(e,t)?[e,t]:(r=M(e-105,t-35),n=k(e-105,t-35),o=t/180*E,i=Math.sin(o),i=1-A*i*i,a=Math.sqrt(i),r=180*r/(x*(1-A)/(i*a)*E),[2*e-(e+(n=180*n/(x/a*Math.cos(o)*E))),2*t-(t+r)])},getArrayDepth:()=>d,getPositionType:()=>y,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,o=void 0===(t=e.color)?"#f00":t,i=e.custom,a=m(o,!0),s=!1;return i&&"function"==typeof i&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,u,l=this.context;return s?l=i({width:this.width,height:this.height,duration:n,color:o,context:l}):(e=performance.now()%n/n,t=r/2*.2,u=r/2*e,l.clearRect(0,0,this.width,this.height),l.beginPath(),l.arc(this.width/2,this.height/2,u,0,2*Math.PI),l.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",l.lineWidth=2,l.stroke(),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.fill(),l.beginPath(),l.arc(this.width/2,this.height/2,t,0,2*Math.PI),l.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",l.lineWidth=2+4*(1-e),l.fill()),this.data=l.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>m,isGeoJSON:()=>l,isNumber:()=>v,isValidNumber:()=>g,judgeSizeLngLat:()=>h,latFromMercatorY:()=>w,lngFromMercatorX:()=>b,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var i=0;i<n.length;i++)Array.isArray(n[i])?t.push.apply(t,n[i]):n[i]&&"object"==typeof n[i]&&t.push(n[i]);for(var a,s=0;s<t.length;s++){var u=t[s];l(u)&&(u=u.features,(a=e.features).push.apply(a,u))}return e},object2Geojson:()=>function(e,t,r){var n=u(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var o=[],i=function(e){var i=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return f(e,r);if(r=e[r[0]])return[p(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return f(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(i,t);0<a.length&&a.map((function(t){var a=y(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a))||s)&&(s={type:"Feature"},"Feature"!==a?(s.properties=i,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),o.push(s))}))},a=0;a<n.length;a++)i(a);return e.features=o,e},outOfChina:()=>N,resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),l(e)){for(var r={type:"FeatureCollection",features:[]},n=e.features,o=0;o<n.length;o++){var a,s=n[o],u={};for(a in s)"geometry"!==a&&"properties"!==a&&"type"!==a&&(u[a]=s[a]);var p=s.geometry.coordinates,f=s.geometry.type,y={type:f,coordinates:null};y.coordinates=("Point"===f?h:c)(p,t),r.features.push(i({type:"Feature",geometry:y,properties:s.properties},u))}return r}return null},reversalLngLat:()=>c,transformGeojson:()=>function(e,t){return l(e)&&"function"==typeof t?((e=u(e)).features.forEach((function(e){var r=e.geometry;e.geometry.coordinates=L(r.coordinates,t)})),e):null},transformLngLat:()=>L,wgs84ToGcj02:()=>function(e,t){var r,n,o,i,a;return N(e=+e,t=+t)?[e,t]:(r=M(e-105,t-35),n=k(e-105,t-35),o=t/180*E,i=Math.sin(o),i=1-A*i*i,a=Math.sqrt(i),r=180*r/(x*(1-A)/(i*a)*E),[e+(n=180*n/(x/a*Math.cos(o)*E)),t+r])}});var a=e(687),s=e.n(a),u=function e(t){var r,n,o="object"!=(o=typeof(r=t))?o:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===o)n=[];else{if("Object"!==o)return t;n={}}if("Array"===o)for(var i=0,a=t.length;i<a;i++)n.push(e(t[i]));else if("Object"===o)for(var s in t)n[s]=e(t[s]);return n};function l(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function c(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?v(e[0])?h(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var o=t[n];v(o[0])?r.push(h(o)):r.push(e(o))}return r}(e):[]}function h(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function p(e){return"string"==typeof e?JSON.parse(e):e}function f(e,t,r){var n=[],o=2===(r=void 0===r?[]:r).length;return function e(t,i){var a;t&&i.length&&(a=i.shift(),t.hasOwnProperty(a))&&(t=t[a],Array.isArray(t)?0!==i.length||o?t.forEach((function(t){o?n.push([t[r[0]],t[r[1]]]):e(t,u(i))})):t&&(a=p(t),n.push(a)):"object"==typeof t?0===i.length?n.push(o?[t[r[0]],t[r[1]]]:t):e(t,i):0===i.length&&t&&(a=p(t),n.push(a)))}(e,t),n}function y(e){if(Array.isArray(e)){var t=d(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:var r=(n=e[0])[0],n=n[n.length-1];return r[0]===n[0]&&r[1]===n[1]?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature"}return null}function d(e){return Array.isArray(e)?Array.isArray(e[0])?1+d(e[0]):1:0}function m(e,t){void 0===t&&(t=!1);var r,n,o=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o))?(r=parseInt(o[1],16),n=parseInt(o[2],16),o=parseInt(o[3],16),t?[r,n,o,1]:"rgba("+r+","+n+","+o+",1)"):e}function v(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function g(e){return isFinite(e)&&!isNaN(e)}function b(e){return 360*e-180}function w(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function L(e,t){return e&&"function"==typeof t&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?v(e[0])?t(e):function e(t,r){for(var n=[],o=0;o<t.length;o++){var i=t[o];v(i[0])?n.push(r(i)):n.push(e(i,r))}return n}(e,t):[]}var E=Math.PI,x=6378245,A=.006693421622965943;function M(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*E)+20*Math.sin(2*e*E))/3)+2*(20*Math.sin(t*E)+40*Math.sin(t/3*E))/3+2*(160*Math.sin(t/12*E)+320*Math.sin(t*E/30))/3}function k(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*E)+20*Math.sin(2*e*E))/3)+2*(20*Math.sin(e*E)+40*Math.sin(e/3*E))/3+2*(150*Math.sin(e/12*E)+300*Math.sin(e/30*E))/3}function N(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}var C=["customName"],S=function(){function e(e,t,n){var a=this,u=(this._mouseEnter=function(){var e=r(s().mark((function e(t){var r,n,o,i,u,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,o=a.map.queryRenderedFeatures(r),l=null!=(l=o[0])?l:{},i=l.properties,u=l.geometry,l.source,l=l.layer,a.layerName.includes(l.id)){e.next=8;break}return null!=(l=a.popup)&&l.remove(),e.abrupt("return");case 8:if(l=u.coordinates,c=[n.lng,n.lat],"mouseenter"===a.mouseType&&(c=a._getPosition(l)),0<(null==(h=c)?void 0:h.length))return e.next=14,a.htmlCallBack(i,c,{lngLat:n,geometry:u,point:r,features:o,feature:o[0]});e.next=16;break;case 14:h=e.sent,a.popup.setLngLat(c).setHTML(h).addTo(a.map);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){a.popup.remove()},this.map=e,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),e=null!=(t=e.tooltipClass)?t:"commonTooltip",void 0!==(u=(t=null!=n?n:{}).customName)&&u);t=o(t,C),u=u?"":e+" ",this.className=u,null!=n&&n.className&&(u+=n.className),this.fullName=u,this.popup=new mapboxgl.Popup(i({},t,{className:u,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(t=null==n?void 0:n.closeOnClick)&&t,anchor:null!=(u=null==n?void 0:n.anchor)?u:"left",type:"tooltip"}))}var t=e.prototype;return t.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},t._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),P=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],_=function(){function e(e,t,n){var a=this,u=(this._closeOtherPopup=function(){var e;a.closeOther&&null!=(e=a.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(a.noCloseLayerName)&&0<a.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(a.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=r(s().mark((function e(t){var r,n,o,i,u,l,c,h,p,f,y,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(a._closeOtherPopup(),r=t.point,n=t.lngLat,o=a.map.queryRenderedFeatures(r),c=null!=(c=o[0])?c:{},i=c.properties,u=c.geometry,c.source,c=c.layer,a.layerName.includes(c.id)){e.next=8;break}return e.abrupt("return");case 8:if(a.customClick){e.next=28;break}return h=u.coordinates,p=u.type,e.next=12,null==(c=a.componentCallBack)?void 0:c.call(a,{properties:i,lngLat:n,coordinates:h,point:r,features:o,feature:o[0]});case 12:if(e.t1=l=e.sent,e.t0=null!==e.t1,!e.t0){e.next=16;break}e.t0=void 0!==l;case 16:e.t0?(e.t2=l,e.next=21):e.next=20;break;case 20:e.t2={};case 21:y=e.t2,f=y.component,y=y.instance,d=n,"Point"===p&&(d=h),a.vueInstance=y,f&&(a.popup.setOffset(a.offset),a.popup.setLngLat(d).setDOMContent(f).addTo(a.map));case 28:"function"==typeof a.callBack&&a.callBack({lngLat:n,properties:i,geometry:u,point:r});case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),void 0!==(l=(t=n||{}).destroyComponent)&&l),l=void 0!==(l=t.customClick)&&l,c=void 0!==(c=t.popupClose)&&c,h=void 0===(h=t.closeOther)||h,p=void 0===(p=t.noCloseLayerName)?[]:p,f=void 0!==(f=t.customName)&&f,y=void 0===(y=t.offset)?[0,0]:y,d=t.closeClick;t=o(t,P),e=null!=(e=e.popupClass)?e:"commonPopup",f=f?"":e+" ",this.className=f,null!=n&&n.className&&(f+=n.className),this.fullName=f,this.noCloseLayerName=p,this.noCloseLayerName=[],this.customClick=l,this.popupCloseSign=c,this.closeOther=h,this.offset=y="number"==typeof y?[y,y]:y,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(i({},t,{offset:y,className:f,closeButton:null!=(e=null==t?void 0:t.closeButton)&&e,closeOnClick:null!=(n=null==t?void 0:t.closeOnClick)&&n,anchor:null!=(p=null==t?void 0:t.anchor)?p:"bottom",focusAfterOpen:null!=(l=null==t?void 0:t.focusAfterOpen)&&l,type:"popup",sourceName:this.layerName})),d&&"function"==typeof d&&(this.popup._closeClick=d),null!=(c=this.popup)&&c.on("close",(function(e){"function"==typeof a.closeCallback&&a.closeCallback(e),a.popupCloseSign&&null!=(e=a.vueInstance)&&e.popupClose&&"function"==typeof a.vueInstance.popupClose&&a.vueInstance.popupClose(),a.vueInstance&&u&&null!=(e=a.vueInstance)&&e.$destroy()})))}var t=e.prototype;return t.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},t.close=function(){var e;null!=(e=this.popup)&&e._onClose()},t.closeBack=function(e){this.closeCallback=e},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),j=function(){function e(e,t,r){var n=this,o=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(o=t.scale)?1:o),i=void 0===(i=t.height)?0:i,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,u=void 0===(u=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:u,l=void 0===(l=t.DirectionalLight)?[]:l,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=o,this.height=i,this.rotate=a,this.properties=s,this.AmbientLight=u,this.DirectionalLight=l,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,i),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:o*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,o=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,i=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,i)).position.set(e[0],e[1],e[2]).normalize(),o.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=o.properties,e.scene.children[t].lngLat=o.lngLat;o.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),o=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),i=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(o),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=i.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),T=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._clearSource(),this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,i({},t,r.sourceConfig)):this.map.addSource(e,i({type:"geojson",data:t},r.sourceConfig)),t=r.beforeId||null,this.map.addLayer(i({id:e,type:"line",source:e},r.layerConfig),t),r.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(i({id:this.lineName,type:"line",source:e},r.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-highlight")&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),I=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var o=r.sliceNum;if(!o||o<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var i=0,a=0;a<e.features.length;a+=o){var s={type:"FeatureCollection",features:[]},u=e.features.slice(a,o);s.features=[].concat(u),u=t+"-"+i,this.sourceName.push(u),this._addSourceLayer(u,s,r),i++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,i({},t,r.sourceConfig)):this.map.addSource(e,i({type:"geojson",data:t},r.sourceConfig)),t=r.beforeId||null,this.map.addLayer(i({id:e,type:this.type,source:e},r.layerConfig),t)},e}(),O={centimeters:100*(a=6371008.8),centimetres:100*a,degrees:a/111325,feet:3.28084*a,inches:39.37*a,kilometers:a/1e3,kilometres:a/1e3,meters:a,metres:a,miles:a/1609.344,millimeters:1e3*a,millimetres:1e3*a,nauticalmiles:a/1852,radians:1,yards:1.0936*a};function R(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function F(e,t,r){void 0===r&&(r={});for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}return R({type:"Polygon",coordinates:e},t,r)}function B(e){return e%(2*Math.PI)*180/Math.PI}function G(e){return e%360*Math.PI/180}function H(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function q(e,t,r){if(null!==e)for(var n,o,i,a=0,s=e.type,u="FeatureCollection"===s,l="Feature"===s,c=u?e.features.length:1,h=0;h<c;h++)for(var p,f,y=(f=!!(p=u?e.features[h].geometry:l?e.geometry:e)&&"GeometryCollection"===p.type)?p.geometries.length:1,d=0;d<y;d++){var m=0,v=0,g=f?p.geometries[d]:p;if(null!==g){var b=g.coordinates,w=g.type,L=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1;switch(w){case null:break;case"Point":if(!1===t(b,a,h,m,v))return!1;a++,m++;break;case"LineString":case"MultiPoint":for(n=0;n<b.length;n++){if(!1===t(b[n],a,h,m,v))return!1;a++,"MultiPoint"===w&&m++}"LineString"===w&&m++;break;case"Polygon":case"MultiLineString":for(n=0;n<b.length;n++){for(o=0;o<b[n].length-L;o++){if(!1===t(b[n][o],a,h,m,v))return!1;a++}"MultiLineString"===w&&m++,"Polygon"===w&&v++}"Polygon"===w&&m++;break;case"MultiPolygon":for(n=0;n<b.length;n++){for(o=v=0;o<b[n].length;o++){for(i=0;i<b[n][o].length-L;i++){if(!1===t(b[n][o][i],a,h,m,v))return!1;a++}v++}m++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===q(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function D(e){var t=[1/0,1/0,-1/0,-1/0];return q(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const U=D.default=D,z=function(e){e=U(e);var t=void 0,r=(void 0===t&&(t={}),Number(e[0])),n=Number(e[1]),o=Number(e[2]),i=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return F([[a,[o,n],[o,i],[r,i],a]],t.properties,{bbox:e,id:t.id})};function J(e,t,r,n){void 0===n&&(n={});var o=G((e=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e))[0]),i=(e=G(e[1]),r=G(r),t=function(e,t){var r=O[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(H(e[0])&&H(e[1]))return R({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}([B(o+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(i))),B(i)],n.properties)}const Y=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,o=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),i=[],a=0;a<n;a++)i.push(J(e,t,-360*a/n,r).geometry.coordinates);return i.push(i[0]),F([i],o)};var Z=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,o=null!=r?r:{},i=void 0===(n=o.radius)?0:n,a=void 0===(n=o.steps)?64:n,s=o.endRadius,u=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var l=e.features,c=0;c<l.length;c++){var h,p,f,y,d,m=l[c].geometry.coordinates;"number"==typeof m[0]&&"number"==typeof m[1]&&(m[0]<m[1]&&(h=[m[1],m[0]],m[0]=h[0],m[1]=h[1]),h=!1,p=0<(p=(h="string"==typeof i||h)?l[c].properties[i]:i)?p:0,f={steps:a,units:"kilometers",properties:l[c].properties},y=Y(m,p,f),s?(d=!1,d=0<(d=(d="string"==typeof s||d)?l[c].properties[s]:s)?d:0,m=Y(m,s,f),u.push(p===d?y:p<d?this._getRingJson(m.geometry.coordinates[0],y.geometry.coordinates[0],y.properties):this._getRingJson(y.geometry.coordinates[0],m.geometry.coordinates[0],y.properties))):u.push(y))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:u},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,r){this.lineName=e+"-line",r.lineConfig&&null!=(n=this.map)&&n.getLayer(this.lineName)&&this.map.removeLayer(this.lineName),null!=(n=this.map)&&n.getLayer(e)&&this.map.removeLayer(e),null!=(n=this.map)&&n.getSource(e)&&this.map.removeSource(e),this.map.addSource(e,i({type:"geojson",data:t},r.sourceConfig));var n=(null!=r?r:{}).beforeId;this.map.addLayer(i({id:e,type:"fill",source:e},r.layerConfig),n),r.lineConfig&&this.map.addLayer(i({id:this.lineName,type:"line",source:e},r.lineConfig),n)},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-line")&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),V=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,o=function(t){var n,o;r.event.push(t),0<(null==(o=r.name)?void 0:o.length)?null!=(o=r.name)&&o.forEach((function(n){function o(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var i;r[t]=o,null!=(i=r.map)&&i.on(t,n,o)})):(r[t]=o=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,o))};for(n in e)o(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,o;r.event.includes(e)&&(o=r[e],null!=(n=r.map))&&n.off(e,t,o)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,o=r[t];null!=(n=r.map)&&n.off(t,e,o)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),X=["id","type"],$=["id","type","beforeId"],W=function(){function e(e){this.map=e,this.sourceName=[]}var t=e.prototype;return t.draw=function(e,t){var r,n,a,s,u,c=this;return l(e)||"vector"===e.type?(r=(a=null!=(a=t.sourceConfig)?a:{}).id,n=void 0===(n=a.type)?"geojson":n,a=o(a,X),s=r,t=null!=(t=t.layerConfig)?t:{},u=[],Array.isArray(t)?u=t:"object"==typeof t&&u.push(t),u.forEach((function(e){var t;(e=e.id)&&null!=(t=c.map)&&t.getLayer(e)&&c.map.removeLayer(e)})),null!=(t=this.map)&&t.getSource(s)&&this.map.removeSource(s),"vector"===e.type?this.map.addSource(r,i({},a,e)):this.map.addSource(r,i({type:n,data:e},a)),u.forEach((function(e){var t=e.id,r=e.type,n=e.beforeId;e=o(e,$),c.map.addLayer(i({id:t,type:r,source:s},e),n)})),this.sourceName=[s].concat(u.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},t.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),K=function(){function e(t,r,n){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var o={layer:null,tooltip:null,popup:null};return r&&"object"==typeof r&&(o=i({},o,r)),this.name=t,this.layers=o,this.prop=null!=n?n:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ee,te,re,ne,oe=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(l(e))for(var r,n=null!=(r=this.options)?r:{},o=0,a=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Q(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=a()).done;){var s,u,c=c.value;"Point"===c.geometry.type&&(s=n,t&&"function"==typeof t&&1===(null==(u=t({lngLat:c.geometry.coordinates,properties:c.properties,index:o}))?void 0:u.nodeType)&&(s=i({},s,{element:u})),u=new mapboxgl.Marker(s).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(u),this.properties.push(c.properties),o++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var r=0;r<this.markers.length;r++)!function(r){["dragstart","drag","dragend"].forEach((function(n){e[n]&&"function"==typeof e[n]&&t.markers[r].on(n,(function(o){e[n](i({},o,{properties:t.properties[r]}))}))}))}(r)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),ie=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),ae=(a={},function(){function e(e,t){this.width=void 0,this.height=void 0,this.data=void 0;var r=this,n=e.width;if(e=e.height,t){if(t instanceof Uint8ClampedArray)t=new Uint8Array(t.buffer);else if(t.length!==n*e*4)throw new RangeError("mismatched image size")}else t=new Uint8Array(n*e*4);r.width=n,r.height=e,r.data=t}var t=e.prototype;return t.resize=function(t){var r,n,o;r=this,n=(t=new e(t)).width,o=t.height,n===r.width&&o===r.height||(se(r,t,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,n),height:Math.min(r.height,o)},4),r.width=n,r.height=o,r.data=t.data)},t.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},t.clone=function(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))},e.copy=function(e,t,r,n,o){se(e,t,r,n,o,4)},e}());function se(e,t,r,n,o,i){if(0!==o.width&&0!==o.height){if(o.width>e.width||o.height>e.height||r.x>e.width-o.width||r.y>e.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>t.width||o.height>t.height||n.x>t.width-o.width||n.y>t.height-o.height)throw new RangeError("out of range destination coordinates for image copy");var a=e.data,s=t.data;if(a===s)throw new RangeError("image is the same");for(var u=0;u<o.height;u++)for(var l=((r.y+u)*e.width+r.x)*i,c=((n.y+u)*t.width+n.x)*i,h=0;h<o.width*i;h++)s[c+h]=a[l+h]}}function ue(){return(ue=r(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=0),e.next=3,new Promise((function(e){var n=new Image;n.src=t,n.crossOrigin="Anonymous",n.onload=function(){var t=n.width,o=n.height,i=(ee=ee||window.document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");(t>ee.width||o>ee.height)&&(ee.width=t,ee.height=o),i.clearRect(-r,-r,t+2*r,o+2*r),i.drawImage(n,0,0,t,o),e(i.getImageData(-r,-r,t+2*r,o+2*r))}}));case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}te=ae,void 0===ne&&(ne={}),(re="RGBAImage")?a[re]?console.error(re+" is already registered."):(Object.defineProperty(te,"_classRegistryKey",{value:re,writeable:!1}),a[re]={klass:te,omit:ne.omit||[]}):console.error("Can't register a class without a name.");var ce=function(){function e(e,t){this.map=e,this.options=null!=t?t:{key:"id"},this.markers={},this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t){var r=this,n={};this.mapEvent=function(){if(r.map.getSource(e)&&r.map.isSourceLoaded(e)){for(var o,a={},s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?le(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?le(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.map.querySourceFeatures(e));!(h=s()).done;){var u,l,c,h,p=(h=h.value).geometry.coordinates;(h=h.properties).cluster||(u=h[r.options.key],(c=r.markers[u])?(l=c.getLngLat().toArray())[0]===p[0]&&l[1]===p[1]||c.setLngLat(p):(l=null,l="function"==typeof t?t({properties:h,lngLat:p}):document.createElement("div"),c=r.markers[u]=new mapboxgl.Marker(i({},r.options,{element:l})).setLngLat(p)),a[u]=c,n[u])||c.addTo(r.map)}for(o in n)a[o]||n[o].remove();n=a}},this.map.on("render",this.mapEvent)},t.destroy=function(){for(var e in this.markers)null!=(e=this.markers[e])&&e.remove();this.markers={},this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){if("boolean"==typeof e)for(var t in this.markers)this.markers[t]&&this.markers.hasOwnProperty(t)&&(this.markers[t].getElement().style.display=e?"block":"none")},e}(),he=["once"],pe=function(){function e(e,t,r){this.map=e,this.options=null!=r?r:{},this.sourceName=t,r=void 0===(t=(e=(this.mapEvent=null)!=r?r:{}).once)||t,t=o(e,he),this.once=r,this.other=t}var t=e.prototype;return t.open=function(e){var t=this;this.sourceName&&(this.mapEvent=function(){var r;t.map.getSource(t.sourceName)&&t.map.isSourceLoaded(t.sourceName)&&"function"==typeof e&&(r=t.map.querySourceFeatures(t.sourceName,t.other),e(r),t.once)&&t.destroy()},this.map.on("render",this.mapEvent))},t.destroy=function(){var e;null!=(e=this.map)&&e.off("render",this.mapEvent),this.mapEvent=null},e}(),fe=["padding","animate","maxZoom","essential"],ye=["url"],de=null,me=null,ve=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},ge=["line-color","line-opacity"],be=["fill-color","fill-opacity"],we=["background-color","background-opacity"],Le=["text-color","text-opacity"],Ee=function(e,t,r,n){if(r&&(ve(r)||Array.isArray(r))){var o=e.getLayer(t);if(o){var i=[];switch(o.type){case"line":i=ge;break;case"fill":i=be;break;case"background":i=we;break;case"symbol":i=Le}0<i.length&&(e.setPaintProperty(t,i[0],r),null!==n)&&e.setPaintProperty(t,i[1],n)}}},xe=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var o in r)null!==r[o]&&void 0!==r[o]&&e[n](t,o,r[o])}})(),n;function e(n){var o=r[n];return void 0!==o||(o=r[n]={exports:{}},t[n](o,o.exports,e)),o.exports}var t,r,n}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zh-mapbox",
3
- "version": "0.0.113",
3
+ "version": "0.0.121",
4
4
  "description": "mapbox的常用方法",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",