tg-map-vue3 3.7.10 → 3.7.12

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.
@@ -1,18 +1,18 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(o,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(o=typeof globalThis<"u"?globalThis:o||self,m(o.TgMap={},o.Vue))})(this,function(o,m){"use strict";var En=Object.defineProperty;var Pn=(o,m,S)=>m in o?En(o,m,{enumerable:!0,configurable:!0,writable:!0,value:S}):o[m]=S;var d=(o,m,S)=>(Pn(o,typeof m!="symbol"?m+"":m,S),S);function S(r,t,e){Object.keys(r).forEach(i=>{i.startsWith("update:")||e!=null&&e.includes(i)||t.addEventListener(i,r[i])})}let Xi=1;function Ji(){return Xi++}function Ee(r,t){return t.__id__||(t.__id__=Ji()),`${r}::${t.__id__}`}var Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Gt={exports:{}};(function(r){(function(t,e){r.exports?r.exports=e():t.coordtransform=e()})(Nt,function(){var t=52.35987755982988,e=3.141592653589793,i=6378245,n=.006693421622965943;function s(f,_,T,w){this.west=Math.min(f,T),this.north=Math.max(_,w),this.east=Math.max(f,T),this.south=Math.min(_,w)}s.prototype.contain=function(f,_){return this.west<=f&&this.east>=f&&this.north>=_&&this.south<=_};var l=[new s(79.4462,49.2204,96.33,42.8899),new s(109.6872,54.1415,135.0002,39.3742),new s(73.1246,42.8899,124.143255,29.5297),new s(82.9684,29.5297,97.0352,26.7186),new s(97.0253,29.5297,124.367395,20.414096),new s(107.975793,20.414096,111.744104,17.871542)],u=[new s(119.921265,25.398623,122.497559,21.785006),new s(101.8652,22.284,106.665,20.0988),new s(106.4525,21.5422,108.051,20.4878),new s(109.0323,55.8175,119.127,50.3257),new s(127.4568,55.8175,137.0227,49.5574),new s(131.2662,44.8922,137.0227,42.5692),new s(73.1246,35.398637,77.948114,29.5297)];function a(f,_){for(var T=0;T<l.length;T++)if(l[T].contain(f,_)){for(var w=0;w<u.length;w++)if(u[w].contain(f,_))return!1;return!0}return!1}function h(f,_){var T=f-.0065,w=_-.006,A=Math.sqrt(T*T+w*w)-2e-5*Math.sin(w*t),P=Math.atan2(w,T)-3e-6*Math.cos(T*t),X=A*Math.cos(P),ce=A*Math.sin(P);return[X,ce]}function c(f,_){var T=Math.sqrt(f*f+_*_)+2e-5*Math.sin(_*t),w=Math.atan2(_,f)+3e-6*Math.cos(f*t),A=T*Math.cos(w)+.0065,P=T*Math.sin(w)+.006;return[A,P]}function p(f,_){return a(f,_)?v(f,_):[f,_]}function g(f,_){if(!a(f,_))return[f,_];var T=v(f,_);return[f*2-T[0],_*2-T[1]]}function v(f,_){var T=M(f-105,_-35),w=C(f-105,_-35),A=_/180*e,P=Math.sin(A);P=1-n*P*P;var X=Math.sqrt(P);T=T*180/(i*(1-n)/(P*X)*e),w=w*180/(i/X*Math.cos(A)*e);var ce=_+T,zt=f+w;return[zt,ce]}function M(f,_){var T=-100+2*f+3*_+.2*_*_+.1*f*_+.2*Math.sqrt(Math.abs(f));return T+=(20*Math.sin(6*f*e)+20*Math.sin(2*f*e))*2/3,T+=(20*Math.sin(_*e)+40*Math.sin(_/3*e))*2/3,T+=(160*Math.sin(_/12*e)+320*Math.sin(_*e/30))*2/3,T}function C(f,_){var T=300+f+2*_+.1*f*f+.1*f*_+.1*Math.sqrt(Math.abs(f));return T+=(20*Math.sin(6*f*e)+20*Math.sin(2*f*e))*2/3,T+=(20*Math.sin(f*e)+40*Math.sin(f/3*e))*2/3,T+=(150*Math.sin(f/12*e)+300*Math.sin(f/30*e))*2/3,T}return{bd09togcj02:h,gcj02tobd09:c,wgs84togcj02:p,gcj02towgs84:g,bd09ToGcj02:h,gcj02ToBd09:c,wgs84ToGcj02:p,gcj02ToWgs84:g,bd09ToWgs84:function(f,_){if(!a(f,_))return[f,_];var T=h(f,_);return g(T[0],T[1])},wgs84ToBd09:function(f,_){if(!a(f,_))return[f,_];var T=p(f,_);return c(T[0],T[1])}}})})(Gt);var Qi=Gt.exports;const J=gt(Qi);function U(r,t){if(!r)throw new Error(`AssertionError: ${t}`)}function Pe(r){throw new Error(`Unexpected object: ${r}`)}function er(){}function Le(r){return r}function tr(r,t){return r instanceof t}function ir(r,t){if(r instanceof t)return r}function Be(r,t){return(r==null?void 0:r.$options.name)===t.name}function mt(r,t){return Be(r,t)?r:void 0}function Ie(r,t,e){let i=t;for(;i;){if(Be(i,r))return i;if(e&&Be(i,e))return;i=i.$parent}}function rr(r){return r}function E(r){throw new Error(r)}function Se(r){throw new Error(`Unsupported: ${r}`)}function nr(r){throw new Error(`todo: ${r}`)}function sr(r){return r}function Q(...r){}function or(r){return r!=null}function Zt(r){return r[1]!=null}function Wt(r){let t=null;return()=>t??(t=r().catch(e=>(t=null,Promise.reject(e))))}var I=(r=>(r.wgs84="wgs84",r.gcj02="gcj02",r.bd09="bd09",r))(I||{});const ft="wgs84",x=class{constructor(t,e,i){this.lat=t,this.lng=e,this.coord=i}static _normalize(t,e){const i=e>90?90:e<-90?-90:e;return[t>180?(t+180)%360-180:t<-180?(t-180)%360+180:t,i]}static fromBaidu(t,e){return new x(t.lat,t.lng,e)}static fromGoogle(t,e){return new x(t.lat(),t.lng(),e)}static fromHere(t,e){return new x(t.lat,t.lng,e)}static fromLiteral(t){return new x(t.lat,t.lng,t.coord||ft)}static fromLngLat(t,e,i=ft){return new x(e,t,i)}static create(t,e,i=ft){return new x(t,e,i)}to(t){const e=t;if(this.coord===e)return this;const[i,n]=this._convert(e);return new x(n,i,e)}toBaidu(t,e=!1){let i=this.lat,n=this.lng;return this.coord!==t&&([n,i]=this._convert(t)),e&&([n,i]=x._normalize(n,i)),new BMap.Point(n,i)}toGoogle(t){let e=this.lat,i=this.lng;return this.coord!==t&&([i,e]=this._convert(t)),new google.maps.LatLng(e,i)}toHere(t){let e=this.lat,i=this.lng;return this.coord!==t&&([i,e]=this._convert(t)),new H.geo.Point(e,i)}_convert(t){switch(this.coord){case"bd09":return t==="gcj02"?J.bd09ToGcj02(this.lng,this.lat):J.bd09ToWgs84(this.lng,this.lat);case"gcj02":return t==="wgs84"?J.gcj02ToWgs84(this.lng,this.lat):J.gcj02ToBd09(this.lng,this.lat);case"wgs84":return t==="bd09"?J.wgs84ToBd09(this.lng,this.lat):J.wgs84ToGcj02(this.lng,this.lat)}throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`)}normalize(){const[t,e]=x._normalize(this.lng,this.lat);return e===this.lat&&t===this.lng?this:new x(e,t,this.coord)}equals(t){return this===t?!0:this.lat===t.lat&&this.lng===t.lng&&this.coord===t.coord}toString(){return JSON.stringify(this)}};let b=x;d(b,"ZERO",x.create(0,0));const K=class{constructor(t,e){d(this,"coord");this.sw=t,this.ne=e,U(t.coord===e.coord,"sw和ne的coord应该相同"),U(Number.isFinite(t.lat)&&Number.isFinite(t.lng)&&Number.isFinite(e.lat)&&Number.isFinite(e.lng),`sw(${t})和ne(${e})不能包含NaN或Infinite`),U(t.lat<=e.lat,`sw.lat(${t.lat})应该比ne.lat(${e.lat})小`),this.coord=t.coord}static isBetweenLng(t,e,i){return t<=e?t<=i&&i<=e:t<=i||i<=e}static fromArray(t){if(t.length===0)return;const e=new K.Builder(t[0]);for(let i=1;i<t.length;i++)e.include(t[i]);return e.build()}static from(...t){return this.fromArray(t)??E("positions中没有点")}static fromGoogle(t,e){return new K(b.fromGoogle(t.getSouthWest(),e),b.fromGoogle(t.getNorthEast(),e))}static fromBaidu(t,e){return new K(b.fromBaidu(t.getSouthWest(),e),b.fromBaidu(t.getNorthEast(),e))}static create(t,e){return this.from(t,e)}isEmpty(){return this.sw.equals(this.ne)}contains(t){const{lat:e,lng:i}=t.to(this.coord);return this.sw.lat<=e&&e<=this.ne.lat&&K.isBetweenLng(this.sw.lng,this.ne.lng,i)}getCenter(){if(this.sw.equals(this.ne))return this.sw;const t=(this.sw.lat+this.ne.lat)/2,e=(this.sw.lng+this.ne.lng+(this.sw.lng<this.ne.lng?0:360))/2;return b.create(t,e,this.coord)}toString(){return JSON.stringify(this)}equals(t){return this.sw.equals(t.sw)&&this.ne.equals(t.ne)}toRectArray(){const t=this.sw.coord;return[this.sw,b.fromLngLat(this.sw.lng,this.ne.lat,t),this.ne,b.fromLngLat(this.ne.lng,this.sw.lat,t)]}toGoogle(t){return new google.maps.LatLngBounds(this.sw.toGoogle(t),this.ne.toGoogle(t))}toBaidu(t){return new BMap.Bounds(this.sw.toBaidu(t),this.ne.toBaidu(t))}toBaiduArray(t){return[this.sw.toBaidu(t),this.ne.toBaidu(t)]}};let R=K;d(R,"EMPTY",new K(b.ZERO,b.ZERO)),(r=>{class t{constructor(i){d(this,"coord");d(this,"minLat");d(this,"minLng");d(this,"maxLat");d(this,"maxLng");this.coord=i.coord,this.minLat=this.maxLat=i.lat,this.minLng=this.maxLng=i.lng}build(){return new r(b.create(this.minLat,this.minLng,this.coord),b.create(this.maxLat,this.maxLng,this.coord))}include(i){const{lat:n,lng:s}=i.to(this.coord);return this.minLat=Math.min(this.minLat,n),this.maxLat=Math.max(this.maxLat,n),r.isBetweenLng(this.minLng,this.maxLng,s)||(this.delta(this.minLng,s)<this.delta(s,this.maxLng)?this.minLng=s:this.maxLng=s),this}delta(i,n){return(i-n+360)%360}}r.Builder=t})(R||(R={})),o.Location=void 0,(r=>{function t(i,n){if(i==null)return;if(typeof i=="string")return i;const s=i.to(n);return`${s.lat},${s.lng}`}r.toString=t;function e(i){return typeof i=="string"||i==null?void 0:i.coord}r.getCoordType=e})(o.Location||(o.Location={}));var yt;(r=>{function t(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}r.isScrollable=t})(yt||(yt={})),o.Arrays=void 0,(r=>{function t(u,a){return u.length===a.length&&u.every((h,c)=>h===a[c])}r.equals=t;function e(u,a){const h=u.indexOf(a);if(h!==-1)return u.splice(h,1)[0]}r.remove=e;function i(u,a){for(const h of u)if(h instanceof a)return h}r.findByType=i;function n(u,a){return u.includes(a)}r.includesTyped=n;function s(u,a,h){const c=a>=0?a:u.length+a;if(h===void 0)return u[c];u[c]=h}r.at=s;function l(u){return u.length>0}r.isNotEmpty=l})(o.Arrays||(o.Arrays={})),o.MVCArrays=void 0,(r=>{function t(n,s){const l=n.getLength();for(let u=0;u<l;u++)if(n.getAt(u)===s)return u;return-1}r.indexOf=t;function e(n,s){const l=t(n,s);if(l!==-1)return n.removeAt(l)}r.remove=e;function i(n,s){return[n.addListener("insert_at",s),n.addListener("remove_at",s),n.addListener("set_at",s)]}r.listenChanged=i})(o.MVCArrays||(o.MVCArrays={}));function Vt(r,t,e){return r.addListener(t,e).remove}function ar(r,t,e){return r.addEventListener(t,e),()=>r.removeEventListener(t,e)}function lr(r,t,e,i){return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function jt(r,t,e){return r.addEventListener(t,e),()=>r.removeEventListener(t,e)}class Ht{constructor(t,e){d(this,"eventMap",new Map);d(this,"target",void 0);this.inner=t,this.coordTypeSupplier=e,this.addEventListener=this.addEventListener.bind(this),this.removeEventListener=this.removeEventListener.bind(this)}setTarget(t){return this.target=t,this}}class ke{constructor(t,e){d(this,"eventHub",new Ft);this.delegate=t,this.options=e}notify(t){this.eventHub.notify(t)}hasListener(t){return this.eventHub.hasListener(t)}setTarget(t){return this.delegate.setTarget(t),this}addEventListener(t,e){if(o.Arrays.includesTyped(this.options.types,t)){this.eventHub.hasListener(t)||this.options.onListen(t),this.eventHub.addEventListener(t,e);return}this.delegate.addEventListener(t,e)}removeEventListener(t,e){if(o.Arrays.includesTyped(this.options.types,t)){this.eventHub.removeEventListener(t,e),this.eventHub.hasListener(t)||this.options.onCancel(t);return}this.delegate.removeEventListener(t,e)}}const $t=class extends Ht{addEventListener(t,e){const i=Ee(t,e);if(this.eventMap.get(i)){console.warn("listener已经添加过了",i,e);return}const n=this.inner.addListener($t.EVENT_TYPE_MAP[t]||t,s=>{const l={type:t,target:this.target,originalEvent:s};s!=null&&s.latLng&&(l.position=b.fromGoogle(s.latLng,this.coordTypeSupplier.coordType)),e.call(this.target,l)});this.eventMap.set(i,n)}removeEventListener(t,e){const i=Ee(t,e),n=this.eventMap.get(i);n?(n.remove(),this.eventMap.delete(i)):console.warn("移除失败, 不存在该listener",i,e)}};let Y=$t;d(Y,"EVENT_TYPE_MAP",{"center-changed":"center_changed","zoom-changed":"zoom_changed","radius-changed":"radius_changed","bounds-changed":"bounds_changed","map-type-changed":"maptypeid_changed","map-mousedown":"mousedown","map-mousemove":"mousemove","map-mouseup":"mouseup","map-dblclick":"dblclick"});const dt=class extends Ht{addEventListener(t,e){const i=Ee(t,e);if(this.eventMap.get(i)){console.warn("listener已经添加过了",i,e);return}const n=s=>{const l={type:t,target:this.target,originalEvent:s};s.point&&(l.position=b.fromBaidu(s.point,this.coordTypeSupplier.coordType)),e.call(this.target,l)};this.inner.addEventListener(dt.EVENT_TYPE_MAP[t]||t,n),this.eventMap.set(i,n)}removeEventListener(t,e){const i=Ee(t,e),n=this.eventMap.get(i);n?(this.inner.removeEventListener(dt.EVENT_TYPE_MAP[t]||t,n),this.eventMap.delete(i)):console.warn("移除失败, 不存在该listener",i,e)}};let ee=dt;d(ee,"EVENT_TYPE_MAP",{drag:"dragging",closeclick:"clickclose",contextmenu:"rightclick","zoom-changed":"zoomend","map-type-changed":"maptypechange"});class Ft{constructor(){d(this,"typeMap",new Map)}addEventListener(t,e){let i=this.typeMap.get(t);i||(i=[],this.typeMap.set(t,i)),!i.includes(e)&&i.push(e)}removeEventListener(t,e){const i=this.typeMap.get(t);i&&o.Arrays.remove(i,e)}hasListener(t){const e=this.typeMap.get(t);return e!=null&&e.length>0}notify(t){const e=this.typeMap.get(t.type);e&&e.forEach(i=>i.call(t.target,t))}}class vt{constructor(t,e){d(this,"keyToValue",new Map);d(this,"valueToKey",new Map);U(t.length===e.length);for(let i=t.length-1;i>=0;i--)this.keyToValue.set(t[i],e[i]),this.valueToKey.set(e[i],t[i])}toKey(t){return this.valueToKey.get(t)??E()}toValue(t){return this.keyToValue.get(t)??E()}}class Ut{constructor(t,e=10){d(this,"map",new Map);this.values=t,this.maxSize4Debug=e}getValueMap(t){let e=this.map.get(t);if(!e){e=new Map;for(let i=this.values.length-1;i>=0;i--){const n=this.values[i];e.set(t.call(n),n)}this.map.set(t,e),process.env.NODE_ENV!=="production"&&this.map.size>this.maxSize4Debug&&console.warn(`this.map的大小(${this.map.size})超过了设置的最大大小(${this.maxSize4Debug}), 这可能是由于你每次都创建新的keySelector造成的, 请保证相同功能的keySelector只创建一个对象`)}return e}getOrNull(t,e){return this.getValueMap(t).get(e)}get(t,e){return this.getOrNull(t,e)??E(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`)}}class te{constructor(t){d(this,"value");this.creator=t}get(){return this.value===void 0&&(this.value=this.creator()),this.value}}var L=(r=>(r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right",r.LEFT_TOP="left-top",r.LEFT_CENTER="left-center",r.LEFT_BOTTOM="left-bottom",r.RIGHT_TOP="right-top",r.RIGHT_CENTER="right-center",r.RIGHT_BOTTOM="right-bottom",r))(L||{});o.ControlPositionConverter=void 0,(r=>{let t,e;const i=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom","right-top","right-center","right-bottom"];function n(){return t||(t=new vt(i,[BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_TOP_RIGHT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_RIGHT,BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_TOP_RIGHT,BMAP_ANCHOR_BOTTOM_RIGHT,BMAP_ANCHOR_BOTTOM_RIGHT])),t}r.getBaidu=n;function s(){return e||(e=new vt(i,[google.maps.ControlPosition.TOP_LEFT,google.maps.ControlPosition.TOP_CENTER,google.maps.ControlPosition.TOP_RIGHT,google.maps.ControlPosition.BOTTOM_LEFT,google.maps.ControlPosition.BOTTOM_CENTER,google.maps.ControlPosition.BOTTOM_RIGHT,google.maps.ControlPosition.LEFT_TOP,google.maps.ControlPosition.LEFT_CENTER,google.maps.ControlPosition.LEFT_BOTTOM,google.maps.ControlPosition.RIGHT_TOP,google.maps.ControlPosition.RIGHT_CENTER,google.maps.ControlPosition.RIGHT_BOTTOM])),e}r.getGoogle=s})(o.ControlPositionConverter||(o.ControlPositionConverter={}));class Yt{constructor(t){d(this,"inner");this.position=t}}class Ae{}class qt extends Ae{constructor(t,e){super(),this.visible=t,this.position=e}isVisible(){return this.visible}setVisible(t){this.visible=t}getPosition(){return this.position}setPosition(t){this.position=t}addTo(t){}removeFrom(t){}}class xe extends Ae{constructor(t,e){super(),this.inner=t,this.position=e}isVisible(){return this.inner.isVisible()}setVisible(t){t?this.inner.show():this.inner.hide()}getPosition(){return this.position??o.ControlPositionConverter.getBaidu().toKey(this.inner.getAnchor())}setPosition(t){this.position=t,this.inner.setAnchor(o.ControlPositionConverter.getBaidu().toValue(t))}addTo(t){t.innerMap.addControl(this.inner)}removeFrom(t){t.innerMap.removeControl(this.inner)}}class de extends Ae{constructor(e,i){super();d(this,"visible",!1);d(this,"map");this._type=e,this.position=i}isVisible(){return this.visible}setVisible(e){this.visible=e,this.tryUpdateOptions()}getPosition(){return this.position}setPosition(e){this.position=e,this.tryUpdateOptions()}addTo(e){this.map||(this.map=e,this.setVisible(!0))}removeFrom(){this.map&&(this.setVisible(!1),this.map=void 0)}onCreateOptions(){return{position:o.ControlPositionConverter.getGoogle().toValue(this.position)}}tryUpdateOptions(){this.map&&this.map.innerMap.setOptions({[`${this._type}Control`]:this.visible,[`${this._type}ControlOptions`]:this.onCreateOptions()})}}var _t=(r=>(r.normal="normal",r.satellite="satellite",r.hybrid="hybrid",r))(_t||{});class ${constructor(t,e,i,n){this.id=t,this.baidu=e,this.google=i,this.googleCoordType=n}getId(){return this.id}getBaiduCoordType(){return I.bd09}asBaiduMapType(){return this.baidu()}getGoogleCoordType(){return this.googleCoordType}getGoogleMapTypeId(){return this.google()}asGoogleMapType(){Se("google的内置地图没有对应的实例")}}class hr{constructor(t,e){d(this,"baiduLayerCached",new te(()=>{const t=new BMap.TileLayer({});return t.getTilesUrl=(e,i)=>{const n=Math.pow(2,i-1),s=e.x+n,l=n-1-e.y;return this.options.getTileUrl({x:s,y:l},i)},t}));d(this,"baiduMapTypeCached",new te(()=>{const t=new BMap.MapType(this.options.name,this.baiduLayerCached.get(),{maxZoom:this.options.maxZoom,minZoom:this.options.minZoom,tips:this.options.describe});return t.__baidu_map_type__=this,t}));d(this,"googleCached",new te(()=>{const t=new google.maps.ImageMapType({getTileUrl:(e,i)=>this.options.getTileUrl(e,i),tileSize:new google.maps.Size(256,256),name:this.options.name,alt:this.options.describe,maxZoom:this.options.maxZoom,minZoom:this.options.minZoom});return t.__google_map_type__=this,t}));this.coordType=t,this.options=e}get id(){return this.options.id}getBaiduCoordType(){return this.coordType}asBaiduMapType(){return this.baiduMapTypeCached.get()}asBaiduLayer(){return this.baiduLayerCached.get()}getGoogleCoordType(){return this.coordType}asGoogleMapType(){return this.googleCached.get()}asGoogleLayer(){Se("这个方法不会被调用")}}class Kt{constructor(){d(this,"baiduCache",new te(()=>new BMap.TrafficLayer));d(this,"googleCache",new te(()=>new google.maps.TrafficLayer))}asBaiduLayer(){return this.baiduCache.get()}asGoogleLayer(){return this.googleCache.get()}}o.MapType=void 0,(r=>{r.NORMAL=new $("normal",()=>BMAP_NORMAL_MAP,()=>google.maps.MapTypeId.ROADMAP,I.gcj02),r.SATELLITE=new $("satellite",()=>BMAP_SATELLITE_MAP,()=>google.maps.MapTypeId.SATELLITE,I.wgs84),r.HYBRID=new $("hybrid",()=>BMAP_HYBRID_MAP,()=>google.maps.MapTypeId.HYBRID,I.gcj02),r.TERRAIN=new $("terrain",()=>BMAP_PERSPECTIVE_MAP,()=>google.maps.MapTypeId.TERRAIN,I.wgs84),r.BUILD_IN_MAP_TYPES=new Ut([r.NORMAL,r.SATELLITE,r.HYBRID,r.TERRAIN])})(o.MapType||(o.MapType={}));var bt=(r=>(r.DEFAULT="default",r.HORIZONTAL="horizontal",r.DROPDOWN="dropdown",r))(bt||{});const Xt=[o.MapType.NORMAL,o.MapType.SATELLITE,o.MapType.HYBRID];class Re extends xe{static create(t){const e=t.mapTypes??Xt,i={default:BMAP_MAPTYPE_CONTROL_HORIZONTAL,horizontal:BMAP_MAPTYPE_CONTROL_HORIZONTAL,dropdown:BMAP_MAPTYPE_CONTROL_DROPDOWN},n=new BMap.MapTypeControl({type:t.type&&i[t.type],mapTypes:e.map(s=>s.asBaiduMapType())});return t.position&&n.setAnchor(o.ControlPositionConverter.getBaidu().toValue(t.position)),new Re(n,t.position)}}const he=class extends de{constructor(t="default",e=L.TOP_LEFT,i=Xt){super("mapType",e),this.type=t,this.mapTypes=i,he.type2google||(he.type2google={default:google.maps.MapTypeControlStyle.DEFAULT,horizontal:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,dropdown:google.maps.MapTypeControlStyle.DROPDOWN_MENU})}static create(t){return new he(t.type,t.position,t.mapTypes)}onCreateOptions(){const t=super.onCreateOptions();return t.style=he.type2google[this.type],t.mapTypeIds=this.mapTypes.map(e=>e instanceof $?e.getGoogleMapTypeId():e.id),t}addTo(t){super.addTo(t),this.mapTypes.forEach(e=>{e instanceof $||t.innerMap.mapTypes.set(e.id,e.asGoogleMapType())})}};let ue=he;d(ue,"type2google");class $e extends xe{static create(t){const e=new BMap.ScaleControl({anchor:t.position&&o.ControlPositionConverter.getBaidu().toValue(t.position)});return new $e(e,t.position)}}class ze extends de{static create(t){return new ze(t.position)}constructor(t=L.BOTTOM_RIGHT){super("scale",t)}}class De extends qt{static create(t){return new De(!0,t.position??L.RIGHT_BOTTOM)}}class Ne extends de{static create(t){return new Ne(t.position)}constructor(t=L.RIGHT_BOTTOM){super("streetView",t)}}class Ge extends xe{static create(t){const e=new BMap.NavigationControl({type:BMAP_NAVIGATION_CONTROL_ZOOM,anchor:t.position&&o.ControlPositionConverter.getBaidu().toValue(t.position)});return new Ge(e,t.position)}}class Ze extends de{static create(t){return new Ze(t.position)}constructor(t=L.RIGHT_BOTTOM){super("zoom",t)}}function cr(r){let t,e,i;const n="The Google Maps JavaScript API",s="google",l="importLibrary",u="__ib__",a=document,h=window,c=h[s]||(h[s]={}),p=c.maps||(c.maps={}),g=new Set,v=new URLSearchParams,M=()=>t||(t=new Promise(async(C,f)=>{var _;await(e=a.createElement("script")),v.set("libraries",[...g]+"");for(i in r)v.set(i.replace(/[A-Z]/g,T=>"_"+T[0].toLowerCase()),r[i]);v.set("callback",s+".maps."+u),e.src=`https://maps.${s}apis.com/maps/api/js?`+v,p[u]=C,e.onerror=()=>t=f(Error(n+" could not load.")),e.nonce=((_=a.querySelector("script[nonce]"))==null?void 0:_.nonce)||"",a.head.append(e)}));p[l]?console.warn(n+" only loads once. Ignoring:",r):p[l]=(C,...f)=>g.add(C)&&M().then(()=>p[l](C,...f))}let dr,ur;const F={get LATLNG_ZERO(){return dr??(dr=new google.maps.LatLng({lat:0,lng:0}))},get BOUNDS_ZERO(){return ur??(ur=new google.maps.LatLngBounds(this.LATLNG_ZERO,this.LATLNG_ZERO))}};function Jt(r,t={country:"",province:"",city:"",district:"",street:"",streetNumber:""}){for(const e of r)for(const i of e.types)switch(i){case"street_number":t.streetNumber=e.long_name;break;case"route":t.street=e.long_name;break;case"locality":t.city=e.long_name;break;case"sublocality":t.district=e.long_name;break;case"administrative_area_level_1":t.province=e.long_name;break;case"country":t.country=e.long_name;break}return t}function Qt(r,t){var i;const e=r.address_components&&Jt(r.address_components);return{country:(e==null?void 0:e.country)??"",province:(e==null?void 0:e.province)??"",city:(e==null?void 0:e.city)??"",id:r.place_id??"",address:r.formatted_address??"",position:b.fromGoogle(((i=r.geometry)==null?void 0:i.location)??F.LATLNG_ZERO,t.coordType),title:r.name??""}}class Mt{}class ei extends Mt{constructor(e,i){super();d(this,"inner");this.map=e,this.inner=new google.maps.places.Autocomplete(i.input,{fields:["address_components","name"]}),i.bindToMap&&this.inner.bindTo("bounds",e.innerMap)}setBounds(e){this.inner.setBounds(e.toGoogle(this.map.coordType))}addResultListener(e){return Vt(this.inner,"place_changed",()=>{const i=this.inner.getPlace(),n={title:i.name??"",province:"",city:"",district:"",street:"",streetNumber:"",country:""};i.address_components&&Jt(i.address_components,n),e(n)})}}class ti extends Mt{constructor(e,i){super();d(this,"inner");d(this,"input");d(this,"removeableArray",[]);if(this.map=e,this.input=i.input,this.inner=new BMap.Autocomplete({input:i.input,location:i.bindToMap?e.innerMap:void 0}),i.bindToMap){const n=()=>{this.inner.setLocation(this.map.innerMap)};this.removeableArray.push(jt(this.map,"center-changed",n)),this.removeableArray.push(jt(this.map,"zoom-changed",n))}}setBounds(e){this.inner.setLocation(e.getCenter().toBaidu(this.map.coordType))}addResultListener(e){let i=0;const n=ar(this.inner,"confirm",l=>{const u=l.item.value;i=Date.now(),e(Object.assign({title:u.business,country:""},u))}),s=lr(this.input,"keyup",l=>{l.key==="Enter"&&Date.now()-i>100&&e({title:this.input.value,country:"",city:"",district:"",province:"",street:"",streetNumber:""})});return()=>{s(),n()}}}class Tt{constructor(t){this.options=t}}function pe(r,t,e){const i=new URL(t,r),n=new URLSearchParams(Object.entries(e).filter(Zt));return i.search="?"+n.toString(),i}function Ct(){const r=window.location.hostname.split(".").filter(t=>!o.Strings.isInt(t));return r.length===3?r.join("."):[...r,"tg","map","urls"].slice(0,3).join(".")}const ut=class extends Tt{directions(t,e,i){return pe(ut.BASE_URL,"dir/",{api:"1",origin:o.Location.toString(t,I.gcj02),destination:o.Location.toString(e,I.gcj02),travelmode:i})}search(t){return pe(ut.BASE_URL,"search/",{api:"1",query:o.Location.toString(t,I.gcj02)})}};let ge=ut;d(ge,"BASE_URL","https://www.google.com/maps/");const we=class extends Tt{directions(t,e,i="driving"){const n=o.Location.getCoordType(e)??o.Location.getCoordType(t)??I.bd09,s=o.Location.toString(e,n);return pe(we.BASE_URL,"direction",{origin:o.Location.toString(t,n)??(typeof e!="string"?`name:请选择起点|latlng:${s}`:s),destination:s,coord_type:n===I.bd09?void 0:n,mode:i,output:"html",region:"中国",src:Ct()})}search(t){return typeof t=="string"?this.geocoderApi(t):this.latlngApi(t)}latlngApi(t){const e=t.to(I.bd09);return new URL(`https://map.baidu.com/?latlng=${e.lat},${e.lng}`)}markerApi(t,e,i){return pe(we.BASE_URL,"marker",{location:`${t.lat},${t.lng}`,coord_type:t.coord===I.bd09?void 0:t.coord,title:e,content:i,output:"html",src:Ct()})}geocoderApi(t){return pe(we.BASE_URL,"geocoder",{...typeof t=="string"?{address:t}:{location:`${t.lat},${t.lng}`,coord_type:t.coord===I.bd09?void 0:t.coord},output:"html",src:Ct()})}};let me=we;d(me,"BASE_URL","https://api.map.baidu.com/");let pr=class Ki{constructor(t,e,i){this.extend(Ki,google.maps.OverlayView),this.map_=t,this.MARKER_CLUSTER_IMAGE_PATH_="../images/m",this.MARKER_CLUSTER_IMAGE_EXTENSION_="png",this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var n=i||{};this.zIndex_=n.zIndex||google.maps.Marker.MAX_ZINDEX+1,this.gridSize_=n.gridSize||60,this.minClusterSize_=n.minimumClusterSize||2,this.maxZoom_=n.maxZoom||null,this.styles_=n.styles||[],this.imagePath_=n.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=n.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,n.zoomOnClick!=null&&(this.zoomOnClick_=n.zoomOnClick),this.averageCenter_=!1,n.averageCenter!=null&&(this.averageCenter_=n.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var s=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var l=s.map_.getZoom(),u=s.map_.minZoom||0,a=Math.min(s.map_.maxZoom||100,s.map_.mapTypes[s.map_.getMapTypeId()].maxZoom);l=Math.min(Math.max(l,u),a),s.prevZoom_!=l&&(s.prevZoom_=l,s.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){s.redraw()}),e&&(e.length||Object.keys(e).length)&&this.addMarkers(e,!1)}extend(t,e){return function(i){for(var n in i.prototype)this.prototype[n]=i.prototype[n];return this}.apply(t,[e])}onAdd(){this.setReady_(!0)}draw(){}setupStyles_(){if(!this.styles_.length)for(var t=0,e;e=this.sizes[t];t++)this.styles_.push({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:e,width:e})}fitMapToMarkers(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0,n;n=t[i];i++)e.extend(n.getPosition());this.map_.fitBounds(e)}setZIndex(t){this.zIndex_=t}getZIndex(){return this.zIndex_}setStyles(t){this.styles_=t}getStyles(){return this.styles_}isZoomOnClick(){return this.zoomOnClick_}isAverageCenter(){return this.averageCenter_}getMarkers(){return this.markers_}getTotalMarkers(){return this.markers_.length}setMaxZoom(t){this.maxZoom_=t}getMaxZoom(){return this.maxZoom_}calculator_(t,e){for(var i=0,n=t.length,s=n;s!==0;)s=parseInt(s/10,10),i++;return i=Math.min(i,e),{text:n,index:i}}setCalculator(t){this.calculator_=t}getCalculator(){return this.calculator_}addMarkers(t,e){if(t.length)for(let i=0,n;n=t[i];i++)this.pushMarkerTo_(n);else if(Object.keys(t).length)for(let i in t)this.pushMarkerTo_(t[i]);e||this.redraw()}pushMarkerTo_(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)}addMarker(t,e){this.pushMarkerTo_(t),e||this.redraw()}removeMarker_(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var i=0,n;n=this.markers_[i];i++)if(n==t){e=i;break}return e==-1?!1:(t.setMap(null),this.markers_.splice(e,1),!0)}removeMarker(t,e){var i=this.removeMarker_(t);return!e&&i?(this.resetViewport(),this.redraw(),!0):!1}removeMarkers(t,e){for(var i=t===this.getMarkers()?t.slice():t,n=!1,s=0,l;l=i[s];s++){var u=this.removeMarker_(l);n=n||u}if(!e&&n)return this.resetViewport(),this.redraw(),!0}setReady_(t){this.ready_||(this.ready_=t,this.createClusters_())}getTotalClusters(){return this.clusters_.length}getMap(){return this.map_}setMap(t){this.map_=t}getGridSize(){return this.gridSize_}setGridSize(t){this.gridSize_=t}getMinClusterSize(){return this.minClusterSize_}setMinClusterSize(t){this.minClusterSize_=t}getExtendedBounds(t){var e=this.getProjection(),i=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),n=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),s=e.fromLatLngToDivPixel(i);s.x+=this.gridSize_,s.y-=this.gridSize_;var l=e.fromLatLngToDivPixel(n);l.x-=this.gridSize_,l.y+=this.gridSize_;var u=e.fromDivPixelToLatLng(s),a=e.fromDivPixelToLatLng(l);return t.extend(u),t.extend(a),t}isMarkerInBounds_(t,e){return e.contains(t.getPosition())}clearMarkers(){this.resetViewport(!0),this.markers_=[]}resetViewport(t){for(let e=0,i;i=this.clusters_[e];e++)i.remove();for(let e=0,i;i=this.markers_[e];e++)i.isAdded=!1,t&&i.setMap(null);this.clusters_=[]}repaint(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),setTimeout(function(){for(var e=0,i;i=t[e];e++)i.remove()},0)}redraw(){this.createClusters_()}distanceBetweenPoints_(t,e){if(!t||!e)return 0;var i=6371,n=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,l=Math.sin(n/2)*Math.sin(n/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2),u=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),a=i*u;return a}addToClosestCluster_(t){for(var e=4e4,i=null,n=0,s;s=this.clusters_[n];n++){var l=s.getCenter();if(l){var u=this.distanceBetweenPoints_(l,t.getPosition());u<e&&(e=u,i=s)}}if(i&&i.isMarkerInClusterBounds(t))i.addMarker(t);else{var a=new gr(this);a.addMarker(t),this.clusters_.push(a)}}createClusters_(){if(this.ready_)for(var t=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),e=this.getExtendedBounds(t),i=0,n;n=this.markers_[i];i++)!n.isAdded&&this.isMarkerInBounds_(n,e)&&this.addToClosestCluster_(n)}},gr=class{constructor(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new Ot(this,t.getStyles(),t.getGridSize())}isMarkerAlreadyAdded(t){if(this.markers_.indexOf)return this.markers_.indexOf(t)!=-1;for(var e=0,i;i=this.markers_[e];e++)if(i==t)return!0;return!1}addMarker(t){if(this.isMarkerAlreadyAdded(t))return!1;if(!this.center_)this.center_=t.getPosition(),this.calculateBounds_();else if(this.averageCenter_){var e=this.markers_.length+1,i=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,n=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(i,n),this.calculateBounds_()}t.isAdded=!0,this.markers_.push(t);var s=this.markers_.length;if(s<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),s==this.minClusterSize_)for(var l=0;l<s;l++)this.markers_[l].setMap(null);return s>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0}getMarkerClusterer(){return this.markerClusterer_}getBounds(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),e=this.getMarkers(),i=0,n;n=e[i];i++)t.extend(n.getPosition());return t}remove(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_}getSize(){return this.markers_.length}getMarkers(){return this.markers_}getCenter(){return this.center_}calculateBounds_(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)}isMarkerInClusterBounds(t){return this.bounds_.contains(t.getPosition())}getMap(){return this.map_}updateIcon(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e){for(var i=0,n;n=this.markers_[i];i++)n.setMap(this.map_);return}if(this.markers_.length<this.minClusterSize_){this.clusterIcon_.hide();return}var s=this.markerClusterer_.getStyles().length,l=this.markerClusterer_.getCalculator()(this.markers_,s);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(l),this.clusterIcon_.show()}};class Ot{constructor(t,e,i){t.getMarkerClusterer().extend(Ot,google.maps.OverlayView),this.styles_=e,this.padding_=i||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}triggerClusterClick(){var t=this.cluster_.getBounds(),e=this.cluster_.getMarkerClusterer();google.maps.event.trigger(e.map_,"clusterclick",this.cluster_),e.isZoomOnClick()&&(this.map_.fitBounds(t),this.map_.setCenter(t.getCenter()))}onAdd(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}var e=this.getPanes();e.overlayMouseTarget.appendChild(this.div_);var i=this;google.maps.event.addDomListener(this.div_,"click",function(){i.triggerClusterClick()})}getPosFromLatLng_(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10),e}draw(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}}hide(){this.div_&&(this.div_.style.display="none"),this.visible_=!1}show(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0}remove(){this.setMap(null)}onRemove(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)}setSums(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()}useStyle(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition}setCenter(t){this.center_=t}createCss(t){var e=[];e.push("z-index:"+this.cluster_.markerClusterer_.getZIndex()+";"),e.push("background-image:url("+this.url_+");");var i=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+i+";"),typeof this.anchor_=="object"?(typeof this.anchor_[0]=="number"&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),typeof this.anchor_[1]=="number"&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var n=this.textColor_?this.textColor_:"black",s=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+n+"; position:absolute; font-size:"+s+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")}}var ii={exports:{}};(function(r,t){(function(e,i){r.exports=i()})(Nt,function(){var e,i=e=i||{version:"1.3.8"},n={};i.guid="$BAIDU$",n[i.guid]=n[i.guid]||{},i.dom=i.dom||{},i.dom.g=function(a){return typeof a=="string"||a instanceof String?document.getElementById(a):a&&a.nodeName&&(a.nodeType==1||a.nodeType==9)?a:null},i.g=i.G=i.dom.g,i.dom.getDocument=function(a){return a=i.dom.g(a),a.nodeType==9?a:a.ownerDocument||a.document},i.lang=i.lang||{},i.lang.isString=function(a){return Object.prototype.toString.call(a)=="[object String]"},i.isString=i.lang.isString,i.dom._g=function(a){return i.lang.isString(a)?document.getElementById(a):a},i._g=i.dom._g,i.browser=i.browser||{},/msie (\d+\.\d)/i.test(navigator.userAgent)&&(i.browser.ie=i.ie=document.documentMode||+RegExp.$1),i.dom.getComputedStyle=function(a,h){a=i.dom._g(a);var c=i.dom.getDocument(a),p;return c.defaultView&&c.defaultView.getComputedStyle&&(p=c.defaultView.getComputedStyle(a,null),p)?p[h]||p.getPropertyValue(h):""},i.dom._styleFixer=i.dom._styleFixer||{},i.dom._styleFilter=i.dom._styleFilter||[],i.dom._styleFilter.filter=function(a,h,c){for(var p=0,g=i.dom._styleFilter,v;v=g[p];p++)(v=v[c])&&(h=v(a,h));return h},i.string=i.string||{},i.string.toCamelCase=function(a){return a.indexOf("-")<0&&a.indexOf("_")<0?a:a.replace(/[-_][^-_]/g,function(h){return h.charAt(1).toUpperCase()})},i.dom.getStyle=function(a,h){var c=i.dom;a=c.g(a),h=i.string.toCamelCase(h);var p=a.style[h]||(a.currentStyle?a.currentStyle[h]:"")||c.getComputedStyle(a,h);if(!p){var g=c._styleFixer[h];g&&(p=g.get?g.get(a):i.dom.getStyle(a,g))}return(g=c._styleFilter)&&(p=g.filter(h,p,"get")),p},i.getStyle=i.dom.getStyle,/opera\/(\d+\.\d)/i.test(navigator.userAgent)&&(i.browser.opera=+RegExp.$1),i.browser.isWebkit=/webkit/i.test(navigator.userAgent),i.browser.isGecko=/gecko/i.test(navigator.userAgent)&&!/like gecko/i.test(navigator.userAgent),i.browser.isStrict=document.compatMode=="CSS1Compat",i.dom.getPosition=function(a){a=i.dom.g(a);var h=i.dom.getDocument(a),c=i.browser,p=i.dom.getStyle;c.isGecko>0&&h.getBoxObjectFor&&p(a,"position")=="absolute"&&(a.style.top===""||a.style.left);var g={left:0,top:0},v=c.ie&&!c.isStrict?h.body:h.documentElement,M,C;if(a==v)return g;if(a.getBoundingClientRect){C=a.getBoundingClientRect(),g.left=Math.floor(C.left)+Math.max(h.documentElement.scrollLeft,h.body.scrollLeft),g.top=Math.floor(C.top)+Math.max(h.documentElement.scrollTop,h.body.scrollTop),g.left-=h.documentElement.clientLeft,g.top-=h.documentElement.clientTop;var f=h.body,_=parseInt(p(f,"borderLeftWidth")),T=parseInt(p(f,"borderTopWidth"));c.ie&&!c.isStrict&&(g.left-=isNaN(_)?2:_,g.top-=isNaN(T)?2:T)}else{M=a;do{if(g.left+=M.offsetLeft,g.top+=M.offsetTop,c.isWebkit>0&&p(M,"position")=="fixed"){g.left+=h.body.scrollLeft,g.top+=h.body.scrollTop;break}M=M.offsetParent}while(M&&M!=a);for((c.opera>0||c.isWebkit>0&&p(a,"position")=="absolute")&&(g.top-=h.body.offsetTop),M=a.offsetParent;M&&M!=h.body;)g.left-=M.scrollLeft,(!c.opera||M.tagName!="TR")&&(g.top-=M.scrollTop),M=M.offsetParent}return g},i.event=i.event||{},i.event._listeners=i.event._listeners||[],i.event.on=function(a,h,c){h=h.replace(/^on/i,""),a=i.dom._g(a);var p=function(f){c.call(a,f)},g=i.event._listeners,v=i.event._eventFilter,M,C=h;return h=h.toLowerCase(),v&&v[h]&&(M=v[h](a,h,p),C=M.type,p=M.listener),a.addEventListener?a.addEventListener(C,p,!1):a.attachEvent&&a.attachEvent("on"+C,p),g[g.length]=[a,h,c,p,C],a},i.on=i.event.on,function(){var a=n[i.guid];i.lang.guid=function(){return"TANGRAM__"+(a._counter++).toString(36)},a._counter=a._counter||1}(),n[i.guid]._instances=n[i.guid]._instances||{},i.lang.isFunction=function(a){return Object.prototype.toString.call(a)=="[object Function]"},i.lang.Class=function(a){this.guid=a||i.lang.guid(),n[i.guid]._instances[this.guid]=this},n[i.guid]._instances=n[i.guid]._instances||{},i.lang.Class.prototype.dispose=function(){delete n[i.guid]._instances[this.guid];for(var a in this)i.lang.isFunction(this[a])||delete this[a];this.disposed=!0},i.lang.Class.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"},i.lang.Event=function(a,h){this.type=a,this.returnValue=!0,this.target=h||null,this.currentTarget=null},i.lang.Class.prototype.addEventListener=function(a,h,c){if(i.lang.isFunction(h)){!this.__listeners&&(this.__listeners={});var p=this.__listeners,g;if(typeof c=="string"&&c){if(/[^\w\-]/.test(c))throw"nonstandard key:"+c;h.hashCode=c,g=c}a.indexOf("on")!=0&&(a="on"+a),typeof p[a]!="object"&&(p[a]={}),g=g||i.lang.guid(),h.hashCode=g,p[a][g]=h}},i.lang.Class.prototype.removeEventListener=function(a,h){if(!(typeof h<"u"&&(i.lang.isFunction(h)&&!(h=h.hashCode)||!i.lang.isString(h)))){!this.__listeners&&(this.__listeners={}),a.indexOf("on")!=0&&(a="on"+a);var c=this.__listeners;if(c[a])if(typeof h<"u")c[a][h]&&delete c[a][h];else for(var p in c[a])delete c[a][p]}},i.lang.Class.prototype.dispatchEvent=function(a,h){i.lang.isString(a)&&(a=new i.lang.Event(a)),!this.__listeners&&(this.__listeners={}),h=h||{};for(var c in h)a[c]=h[c];var c,p=this.__listeners,g=a.type;if(a.target=a.target||this,a.currentTarget=this,g.indexOf("on")!=0&&(g="on"+g),i.lang.isFunction(this[g])&&this[g].apply(this,arguments),typeof p[g]=="object")for(c in p[g])p[g][c].apply(this,arguments);return a.returnValue},i.lang.inherits=function(a,h,c){var p,g,v=a.prototype,M=new Function;M.prototype=h.prototype,g=a.prototype=new M;for(p in v)g[p]=v[p];a.prototype.constructor=a,a.superClass=h.prototype,typeof c=="string"&&(g._className=c)},i.inherits=i.lang.inherits;var s="http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m",l="png",u=function(a,h,c){try{BMap}catch{throw Error("Baidu Map JS API is not ready yet!")}e.lang.inherits(u,BMap.Overlay,"TextIconOverlay"),this._position=a,this._text=h,this._options=c||{},this._styles=this._options.styles||[],this._zIndex=this._options.zIndex,!this._styles.length&&this._setupDefaultStyles()};return u.prototype._setupDefaultStyles=function(){for(var a=[53,56,66,78,90],h=0,c;c=a[h];h++)this._styles.push({url:s+h+"."+l,size:new BMap.Size(c,c)})},u.prototype.initialize=function(a){return this._map=a,this._domElement=document.createElement("div"),this._updateCss(),this._updateText(),this._updatePosition(),this._bind(),this._map.getPanes().markerMouseTarget.appendChild(this._domElement),this._domElement},u.prototype.draw=function(){this._map&&this._updatePosition()},u.prototype.getText=function(){return this._text},u.prototype.setText=function(a){a&&(!this._text||this._text.toString()!=a.toString())&&(this._text=a,this._updateText(),this._updateCss(),this._updatePosition())},u.prototype.getPosition=function(){return this._position},u.prototype.setPosition=function(a){a&&(!this._position||!this._position.equals(a))&&(this._position=a,this._updatePosition())},u.prototype.getStyleByText=function(a,h){var c=parseInt(a),p=parseInt(c/10);return p=Math.max(0,p),p=Math.min(p,h.length-1),h[p]},u.prototype._updateCss=function(){if(this._domElement){var a=this.getStyleByText(this._text,this._styles);this._domElement.style.cssText=this._buildCssText(a)}},u.prototype._updateText=function(){this._domElement&&(this._domElement.innerHTML=this._text)},u.prototype._updatePosition=function(){if(this._domElement&&this._position){var a=this._domElement.style,h=this._map.pointToOverlayPixel(this._position);h.x-=Math.ceil(parseInt(a.width)/2),h.y-=Math.ceil(parseInt(a.height)/2),a.left=h.x+"px",a.top=h.y+"px"}},u.prototype._buildCssText=function(a){var h=a.url,c=a.size,p=a.anchor,g=a.offset,v=a.textColor||"black",M=a.textSize||10,C=[];if(this._zIndex&&C.push("z-index:"+this._zIndex+";"),e.browser.ie<7)C.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'+h+'");');else{C.push("background-image:url("+h+");");var f="0 0";g instanceof BMap.Size&&(f=g.width+"px "+g.height+"px"),C.push("background-position:"+f+";")}return c instanceof BMap.Size&&(p instanceof BMap.Size?(p.height>0&&p.height<c.height&&C.push("height:"+(c.height-p.height)+"px; padding-top:"+p.height+"px;"),p.width>0&&p.width<c.width&&C.push("width:"+(c.width-p.width)+"px; padding-left:"+p.width+"px;")):(C.push("height:"+c.height+"px; line-height:"+c.height+"px;"),C.push("width:"+c.width+"px; text-align:center;"))),C.push("cursor:pointer; color:"+v+"; position:absolute; font-size:"+M+"px; font-family:Arial,sans-serif; font-weight:bold"),C.join("")},u.prototype._bind=function(){if(!this._domElement)return;var a=this,h=this._map,c=e.lang.Event;function p(g,v){var M=g.srcElement||g.target,C=g.clientX||g.pageX,f=g.clientY||g.pageY;if(g&&v&&C&&f&&M){var _=e.dom.getPosition(h.getContainer());v.pixel=new BMap.Pixel(C-_.left,f-_.top),v.point=h.pixelToPoint(v.pixel)}return v}e.event.on(this._domElement,"mouseover",function(g){a.dispatchEvent(p(g,new c("onmouseover")))}),e.event.on(this._domElement,"mouseout",function(g){a.dispatchEvent(p(g,new c("onmouseout")))}),e.event.on(this._domElement,"click",function(g){a.dispatchEvent(p(g,new c("onclick")))})},u})})(ii);var mr=ii.exports;const ri=gt(mr);var ni=function(r,t,e){t=fr(t);var i=r.pointToPixel(t.getNorthEast()),n=r.pointToPixel(t.getSouthWest());i.x+=e,i.y-=e,n.x-=e,n.y+=e;var s=r.pixelToPoint(i),l=r.pixelToPoint(n);return new BMap.Bounds(l,s)},fr=function(r){var t=We(r.getNorthEast().lng,-180,180),e=We(r.getSouthWest().lng,-180,180),i=We(r.getNorthEast().lat,-74,74),n=We(r.getSouthWest().lat,-74,74);return new BMap.Bounds(new BMap.Point(e,n),new BMap.Point(t,i))},We=function(r,t,e){return t&&(r=Math.max(r,t)),e&&(r=Math.min(r,e)),r},si=function(r){return Object.prototype.toString.call(r)==="[object Array]"},oi=function(r,t){var e=-1;if(si(t)){if(t.indexOf)e=t.indexOf(r);else for(var i=0,n;n=t[i];i++)if(n===r){e=i;break}}return e},O=function(r,t){try{BMap}catch{throw Error("Baidu Map JS API is not ready yet!")}if(r){this._map=r,this._markers=[],this._clusters=[];var e=t||{};this._zIndex=e.zIndex,this._gridSize=e.gridSize||60,this._maxZoom=e.maxZoom||18,this._minClusterSize=e.minClusterSize||2,this._isAverageCenter=!1,e.isAverageCenter!=null&&(this._isAverageCenter=e.isAverageCenter),this._styles=e.styles||[];var i=this;this._map.addEventListener("zoomend",function(){i._redraw()}),this._map.addEventListener("moveend",function(){i._redraw()});var n=e.markers;si(n)&&this.addMarkers(n)}};O.prototype.addMarkers=function(r){if(r.length){for(var t=0,e=r.length;t<e;t++)this._pushMarkerTo(r[t]);this._createClusters()}},O.prototype._pushMarkerTo=function(r){var t=oi(r,this._markers);t===-1&&(r.isInCluster=!1,this._markers.push(r))},O.prototype.addMarker=function(r){this._pushMarkerTo(r),this._createClusters()},O.prototype._createClusters=function(){var r=this._map.getBounds();if(r.getCenter()){for(var t=ni(this._map,r,this._gridSize),e=0,i;i=this._markers[e];e++)!i.isInCluster&&t.containsPoint(i.getPosition())&&this._addToClosestCluster(i);for(var n=this._markers.length,e=0;e<n;e++)this._clusters[e]&&this._clusters[e].render()}},O.prototype._addToClosestCluster=function(r){var t=4e6,e=null;r.getPosition();for(var i=0,n;n=this._clusters[i];i++){var s=n.getCenter();if(s){var l=this._map.getDistance(s,r.getPosition());l<t&&(t=l,e=n)}}if(e&&e.isMarkerInClusterBounds(r))e.addMarker(r);else{var n=new G(this);n.addMarker(r),this._clusters.push(n)}},O.prototype._clearLastClusters=function(){for(var r=0,t;t=this._clusters[r];r++)t.remove();this._clusters=[],this._removeMarkersFromCluster()},O.prototype._removeMarkersFromCluster=function(){for(var r=0,t;t=this._markers[r];r++)t.isInCluster=!1},O.prototype._removeMarkersFromMap=function(){for(var r=0,t;t=this._markers[r];r++){t.isInCluster=!1;var e=t.getLabel();this._map.removeOverlay(t),t.setLabel(e)}},O.prototype._removeMarker=function(r){var t=oi(r,this._markers);return t===-1?!1:(this._map.removeOverlay(r),this._markers.splice(t,1),!0)},O.prototype.removeMarker=function(r){var t=this._removeMarker(r);return t&&(this._clearLastClusters(),this._createClusters()),t},O.prototype.removeMarkers=function(r){for(var t=!1,e=0;e<r.length;e++){var i=this._removeMarker(r[e]);t=t||i}return t&&(this._clearLastClusters(),this._createClusters()),t},O.prototype.clearMarkers=function(){this._clearLastClusters(),this._removeMarkersFromMap(),this._markers=[]},O.prototype._redraw=function(){this._clearLastClusters(),this._createClusters()},O.prototype.getGridSize=function(){return this._gridSize},O.prototype.setGridSize=function(r){this._gridSize=r,this._redraw()},O.prototype.getMaxZoom=function(){return this._maxZoom},O.prototype.setMaxZoom=function(r){this._maxZoom=r,this._redraw()},O.prototype.getZIndex=function(){return this._zIndex},O.prototype.setZIndex=function(r){this._zIndex!=r&&(this.zIndex=r,this._redraw())},O.prototype.getStyles=function(){return this._styles},O.prototype.setStyles=function(r){this._styles=r,this._redraw()},O.prototype.getMinClusterSize=function(){return this._minClusterSize},O.prototype.setMinClusterSize=function(r){this._minClusterSize=r,this._redraw()},O.prototype.isAverageCenter=function(){return this._isAverageCenter},O.prototype.getMap=function(){return this._map},O.prototype.getMarkers=function(){return this._markers},O.prototype.getClustersCount=function(){for(var r=0,t=0,e;e=this._clusters[t];t++)e.isReal()&&r++;return r},O.prototype._textCalculator=function(r){return r.length.toString()},O.prototype._stylesIndexCalculator=null,O.prototype.setTextCalculator=function(r){this._textCalculator=r},O.prototype.setStylesIndexCalculator=function(r){this._stylesIndexCalculator=r};function G(r){var t=this;this._markerClusterer=r,this._map=r.getMap(),this._minClusterSize=r.getMinClusterSize(),this._isAverageCenter=r.isAverageCenter(),this._center=null,this._markers=[],this._gridBounds=null,this._isReal=!1,this._clusterMarker=new ri(this._center,this._markers.length,{styles:this._markerClusterer.getStyles(),zIndex:r._zIndex}),this._clusterMarker.getStyleByText=function(e,i){if(t._markerClusterer._stylesIndexCalculator){var n=t._markerClusterer._stylesIndexCalculator(t._markers,i.length);return i[n]}return ri.prototype.getStyleByText.call(this,e,i)},this._clusterMarker.addEventListener&&this._clusterMarker.addEventListener("click",function(e){t._map.setViewport(t.getBounds())})}G.prototype.addMarker=function(r){if(this.isMarkerInCluster(r))return!1;if(!this._center)this._center=r.getPosition(),this.updateGridBounds();else if(this._isAverageCenter){var t=this._markers.length+1,e=(this._center.lat*(t-1)+r.getPosition().lat)/t,i=(this._center.lng*(t-1)+r.getPosition().lng)/t;this._center=new BMap.Point(i,e),this.updateGridBounds()}return r.isInCluster=!0,this._markers.push(r),!0},G.prototype.render=function(){var r=this._markers.length;if(r<this._minClusterSize)for(var t=0;t<r;t++)this._map.addOverlay(this._markers[t]);else this._map.addOverlay(this._clusterMarker),this._isReal=!0,this.updateClusterMarker()},G.prototype.isMarkerInCluster=function(r){if(this._markers.indexOf)return this._markers.indexOf(r)!=-1;for(var t=0,e;e=this._markers[t];t++)if(e===r)return!0;return!1},G.prototype.isMarkerInClusterBounds=function(r){return this._gridBounds.containsPoint(r.getPosition())},G.prototype.isReal=function(r){return this._isReal},G.prototype.updateGridBounds=function(){var r=new BMap.Bounds(this._center,this._center);this._gridBounds=ni(this._map,r,this._markerClusterer.getGridSize())},G.prototype.updateClusterMarker=function(){if(this._map.getZoom()>this._markerClusterer.getMaxZoom()){this._clusterMarker&&this._map.removeOverlay(this._clusterMarker);for(var r=0,t;t=this._markers[r];r++)this._map.addOverlay(t);return}if(this._markers.length<this._minClusterSize){this._clusterMarker.hide();return}this._clusterMarker.setPosition(this._center),this._clusterMarker.setText(this._markerClusterer._textCalculator(this._markers))},G.prototype.remove=function(){for(var r=0,t;t=this._markers[r];r++){var e=this._markers[r].getLabel();this._markers[r].getMap()&&this._map.removeOverlay(this._markers[r]),this._markers[r].setLabel(e)}this._map.removeOverlay(this._clusterMarker),this._markers.length=0,delete this._markers},G.prototype.getBounds=function(){for(var r=new BMap.Bounds(this._center,this._center),t=0,e;e=this._markers[t];t++)r.extend(e.getPosition());return r},G.prototype.getCenter=function(){return this._center};var Ve;(r=>{function t(i){return{url:i.url,size:new BMap.Size(i.size.width,i.size.height),anchor:i.anchor&&new BMap.Size(i.anchor.x,i.anchor.y),offset:i.offset&&new BMap.Size(i.offset.x,i.offset.y),textColor:i.textColor,textSize:i.textSize}}r.toBaidu=t;function e(i){return{url:i.url,width:i.size.width,height:i.size.height,anchor:i.anchor&&[i.anchor.y,i.anchor.x],backgroundPosition:i.offset&&`${i.offset.x} ${i.offset.y}`,textColor:i.textColor,textSize:i.textSize}}r.toGoogle=e})(Ve||(Ve={}));class wt{constructor(t){this.map=t}clearMarkers(){this.inner.clearMarkers()}addMarker(t){this.inner.addMarker(t.innerOverlay)}removeMarker(t){return this.inner.removeMarker(t.innerOverlay)}addMarkers(t){this.inner.addMarkers(t.map(e=>e.innerOverlay))}removeMarkers(t){return this.inner.removeMarkers(t.map(e=>e.innerOverlay))}}class ai extends wt{constructor(e,i){var s;super(e);d(this,"inner");this.inner=new O(e.innerMap,{gridSize:i.gridSize,maxZoom:i.maxZoom,minClusterSize:i.minClusterSize,isAverageCenter:i.averageCenter,styles:(s=i.styles)==null?void 0:s.map(l=>Ve.toBaidu(l)),zIndex:i.zIndex});const n=i.stylesIndexCalculator;n&&this.inner.setStylesIndexCalculator((l,u)=>n(l.length,u)),i.markers&&this.addMarkers(i.markers)}recreate(){this.inner._redraw()}}class li extends wt{constructor(e,i){var s,l;super(e);d(this,"inner");this.inner=new pr(e.innerMap,(s=i.markers)==null?void 0:s.map(u=>u.innerOverlay),{gridSize:i.gridSize,maxZoom:i.maxZoom,minimumClusterSize:i.minClusterSize,averageCenter:i.averageCenter,styles:(l=i.styles)==null?void 0:l.map(u=>Ve.toGoogle(u)),zIndex:i.zIndex});const n=i.stylesIndexCalculator;n&&this.inner.setCalculator((u,a)=>({text:u.length,index:n(u.length,a)+1}))}recreate(){this.inner.repaint()}}class Et{constructor(){}}class hi extends Et{constructor(e,i){super();d(this,"inner");this.map=e,this.inner=new google.maps.places.PlacesService(e.innerMap)}search(e,i){return this.searchImpl(e,i instanceof b?i.toGoogle(this.map.coordType):i??this.map.innerMap.getCenter())}searchInBounds(e,i){return this.searchImpl(e,i.toGoogle(this.map.coordType))}searchNearBy(e,i,n){return this.searchImpl(e,{center:i.toGoogle(this.map.coordType),radius:n})}searchImpl(e,i){return new Promise((n,s)=>{this.inner.findPlaceFromQuery({query:e,fields:["formatted_address","geometry","name","place_id"],locationBias:i},(l,u)=>{switch(u){case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:case google.maps.places.PlacesServiceStatus.OK:{const a=(l??[]).map(h=>Qt(h,this.map));n(a);break}default:s(new Error(`status: ${u}`));break}})})}}class ci extends Et{constructor(e,i){super();d(this,"searchRequestMap",new Map);d(this,"currentSearch");this.map=e}get inner(){return this.currentSearch}search(e,i){return this.newSearch(i instanceof b?i.toBaidu(this.map.coordType):i??this.map.innerMap.getCenter(),n=>{n.search(e)})}searchInBounds(e,i){return this.newSearch(void 0,n=>{n.searchInBounds(e,i.toBaidu(this.map.coordType))})}searchNearBy(e,i,n){return this.newSearch(void 0,s=>{s.searchNearby(e,i.toBaidu(this.map.coordType),n)})}newSearch(e,i){return new Promise((n,s)=>{const l=new BMap.LocalSearch(e??this.map.innerMap,{onSearchComplete:u=>{Array.isArray(u)&&Se("当前只支持一次搜索一条数据");const a=l.getStatus();switch(a){case BMAP_STATUS_SUCCESS:{const h=[];for(let c=0;c<u.getCurrentNumPois();c++){const p=u.getPoi(c);h.push({id:p.uid,city:p.city,country:"",position:b.fromBaidu(p.point,this.map.coordType),province:p.province,title:p.title,address:p.address})}n(h);break}case BMAP_STATUS_UNKNOWN_LOCATION:n([]);break;default:s(new Error(`status: ${a}`));break}}});i(l)})}}class Pt{constructor(t,e){d(this,"onData");d(this,"onError");this.map=t,this.input=e}setSearchListener(t,e){return this.onData&&E("setSearchListener只能调用一次"),this.onData=t,this.onError=e,Q}}class di extends Pt{constructor(e,i){super(e,i.input);d(this,"searchBox");this.searchBox=new google.maps.places.SearchBox(i.input),this.searchBox.bindTo("bounds",e.innerMap)}setSearchListener(e,i){return super.setSearchListener(e,i),Vt(this.searchBox,"places_changed",()=>{const n=this.searchBox.getPlaces();e((n??[]).map(s=>Qt(s,this.map)))})}search(){this.input.value&&(google.maps.event.trigger(this.input,"focus",{}),google.maps.event.trigger(this.input,"keydown",{keyCode:13}))}}class ui extends Pt{constructor(e,i){super(e,i.input);d(this,"autocomplete");d(this,"placesService");this.autocomplete=e.createAutocomplete({input:i.input,bindToMap:!0}),this.placesService=e.createPlacesService({})}setSearchListener(e,i){return super.setSearchListener(e,i),this.autocomplete.addResultListener(n=>{this.searchImpl(n.country+n.province+n.city+n.district+n.street+n.streetNumber+n.title)})}search(){this.input.value&&this.searchImpl(this.input.value)}searchImpl(e){this.placesService.search(e).then(this.onData,this.onError)}}var pi=(r=>(r[r.WORLD=1]="WORLD",r[r.STATE=5]="STATE",r[r.CITY=10]="CITY",r[r.STREET=15]="STREET",r[r.BUILDING=20]="BUILDING",r))(pi||{});class je{constructor(t){d(this,"latestInfoWindow");d(this,"delegate",void 0);this.element=t,process.env.NODE_ENV!=="production"&&setTimeout(()=>{this.delegate||console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`)})}setEventTargetDelegate(t){this.delegate=t.setTarget(this)}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}getLatestInfoWindow(){return this.latestInfoWindow}setLatestInfoWindowInternal(t){this.latestInfoWindow=t}addOverlayMapType(t){this.addLayer(t)}removeOverlayMapType(t){this.removeLayer(t)}addControl(t){t.addTo(this)}removeControl(t){t.removeFrom(this)}getZoom(){return this.innerMap.getZoom()??0}setZoom(t){this.innerMap.setZoom(t)}}var yr=function(t){return vr(t)&&!_r(t)};function vr(r){return!!r&&typeof r=="object"}function _r(r){var t=Object.prototype.toString.call(r);return t==="[object RegExp]"||t==="[object Date]"||Tr(r)}var br=typeof Symbol=="function"&&Symbol.for,Mr=br?Symbol.for("react.element"):60103;function Tr(r){return r.$$typeof===Mr}function Cr(r){return Array.isArray(r)?[]:{}}function fe(r,t){return t.clone!==!1&&t.isMergeableObject(r)?ie(Cr(r),r,t):r}function Or(r,t,e){return r.concat(t).map(function(i){return fe(i,e)})}function wr(r,t){if(!t.customMerge)return ie;var e=t.customMerge(r);return typeof e=="function"?e:ie}function Er(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(t){return Object.propertyIsEnumerable.call(r,t)}):[]}function gi(r){return Object.keys(r).concat(Er(r))}function mi(r,t){try{return t in r}catch{return!1}}function Pr(r,t){return mi(r,t)&&!(Object.hasOwnProperty.call(r,t)&&Object.propertyIsEnumerable.call(r,t))}function Lr(r,t,e){var i={};return e.isMergeableObject(r)&&gi(r).forEach(function(n){i[n]=fe(r[n],e)}),gi(t).forEach(function(n){Pr(r,n)||(mi(r,n)&&e.isMergeableObject(t[n])?i[n]=wr(n,e)(r[n],t[n],e):i[n]=fe(t[n],e))}),i}function ie(r,t,e){e=e||{},e.arrayMerge=e.arrayMerge||Or,e.isMergeableObject=e.isMergeableObject||yr,e.cloneUnlessOtherwiseSpecified=fe;var i=Array.isArray(t),n=Array.isArray(r),s=i===n;return s?i?e.arrayMerge(r,t,e):Lr(r,t,e):fe(t,e)}ie.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,n){return ie(i,n,e)},{})};var Br=ie,Ir=Br;const fi=gt(Ir);/*!
1
+ (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.baidu-info-box-container{transform:translateY(-11px);font-size:13px;font-weight:300;width:100vw}.baidu-info-box-container__border{position:absolute;padding:12px;background-color:#fff;box-shadow:0 2px 7px 1px #0000004d;border-radius:8px;transform:translate(-50%,-100%)}.baidu-info-box-container__inner{overflow:auto}.baidu-info-box-container__close{position:absolute;right:-6px;top:-6px;width:14px;height:14px;margin:8px;opacity:.6;cursor:pointer;mask-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3C/svg%3E);background-color:#000}.baidu-info-box-container__close:hover{opacity:1}.baidu-info-box-container:after{position:absolute;background-color:#fff;content:"";width:15px;height:15px;left:0px;top:0px;box-shadow:-2px 2px 2px #b2b2b266;transform:translate(-50%,-50%) rotate(-45deg)}.element-overlay{position:absolute}.tg-map{height:100%;position:relative}.tg-map__map{width:100%;height:100%}.tg-map__map--hide-logo-google .gm-style a[target=_blank]:has(> div > img){display:none!important}.tg-map__map--hide-logo-google .gm-style>div:last-child>div:last-child>div{display:none}.tg-map__map--hide-logo-baidu div.anchorBL>a[target=_blank]>img{display:none}.tg-map__map--hide-logo-baidu div.BMap_cpyCtrl{display:none}.tg-map-widget{position:absolute}.tg-map>.tg-custom-control{display:none}.tg-map .tg-element-overlay{display:none}.tg-map__map .tg-element-overlay{display:block}.tg-map .tg-info-box{display:none}.tg-map__map .tg-info-box{display:block}.tg-map .tg-label{display:none}.tg-map__map .tg-label{display:block}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ (function(a,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],v):(a=typeof globalThis<"u"?globalThis:a||self,v(a.TgMap={},a.Vue))})(this,function(a,v){"use strict";var Wn=Object.defineProperty;var Hn=(a,v,D)=>v in a?Wn(a,v,{enumerable:!0,configurable:!0,writable:!0,value:D}):a[v]=D;var p=(a,v,D)=>(Hn(a,typeof v!="symbol"?v+"":v,D),D);function D(r,t,e){Object.keys(r).forEach(i=>{i.startsWith("update:")||e!=null&&e.includes(i)||t.addEventListener(i,r[i])})}let gr=1;function mr(){return gr++}function $e(r,t){return t.__id__||(t.__id__=mr()),`${r}::${t.__id__}`}var Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jt={exports:{}};(function(r){(function(t,e){r.exports?r.exports=e():t.coordtransform=e()})(Bt,function(){var t=52.35987755982988,e=3.141592653589793,i=6378245,n=.006693421622965943;function s(g,c,y,O){this.west=Math.min(g,y),this.north=Math.max(c,O),this.east=Math.max(g,y),this.south=Math.min(c,O)}s.prototype.contain=function(g,c){return this.west<=g&&this.east>=g&&this.north>=c&&this.south<=c};var l=[new s(79.4462,49.2204,96.33,42.8899),new s(109.6872,54.1415,135.0002,39.3742),new s(73.1246,42.8899,124.143255,29.5297),new s(82.9684,29.5297,97.0352,26.7186),new s(97.0253,29.5297,124.367395,20.414096),new s(107.975793,20.414096,111.744104,17.871542)],d=[new s(119.921265,25.398623,122.497559,21.785006),new s(101.8652,22.284,106.665,20.0988),new s(106.4525,21.5422,108.051,20.4878),new s(109.0323,55.8175,119.127,50.3257),new s(127.4568,55.8175,137.0227,49.5574),new s(131.2662,44.8922,137.0227,42.5692),new s(73.1246,35.398637,77.948114,29.5297)];function o(g,c){for(var y=0;y<l.length;y++)if(l[y].contain(g,c)){for(var O=0;O<d.length;O++)if(d[O].contain(g,c))return!1;return!0}return!1}function h(g,c){var y=g-.0065,O=c-.006,C=Math.sqrt(y*y+O*O)-2e-5*Math.sin(O*t),E=Math.atan2(O,y)-3e-6*Math.cos(y*t),P=C*Math.cos(E),B=C*Math.sin(E);return[P,B]}function u(g,c){var y=Math.sqrt(g*g+c*c)+2e-5*Math.sin(c*t),O=Math.atan2(c,g)+3e-6*Math.cos(g*t),C=y*Math.cos(O)+.0065,E=y*Math.sin(O)+.006;return[C,E]}function f(g,c){return o(g,c)?_(g,c):[g,c]}function m(g,c){if(!o(g,c))return[g,c];var y=_(g,c);return[g*2-y[0],c*2-y[1]]}function _(g,c){var y=T(g-105,c-35),O=b(g-105,c-35),C=c/180*e,E=Math.sin(C);E=1-n*E*E;var P=Math.sqrt(E);y=y*180/(i*(1-n)/(E*P)*e),O=O*180/(i/P*Math.cos(C)*e);var B=c+y,z=g+O;return[z,B]}function T(g,c){var y=-100+2*g+3*c+.2*c*c+.1*g*c+.2*Math.sqrt(Math.abs(g));return y+=(20*Math.sin(6*g*e)+20*Math.sin(2*g*e))*2/3,y+=(20*Math.sin(c*e)+40*Math.sin(c/3*e))*2/3,y+=(160*Math.sin(c/12*e)+320*Math.sin(c*e/30))*2/3,y}function b(g,c){var y=300+g+2*c+.1*g*g+.1*g*c+.1*Math.sqrt(Math.abs(g));return y+=(20*Math.sin(6*g*e)+20*Math.sin(2*g*e))*2/3,y+=(20*Math.sin(g*e)+40*Math.sin(g/3*e))*2/3,y+=(150*Math.sin(g/12*e)+300*Math.sin(g/30*e))*2/3,y}return{bd09togcj02:h,gcj02tobd09:u,wgs84togcj02:f,gcj02towgs84:m,bd09ToGcj02:h,gcj02ToBd09:u,wgs84ToGcj02:f,gcj02ToWgs84:m,bd09ToWgs84:function(g,c){if(!o(g,c))return[g,c];var y=h(g,c);return m(y[0],y[1])},wgs84ToBd09:function(g,c){if(!o(g,c))return[g,c];var y=f(g,c);return u(y[0],y[1])}}})})(Jt);var fr=Jt.exports;const ae=ze(fr);function re(r,t){if(!r)throw new Error(`AssertionError: ${t}`)}function Ge(r){throw new Error(`Unexpected object: ${r}`)}function yr(){}function Ne(r){return r}function vr(r,t){return r instanceof t}function _r(r,t){if(r instanceof t)return r}function Ze(r,t){return(r==null?void 0:r.$options.name)===t.name}function It(r,t){return Ze(r,t)?r:void 0}function We(r,t,e){let i=t;for(;i;){if(Ze(i,r))return i;if(e&&Ze(i,e))return;i=i.$parent}}function br(r){return r}function I(r){throw new Error(r)}function He(r){throw new Error(`Unsupported: ${r}`)}function Mr(r){throw new Error(`todo: ${r}`)}function Tr(r){return r}function le(...r){}function Cr(r){return r!=null}function Qt(r){return r[1]!=null}function ei(r){let t=null;return()=>t??(t=r().catch(e=>(t=null,Promise.reject(e))))}var R=(r=>(r.wgs84="wgs84",r.gcj02="gcj02",r.bd09="bd09",r))(R||{});const St="wgs84",N=class{constructor(t,e,i){this.lat=t,this.lng=e,this.coord=i}static _normalize(t,e){const i=e>90?90:e<-90?-90:e;return[t>180?(t+180)%360-180:t<-180?(t-180)%360+180:t,i]}static fromBaidu(t,e){return new N(t.lat,t.lng,e)}static fromGoogle(t,e){return new N(t.lat(),t.lng(),e)}static fromHere(t,e){return new N(t.lat,t.lng,e)}static fromLiteral(t){return new N(t.lat,t.lng,t.coord||St)}static fromLngLat(t,e,i=St){return new N(e,t,i)}static create(t,e,i=St){return new N(t,e,i)}to(t){const e=t;if(this.coord===e)return this;const[i,n]=this._convert(e);return new N(n,i,e)}toBaidu(t,e=!1){let i=this.lat,n=this.lng;return this.coord!==t&&([n,i]=this._convert(t)),e&&([n,i]=N._normalize(n,i)),new BMap.Point(n,i)}toGoogle(t){let e=this.lat,i=this.lng;return this.coord!==t&&([i,e]=this._convert(t)),new google.maps.LatLng(e,i)}toHere(t){let e=this.lat,i=this.lng;return this.coord!==t&&([i,e]=this._convert(t)),new H.geo.Point(e,i)}_convert(t){switch(this.coord){case"bd09":return t==="gcj02"?ae.bd09ToGcj02(this.lng,this.lat):ae.bd09ToWgs84(this.lng,this.lat);case"gcj02":return t==="wgs84"?ae.gcj02ToWgs84(this.lng,this.lat):ae.gcj02ToBd09(this.lng,this.lat);case"wgs84":return t==="bd09"?ae.wgs84ToBd09(this.lng,this.lat):ae.wgs84ToGcj02(this.lng,this.lat)}throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`)}normalize(){const[t,e]=N._normalize(this.lng,this.lat);return e===this.lat&&t===this.lng?this:new N(e,t,this.coord)}equals(t){return this===t?!0:this.lat===t.lat&&this.lng===t.lng&&this.coord===t.coord}toString(){return JSON.stringify(this)}};let w=N;p(w,"ZERO",N.create(0,0));const oe=class{constructor(t,e){p(this,"coord");this.sw=t,this.ne=e,re(t.coord===e.coord,"sw和ne的coord应该相同"),re(Number.isFinite(t.lat)&&Number.isFinite(t.lng)&&Number.isFinite(e.lat)&&Number.isFinite(e.lng),`sw(${t})和ne(${e})不能包含NaN或Infinite`),re(t.lat<=e.lat,`sw.lat(${t.lat})应该比ne.lat(${e.lat})小`),this.coord=t.coord}static isBetweenLng(t,e,i){return t<=e?t<=i&&i<=e:t<=i||i<=e}static fromArray(t){if(t.length===0)return;const e=new oe.Builder(t[0]);for(let i=1;i<t.length;i++)e.include(t[i]);return e.build()}static from(...t){return this.fromArray(t)??I("positions中没有点")}static fromGoogle(t,e){return new oe(w.fromGoogle(t.getSouthWest(),e),w.fromGoogle(t.getNorthEast(),e))}static fromBaidu(t,e){return new oe(w.fromBaidu(t.getSouthWest(),e),w.fromBaidu(t.getNorthEast(),e))}static create(t,e){return this.from(t,e)}isEmpty(){return this.sw.equals(this.ne)}contains(t){const{lat:e,lng:i}=t.to(this.coord);return this.sw.lat<=e&&e<=this.ne.lat&&oe.isBetweenLng(this.sw.lng,this.ne.lng,i)}getCenter(){if(this.sw.equals(this.ne))return this.sw;const t=(this.sw.lat+this.ne.lat)/2,e=(this.sw.lng+this.ne.lng+(this.sw.lng<this.ne.lng?0:360))/2;return w.create(t,e,this.coord)}toString(){return JSON.stringify(this)}equals(t){return this.sw.equals(t.sw)&&this.ne.equals(t.ne)}toRectArray(){const t=this.sw.coord;return[this.sw,w.fromLngLat(this.sw.lng,this.ne.lat,t),this.ne,w.fromLngLat(this.ne.lng,this.sw.lat,t)]}toGoogle(t){return new google.maps.LatLngBounds(this.sw.toGoogle(t),this.ne.toGoogle(t))}toBaidu(t){return new BMap.Bounds(this.sw.toBaidu(t),this.ne.toBaidu(t))}toBaiduArray(t){return[this.sw.toBaidu(t),this.ne.toBaidu(t)]}};let Z=oe;p(Z,"EMPTY",new oe(w.ZERO,w.ZERO)),(r=>{class t{constructor(i){p(this,"coord");p(this,"minLat");p(this,"minLng");p(this,"maxLat");p(this,"maxLng");this.coord=i.coord,this.minLat=this.maxLat=i.lat,this.minLng=this.maxLng=i.lng}build(){return new r(w.create(this.minLat,this.minLng,this.coord),w.create(this.maxLat,this.maxLng,this.coord))}include(i){const{lat:n,lng:s}=i.to(this.coord);return this.minLat=Math.min(this.minLat,n),this.maxLat=Math.max(this.maxLat,n),r.isBetweenLng(this.minLng,this.maxLng,s)||(this.delta(this.minLng,s)<this.delta(s,this.maxLng)?this.minLng=s:this.maxLng=s),this}delta(i,n){return(i-n+360)%360}}r.Builder=t})(Z||(Z={})),a.Location=void 0,(r=>{function t(i,n){if(i==null)return;if(typeof i=="string")return i;const s=i.to(n);return`${s.lat},${s.lng}`}r.toString=t;function e(i){return typeof i=="string"||i==null?void 0:i.coord}r.getCoordType=e})(a.Location||(a.Location={}));var kt;(r=>{function t(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}r.isScrollable=t})(kt||(kt={})),a.Arrays=void 0,(r=>{function t(d,o){return d.length===o.length&&d.every((h,u)=>h===o[u])}r.equals=t;function e(d,o){const h=d.indexOf(o);if(h!==-1)return d.splice(h,1)[0]}r.remove=e;function i(d,o){for(const h of d)if(h instanceof o)return h}r.findByType=i;function n(d,o){return d.includes(o)}r.includesTyped=n;function s(d,o,h){const u=o>=0?o:d.length+o;if(h===void 0)return d[u];d[u]=h}r.at=s;function l(d){return d.length>0}r.isNotEmpty=l})(a.Arrays||(a.Arrays={})),a.MVCArrays=void 0,(r=>{function t(n,s){const l=n.getLength();for(let d=0;d<l;d++)if(n.getAt(d)===s)return d;return-1}r.indexOf=t;function e(n,s){const l=t(n,s);if(l!==-1)return n.removeAt(l)}r.remove=e;function i(n,s){return[n.addListener("insert_at",s),n.addListener("remove_at",s),n.addListener("set_at",s)]}r.listenChanged=i})(a.MVCArrays||(a.MVCArrays={}));function ti(r,t,e){return r.addListener(t,e).remove}function Or(r,t,e){return r.addEventListener(t,e),()=>r.removeEventListener(t,e)}function wr(r,t,e,i){return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function ii(r,t,e){return r.addEventListener(t,e),()=>r.removeEventListener(t,e)}class ri{constructor(t,e){p(this,"eventMap",new Map);p(this,"target",void 0);this.inner=t,this.coordTypeSupplier=e,this.addEventListener=this.addEventListener.bind(this),this.removeEventListener=this.removeEventListener.bind(this)}setTarget(t){return this.target=t,this}}class Ve{constructor(t,e){p(this,"eventHub",new ni);this.delegate=t,this.options=e}notify(t){this.eventHub.notify(t)}hasListener(t){return this.eventHub.hasListener(t)}setTarget(t){return this.delegate.setTarget(t),this}addEventListener(t,e){if(a.Arrays.includesTyped(this.options.types,t)){this.eventHub.hasListener(t)||this.options.onListen(t),this.eventHub.addEventListener(t,e);return}this.delegate.addEventListener(t,e)}removeEventListener(t,e){if(a.Arrays.includesTyped(this.options.types,t)){this.eventHub.removeEventListener(t,e),this.eventHub.hasListener(t)||this.options.onCancel(t);return}this.delegate.removeEventListener(t,e)}}const Xt=class extends ri{addEventListener(t,e){const i=$e(t,e);if(this.eventMap.get(i)){console.warn("listener已经添加过了",i,e);return}const n=this.inner.addListener(Xt.EVENT_TYPE_MAP[t]||t,s=>{const l={type:t,target:this.target,originalEvent:s};s!=null&&s.latLng&&(l.position=w.fromGoogle(s.latLng,this.coordTypeSupplier.coordType)),e.call(this.target,l)});this.eventMap.set(i,n)}removeEventListener(t,e){const i=$e(t,e),n=this.eventMap.get(i);n?(n.remove(),this.eventMap.delete(i)):console.warn("移除失败, 不存在该listener",i,e)}};let ne=Xt;p(ne,"EVENT_TYPE_MAP",{"center-changed":"center_changed","zoom-changed":"zoom_changed","radius-changed":"radius_changed","bounds-changed":"bounds_changed","map-type-changed":"maptypeid_changed","map-mousedown":"mousedown","map-mousemove":"mousemove","map-mouseup":"mouseup","map-dblclick":"dblclick"});const wt=class extends ri{addEventListener(t,e){const i=$e(t,e);if(this.eventMap.get(i)){console.warn("listener已经添加过了",i,e);return}const n=s=>{const l={type:t,target:this.target,originalEvent:s};s.point&&(l.position=w.fromBaidu(s.point,this.coordTypeSupplier.coordType)),e.call(this.target,l)};this.inner.addEventListener(wt.EVENT_TYPE_MAP[t]||t,n),this.eventMap.set(i,n)}removeEventListener(t,e){const i=$e(t,e),n=this.eventMap.get(i);n?(this.inner.removeEventListener(wt.EVENT_TYPE_MAP[t]||t,n),this.eventMap.delete(i)):console.warn("移除失败, 不存在该listener",i,e)}};let he=wt;p(he,"EVENT_TYPE_MAP",{drag:"dragging",closeclick:"clickclose",contextmenu:"rightclick","zoom-changed":"zoomend","map-type-changed":"maptypechange"});class ni{constructor(){p(this,"typeMap",new Map)}addEventListener(t,e){let i=this.typeMap.get(t);i||(i=[],this.typeMap.set(t,i)),!i.includes(e)&&i.push(e)}removeEventListener(t,e){const i=this.typeMap.get(t);i&&a.Arrays.remove(i,e)}hasListener(t){const e=this.typeMap.get(t);return e!=null&&e.length>0}notify(t){const e=this.typeMap.get(t.type);e&&e.forEach(i=>i.call(t.target,t))}}class xt{constructor(t,e){p(this,"keyToValue",new Map);p(this,"valueToKey",new Map);re(t.length===e.length);for(let i=t.length-1;i>=0;i--)this.keyToValue.set(t[i],e[i]),this.valueToKey.set(e[i],t[i])}toKey(t){return this.valueToKey.get(t)??I()}toValue(t){return this.keyToValue.get(t)??I()}}class si{constructor(t,e=10){p(this,"map",new Map);this.values=t,this.maxSize4Debug=e}getValueMap(t){let e=this.map.get(t);if(!e){e=new Map;for(let i=this.values.length-1;i>=0;i--){const n=this.values[i];e.set(t.call(n),n)}this.map.set(t,e),process.env.NODE_ENV!=="production"&&this.map.size>this.maxSize4Debug&&console.warn(`this.map的大小(${this.map.size})超过了设置的最大大小(${this.maxSize4Debug}), 这可能是由于你每次都创建新的keySelector造成的, 请保证相同功能的keySelector只创建一个对象`)}return e}getOrNull(t,e){return this.getValueMap(t).get(e)}get(t,e){return this.getOrNull(t,e)??I(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`)}}class ce{constructor(t){p(this,"value");this.creator=t}get(){return this.value===void 0&&(this.value=this.creator()),this.value}}var k=(r=>(r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right",r.LEFT_TOP="left-top",r.LEFT_CENTER="left-center",r.LEFT_BOTTOM="left-bottom",r.RIGHT_TOP="right-top",r.RIGHT_CENTER="right-center",r.RIGHT_BOTTOM="right-bottom",r))(k||{});a.ControlPositionConverter=void 0,(r=>{let t,e;const i=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom","right-top","right-center","right-bottom"];function n(){return t||(t=new xt(i,[BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_TOP_RIGHT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_RIGHT,BMAP_ANCHOR_TOP_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_BOTTOM_LEFT,BMAP_ANCHOR_TOP_RIGHT,BMAP_ANCHOR_BOTTOM_RIGHT,BMAP_ANCHOR_BOTTOM_RIGHT])),t}r.getBaidu=n;function s(){return e||(e=new xt(i,[google.maps.ControlPosition.TOP_LEFT,google.maps.ControlPosition.TOP_CENTER,google.maps.ControlPosition.TOP_RIGHT,google.maps.ControlPosition.BOTTOM_LEFT,google.maps.ControlPosition.BOTTOM_CENTER,google.maps.ControlPosition.BOTTOM_RIGHT,google.maps.ControlPosition.LEFT_TOP,google.maps.ControlPosition.LEFT_CENTER,google.maps.ControlPosition.LEFT_BOTTOM,google.maps.ControlPosition.RIGHT_TOP,google.maps.ControlPosition.RIGHT_CENTER,google.maps.ControlPosition.RIGHT_BOTTOM])),e}r.getGoogle=s})(a.ControlPositionConverter||(a.ControlPositionConverter={}));class oi{constructor(t){p(this,"inner");this.position=t}}class je{}class ai extends je{constructor(t,e){super(),this.visible=t,this.position=e}isVisible(){return this.visible}setVisible(t){this.visible=t}getPosition(){return this.position}setPosition(t){this.position=t}addTo(t){}removeFrom(t){}}class Fe extends je{constructor(t,e){super(),this.inner=t,this.position=e}isVisible(){return this.inner.isVisible()}setVisible(t){t?this.inner.show():this.inner.hide()}getPosition(){return this.position??a.ControlPositionConverter.getBaidu().toKey(this.inner.getAnchor())}setPosition(t){this.position=t,this.inner.setAnchor(a.ControlPositionConverter.getBaidu().toValue(t))}addTo(t){t.innerMap.addControl(this.inner)}removeFrom(t){t.innerMap.removeControl(this.inner)}}class _e extends je{constructor(e,i){super();p(this,"visible",!1);p(this,"map");this._type=e,this.position=i}isVisible(){return this.visible}setVisible(e){this.visible=e,this.tryUpdateOptions()}getPosition(){return this.position}setPosition(e){this.position=e,this.tryUpdateOptions()}addTo(e){this.map||(this.map=e,this.setVisible(!0))}removeFrom(){this.map&&(this.setVisible(!1),this.map=void 0)}onCreateOptions(){return{position:a.ControlPositionConverter.getGoogle().toValue(this.position)}}tryUpdateOptions(){this.map&&this.map.innerMap.setOptions({[`${this._type}Control`]:this.visible,[`${this._type}ControlOptions`]:this.onCreateOptions()})}}var At=(r=>(r.normal="normal",r.satellite="satellite",r.hybrid="hybrid",r))(At||{});class W{constructor(t,e,i,n){this.id=t,this.baidu=e,this.google=i,this.googleCoordType=n}getId(){return this.id}getBaiduCoordType(){return R.bd09}asBaiduMapType(){return this.baidu()}getGoogleCoordType(){return this.googleCoordType}getGoogleMapTypeId(){return this.google()}asGoogleMapType(){He("google的内置地图没有对应的实例")}}class Er{constructor(t,e){p(this,"baiduLayerCached",new ce(()=>{const t=new BMap.TileLayer({});return t.getTilesUrl=(e,i)=>{const n=Math.pow(2,i-1),s=e.x+n,l=n-1-e.y;return this.options.getTileUrl({x:s,y:l},i)},t}));p(this,"baiduMapTypeCached",new ce(()=>{const t=new BMap.MapType(this.options.name,this.baiduLayerCached.get(),{maxZoom:this.options.maxZoom,minZoom:this.options.minZoom,tips:this.options.describe});return t.__baidu_map_type__=this,t}));p(this,"googleCached",new ce(()=>{const t=new google.maps.ImageMapType({getTileUrl:(e,i)=>this.options.getTileUrl(e,i),tileSize:new google.maps.Size(256,256),name:this.options.name,alt:this.options.describe,maxZoom:this.options.maxZoom,minZoom:this.options.minZoom});return t.__google_map_type__=this,t}));this.coordType=t,this.options=e}get id(){return this.options.id}getBaiduCoordType(){return this.coordType}asBaiduMapType(){return this.baiduMapTypeCached.get()}asBaiduLayer(){return this.baiduLayerCached.get()}getGoogleCoordType(){return this.coordType}asGoogleMapType(){return this.googleCached.get()}asGoogleLayer(){He("这个方法不会被调用")}}class li{constructor(){p(this,"baiduCache",new ce(()=>new BMap.TrafficLayer));p(this,"googleCache",new ce(()=>new google.maps.TrafficLayer))}asBaiduLayer(){return this.baiduCache.get()}asGoogleLayer(){return this.googleCache.get()}}a.MapType=void 0,(r=>{r.NORMAL=new W("normal",()=>BMAP_NORMAL_MAP,()=>google.maps.MapTypeId.ROADMAP,R.gcj02),r.SATELLITE=new W("satellite",()=>BMAP_SATELLITE_MAP,()=>google.maps.MapTypeId.SATELLITE,R.wgs84),r.HYBRID=new W("hybrid",()=>BMAP_HYBRID_MAP,()=>google.maps.MapTypeId.HYBRID,R.gcj02),r.TERRAIN=new W("terrain",()=>BMAP_PERSPECTIVE_MAP,()=>google.maps.MapTypeId.TERRAIN,R.wgs84),r.BUILD_IN_MAP_TYPES=new si([r.NORMAL,r.SATELLITE,r.HYBRID,r.TERRAIN])})(a.MapType||(a.MapType={}));var Rt=(r=>(r.DEFAULT="default",r.HORIZONTAL="horizontal",r.DROPDOWN="dropdown",r))(Rt||{});const hi=[a.MapType.NORMAL,a.MapType.SATELLITE,a.MapType.HYBRID];class Ue extends Fe{static create(t){const e=t.mapTypes??hi,i={default:BMAP_MAPTYPE_CONTROL_HORIZONTAL,horizontal:BMAP_MAPTYPE_CONTROL_HORIZONTAL,dropdown:BMAP_MAPTYPE_CONTROL_DROPDOWN},n=new BMap.MapTypeControl({type:t.type&&i[t.type],mapTypes:e.map(s=>s.asBaiduMapType())});return t.position&&n.setAnchor(a.ControlPositionConverter.getBaidu().toValue(t.position)),new Ue(n,t.position)}}const ve=class extends _e{constructor(t="default",e=k.TOP_LEFT,i=hi){super("mapType",e),this.type=t,this.mapTypes=i,ve.type2google||(ve.type2google={default:google.maps.MapTypeControlStyle.DEFAULT,horizontal:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,dropdown:google.maps.MapTypeControlStyle.DROPDOWN_MENU})}static create(t){return new ve(t.type,t.position,t.mapTypes)}onCreateOptions(){const t=super.onCreateOptions();return t.style=ve.type2google[this.type],t.mapTypeIds=this.mapTypes.map(e=>e instanceof W?e.getGoogleMapTypeId():e.id),t}addTo(t){super.addTo(t),this.mapTypes.forEach(e=>{e instanceof W||t.innerMap.mapTypes.set(e.id,e.asGoogleMapType())})}};let be=ve;p(be,"type2google");class qe extends Fe{static create(t){const e=new BMap.ScaleControl({anchor:t.position&&a.ControlPositionConverter.getBaidu().toValue(t.position)});return new qe(e,t.position)}}class Ye extends _e{static create(t){return new Ye(t.position)}constructor(t=k.BOTTOM_RIGHT){super("scale",t)}}class Ke extends ai{static create(t){return new Ke(!0,t.position??k.RIGHT_BOTTOM)}}class Xe extends _e{static create(t){return new Xe(t.position)}constructor(t=k.RIGHT_BOTTOM){super("streetView",t)}}class Je extends Fe{static create(t){const e=new BMap.NavigationControl({type:BMAP_NAVIGATION_CONTROL_ZOOM,anchor:t.position&&a.ControlPositionConverter.getBaidu().toValue(t.position)});return new Je(e,t.position)}}class Qe extends _e{static create(t){return new Qe(t.position)}constructor(t=k.RIGHT_BOTTOM){super("zoom",t)}}function Pr(r){let t,e,i;const n="The Google Maps JavaScript API",s="google",l="importLibrary",d="__ib__",o=document,h=window,u=h[s]||(h[s]={}),f=u.maps||(u.maps={}),m=new Set,_=new URLSearchParams,T=()=>t||(t=new Promise(async(b,g)=>{var c;await(e=o.createElement("script")),_.set("libraries",[...m]+"");for(i in r)_.set(i.replace(/[A-Z]/g,y=>"_"+y[0].toLowerCase()),r[i]);_.set("callback",s+".maps."+d),e.src=`https://maps.${s}apis.com/maps/api/js?`+_,f[d]=b,e.onerror=()=>t=g(Error(n+" could not load.")),e.nonce=((c=o.querySelector("script[nonce]"))==null?void 0:c.nonce)||"",o.head.append(e)}));f[l]?console.warn(n+" only loads once. Ignoring:",r):f[l]=(b,...g)=>m.add(b)&&T().then(()=>f[l](b,...g))}let Lr,Br;const ie={get LATLNG_ZERO(){return Lr??(Lr=new google.maps.LatLng({lat:0,lng:0}))},get BOUNDS_ZERO(){return Br??(Br=new google.maps.LatLngBounds(this.LATLNG_ZERO,this.LATLNG_ZERO))}};function ci(r,t={country:"",province:"",city:"",district:"",street:"",streetNumber:""}){for(const e of r)for(const i of e.types)switch(i){case"street_number":t.streetNumber=e.long_name;break;case"route":t.street=e.long_name;break;case"locality":t.city=e.long_name;break;case"sublocality":t.district=e.long_name;break;case"administrative_area_level_1":t.province=e.long_name;break;case"country":t.country=e.long_name;break}return t}function di(r,t){var i;const e=r.address_components&&ci(r.address_components);return{country:(e==null?void 0:e.country)??"",province:(e==null?void 0:e.province)??"",city:(e==null?void 0:e.city)??"",id:r.place_id??"",address:r.formatted_address??"",position:w.fromGoogle(((i=r.geometry)==null?void 0:i.location)??ie.LATLNG_ZERO,t.coordType),title:r.name??""}}class Dt{}class ui extends Dt{constructor(e,i){super();p(this,"inner");this.map=e,this.inner=new google.maps.places.Autocomplete(i.input,{fields:["address_components","name"]}),i.bindToMap&&this.inner.bindTo("bounds",e.innerMap)}setBounds(e){this.inner.setBounds(e.toGoogle(this.map.coordType))}addResultListener(e){return ti(this.inner,"place_changed",()=>{const i=this.inner.getPlace(),n={title:i.name??"",province:"",city:"",district:"",street:"",streetNumber:"",country:""};i.address_components&&ci(i.address_components,n),e(n)})}}class pi extends Dt{constructor(e,i){super();p(this,"inner");p(this,"input");p(this,"removeableArray",[]);if(this.map=e,this.input=i.input,this.inner=new BMap.Autocomplete({input:i.input,location:i.bindToMap?e.innerMap:void 0}),i.bindToMap){const n=()=>{this.inner.setLocation(this.map.innerMap)};this.removeableArray.push(ii(this.map,"center-changed",n)),this.removeableArray.push(ii(this.map,"zoom-changed",n))}}setBounds(e){this.inner.setLocation(e.getCenter().toBaidu(this.map.coordType))}addResultListener(e){let i=0;const n=Or(this.inner,"confirm",l=>{const d=l.item.value;i=Date.now(),e(Object.assign({title:d.business,country:""},d))}),s=wr(this.input,"keyup",l=>{l.key==="Enter"&&Date.now()-i>100&&e({title:this.input.value,country:"",city:"",district:"",province:"",street:"",streetNumber:""})});return()=>{s(),n()}}}var gi={exports:{}};(function(r,t){(function(e,i){r.exports=i()})(Bt,function(){const e=function(){var s={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},l=function(){var _=function(g){this._coordinator={},this._data=[],this._radi=[],this._min=0,this._max=1,this._xField=g.xField||g.defaultXField,this._yField=g.yField||g.defaultYField,this._valueField=g.valueField||g.defaultValueField,g.radius&&(this._cfgRadius=g.radius)},T=s.defaultRadius;return _.prototype={_organiseData:function(b,g){var c=b[this._xField],y=b[this._yField],O=this._radi,C=this._data,E=this._max,P=this._min,B=b[this._valueField]||1,z=b.radius||this._cfgRadius||T;return C[c]||(C[c]=[],O[c]=[]),C[c][y]?C[c][y]+=B:(C[c][y]=B,O[c][y]=z),C[c][y]>E?(g?this.setDataMax(C[c][y]):this._max=C[c][y],!1):{x:c,y,value:B,radius:z,min:P,max:E}},_unOrganizeData:function(){var b=[],g=this._data,c=this._radi;for(var y in g)for(var O in g[y])b.push({x:y,y:O,radius:c[y][O],value:g[y][O]});return{min:this._min,max:this._max,data:b}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var b=arguments[0],g=b.length;g--;)this.addData.call(this,b[g]);else{var c=this._organiseData(arguments[0],!0);c&&this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[c]})}return this},setData:function(b){var g=b.data,c=g.length;this._data=[],this._radi=[];for(var y=0;y<c;y++)this._organiseData(g[y],!1);return this._max=b.max,this._min=b.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(b){return this._max=b,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(b){return this._min=b,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(b){this._coordinator=b},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},_}(),d=function(){var _=function(c){var y=c.gradient||c.defaultGradient,O=document.createElement("canvas"),C=O.getContext("2d");O.width=256,O.height=1;var E=C.createLinearGradient(0,0,256,1);for(var P in y)E.addColorStop(P,y[P]);return C.fillStyle=E,C.fillRect(0,0,256,1),C.getImageData(0,0,256,1).data},T=function(c,y){var O=document.createElement("canvas"),C=O.getContext("2d"),E=c,P=c;if(O.width=O.height=c*2,y==1)C.beginPath(),C.arc(E,P,c,0,2*Math.PI,!1),C.fillStyle="rgba(0,0,0,1)",C.fill();else{var B=C.createRadialGradient(E,P,c*y,E,P,c);B.addColorStop(0,"rgba(0,0,0,1)"),B.addColorStop(1,"rgba(0,0,0,0)"),C.fillStyle=B,C.fillRect(0,0,2*c,2*c)}return O},b=function(P){for(var y=[],O=P.min,C=P.max,E=P.radi,P=P.data,B=Object.keys(P),z=B.length;z--;)for(var q=B[z],S=Object.keys(P[q]),ee=S.length;ee--;){var A=S[ee],Y=P[q][A],te=E[q][A];y.push({x:q,y:A,value:Y,radius:te})}return{min:O,max:C,data:y}};function g(c){var y=c.element,O=this.shadowCanvas=document.createElement("canvas"),C=this.canvas=c.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var E=getComputedStyle(c.element)||{};C.className="heatmap-canvas",this._width=C.width=O.width=+E.width.replace(/px/,""),this._height=C.height=O.height=+E.height.replace(/px/,""),this.shadowCtx=O.getContext("2d"),this.ctx=C.getContext("2d"),C.style.cssText=O.style.cssText="position:absolute;left:0;top:0;",y.style.position="relative",y.appendChild(C),this._palette=_(c),this._templates={},this._setStyles(c)}return g.prototype={renderPartial:function(c){this._drawAlpha(c),this._colorize()},renderAll:function(c){this._clear(),this._drawAlpha(b(c)),this._colorize()},_updateGradient:function(c){this._palette=_(c)},updateConfig:function(c,y){c.gradient!==y.gradient&&this._updateGradient(c),this._setStyles(c)},setDimensions:function(c,y){this._width=c,this._height=y,this.canvas.width=this.shadowCanvas.width=c,this.canvas.height=this.shadowCanvas.height=y},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(c){this._blur=c.blur==0?0:c.blur||c.defaultBlur,c.backgroundColor&&(this.canvas.style.backgroundColor=c.backgroundColor),this._opacity=(c.opacity||0)*255,this._maxOpacity=(c.maxOpacity||c.defaultMaxOpacity)*255,this._minOpacity=(c.minOpacity||c.defaultMinOpacity)*255,this._useGradientOpacity=!!c.useGradientOpacity},_drawAlpha:function(C){for(var y=this._min=C.min,O=this._max=C.max,C=C.data||[],E=C.length,P=1-this._blur;E--;){var B=C[E],z=B.x,q=B.y,S=B.radius,ee=Math.min(B.value,O),A=z-S,Y=q-S,te=this.shadowCtx,K;this._templates[S]?K=this._templates[S]:this._templates[S]=K=T(S,P),te.globalAlpha=(ee-y)/(O-y),te.drawImage(K,A,Y),A<this._renderBoundaries[0]&&(this._renderBoundaries[0]=A),Y<this._renderBoundaries[1]&&(this._renderBoundaries[1]=Y),A+2*S>this._renderBoundaries[2]&&(this._renderBoundaries[2]=A+2*S),Y+2*S>this._renderBoundaries[3]&&(this._renderBoundaries[3]=Y+2*S)}},_colorize:function(){var c=this._renderBoundaries[0],y=this._renderBoundaries[1],O=this._renderBoundaries[2]-c,C=this._renderBoundaries[3]-y,E=this._width,P=this._height,B=this._opacity,z=this._maxOpacity,q=this._minOpacity,S=this._useGradientOpacity;c<0&&(c=0),y<0&&(y=0),c+O>E&&(O=E-c),y+C>P&&(C=P-y);for(var ee=this.shadowCtx.getImageData(c,y,O,C),A=ee.data,Y=A.length,te=this._palette,K=3;K<Y;K+=4){var Lt=A[K],Re=Lt*4;if(Re){var De;B>0?De=B:Lt<z?Lt<q?De=q:De=Lt:De=z,A[K-3]=te[Re],A[K-2]=te[Re+1],A[K-1]=te[Re+2],A[K]=S?te[Re+3]:De}}this.ctx.putImageData(ee,c,y),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(c){var y,O=this.shadowCtx,C=O.getImageData(c.x,c.y,1,1),E=C.data[3],P=this._max,B=this._min;return y=Math.abs(P-B)*(E/255)>>0,y},getDataURL:function(){return this.canvas.toDataURL()}},g}(),o=function(){var _=!1;return s.defaultRenderer==="canvas2d"&&(_=d),_}(),h={merge:function(){for(var m={},_=arguments.length,T=0;T<_;T++){var b=arguments[T];for(var g in b)m[g]=b[g]}return m}},u=function(){var _=function(){function c(){this.cStore={}}return c.prototype={on:function(y,O,C){var E=this.cStore;E[y]||(E[y]=[]),E[y].push(function(P){return O.call(C,P)})},emit:function(y,O){var C=this.cStore;if(C[y])for(var E=C[y].length,P=0;P<E;P++){var B=C[y][P];B(O)}}},c}(),T=function(g){var c=g._renderer,y=g._coordinator,O=g._store;y.on("renderpartial",c.renderPartial,c),y.on("renderall",c.renderAll,c),y.on("extremachange",function(C){g._config.onExtremaChange&&g._config.onExtremaChange({min:C.min,max:C.max,gradient:g._config.gradient||g._config.defaultGradient})}),O.setCoordinator(y)};function b(){var g=this._config=h.merge(s,arguments[0]||{});if(this._coordinator=new _,g.plugin){var c=g.plugin;if(s.plugins[c]){var y=s.plugins[c];this._renderer=new y.renderer(g),this._store=new y.store(g)}else throw new Error("Plugin '"+c+"' not found. Maybe it was not registered.")}else this._renderer=new o(g),this._store=new l(g);T(this)}return b.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(g){const c=this._config;return this._config=h.merge(this._config,g),this._renderer.updateConfig(this._config,c),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(g){return this._store.getValueAt?this._store.getValueAt(g):this._renderer.getValueAt?this._renderer.getValueAt(g):null}},b}(),f={create:function(m){return new u(m)},register:function(m,_){s.plugins[m]=_}};return f}();var i=function(s){Reflect.getPrototypeOf(i.prototype)!==BMap.Overlay.prototype&&Reflect.setPrototypeOf(i.prototype,BMap.Overlay.prototype),this.conf=s,this.conf.visible=s.visible===void 0?!0:s.visible,this.heatmap=null,this.latlngs=[],this.bounds=null};i.prototype=Object.create(typeof BMap>"u"?null:BMap.Overlay.prototype),i.prototype.initialize=function(s){this._map=s;var l=document.createElement("div");if(l.style.position="absolute",l.style.top=0,l.style.left=0,l.style.border=0,l.style.width=this._map.getSize().width+"px",l.style.height=this._map.getSize().height+"px",this.conf.element=l,!n())return l;s.getPanes().mapPane.appendChild(l),this.conf.valueField=this.conf.valueField||"count",this.heatmap=e.create(this.conf);var d=this;return s.addEventListener("resize",function(o){var h=o.size;l.style.width=h.width+"px",l.style.height=h.height+"px",d.heatmap._renderer.setDimensions(h.width,h.height),d.draw()}),this._div=l,l},i.prototype.draw=function(){if(n()){var s=this._map.getBounds();if(!s.equals(this.bounds)){this.bounds=s;var l=this._map.pointToOverlayPixel(s.getNorthEast()),d=this._map.pointToOverlayPixel(s.getSouthWest()),o=l.y,h=d.x,u=d.y-l.y,f=l.x-d.x;if(this.conf.element.style.left=h+"px",this.conf.element.style.top=o+"px",this.conf.element.style.width=f+"px",this.conf.element.style.height=u+"px",this.latlngs.length>0){this.heatmap.removeData();var m=this.latlngs.length;const c={max:this.heatmap._store.getData().max,data:[]};for(;m--;){var _=this.latlngs[m].latlng;if(s.containsPoint(_)){var T=this._map.pointToOverlayPixel(_),h=this._map.pointToOverlayPixel(s.getSouthWest()).x,o=this._map.pointToOverlayPixel(s.getNorthEast()).y,b=new BMap.Pixel(T.x-h,T.y-o),g=this.pixelTransform(b);c.data.push({x:g.x,y:g.y,count:this.latlngs[m].c})}}this.conf.radiusChangeByZoom&&(this.heatmap._store._cfgRadius=this.conf.radiusChangeByZoom(this._map.getZoom())),this.heatmap.setData(c)}}}},i.prototype.pixelTransform=function(s){for(var l=this.heatmap.width,d=this.heatmap.height;s.x<0;)s.x+=l;for(;s.x>l;)s.x-=l;for(;s.y<0;)s.y+=d;for(;s.y>d;)s.y-=d;return s.x=s.x>>0,s.y=s.y>>0,s},i.prototype.setDataSet=function(s){if(this.data=s,!!n()){var l=this._map.getBounds(),d={max:s.max,data:[]},o=s.data,h=o.length;for(this.latlngs=[],this.heatmap.removeData(),this.conf.radiusChangeByZoom&&(this.heatmap._store._cfgRadius=this.conf.radiusChangeByZoom(this._map.getZoom()));h--;){var u=new BMap.Point(o[h].lng,o[h].lat);if(this.latlngs.push({latlng:u,c:o[h].count}),!!l.containsPoint(u)){var f=this._map.pointToOverlayPixel(u),m=this._map.pointToOverlayPixel(l.getSouthWest()).x,_=this._map.pointToOverlayPixel(l.getNorthEast()).y,T=new BMap.Pixel(f.x-m,f.y-_),b=this.pixelTransform(T);d.data.push({x:b.x,y:b.y,count:o[h].count})}}this.heatmap.setData(d)}},i.prototype.addDataPoint=function(s,l,d){if(n()){this.data&&this.data.data&&this.data.data.push({lng:s,lat:l,count:d});var o=new BMap.Point(s,l),h=this.pixelTransform(this._map.pointToOverlayPixel(o));this.heatmap.store.addDataPoint(h.x,h.y,d),this.latlngs.push({latlng:o,c:d})}},i.prototype.toggle=function(){n()&&(this.conf.visible===!0?this.conf.visible=!1:this.conf.visible=!0,this.conf.visible?this.conf.element.style.display="block":this.conf.element.style.display="none")},i.prototype.setOptions=function(s){if(n()){for(var l in s)l=="radius"&&(this.heatmap._store._cfgRadius=s[l]);this.heatmap.configure(s),this.data&&this.setDataSet(this.data)}};function n(){var s=document.createElement("canvas");return!!(s.getContext&&s.getContext("2d"))}return i})})(gi);var Ir=gi.exports;const Sr=ze(Ir),mi=10,et={toGoogle:(r,t)=>({opacity:r.opacity,radius:r.radius??mi,gradient:r.gradient&&Object.entries(r.gradient).sort(([e],[i])=>+e-+i).map(([e,i])=>i),maxIntensity:r.maxIntensity,data:tt.toGoogle(r.data,t)}),toBaidu:(r,t,e)=>({opacity:r.opacity,radius:r.radius??mi,gradient:r.gradient,data:tt.toBaidu(r.data,t,e)})},tt={toGoogle:(r,t)=>r.map(e=>"weight"in e?{weight:e.weight,location:e.position.toGoogle(t)}:e.toGoogle(t)),toBaidu:(r,t,e)=>{let i=1;return{data:r.map(s=>{let l,d;return"weight"in s?(l=s.position.to(t),d=s.weight):(l=s.to(t),d=1),i<d&&(i=d),{lng:l.lng,lat:l.lat,count:d}}),max:e??i}}};class $t{}class fi extends $t{constructor(e,i){super();p(this,"inner");this.map=e,this.inner=new google.maps.visualization.HeatmapLayer(et.toGoogle(i,this.map.coordType)),this.inner.setMap(e.innerMap)}setData(e){this.inner.setData(tt.toGoogle(e,this.map.coordType))}setOptions(e){this.inner.setOptions(et.toGoogle(e,this.map.coordType))}remove(){this.inner.setMap(null)}}class yi extends $t{constructor(e,i){super();p(this,"inner");this.map=e;const n=et.toBaidu(i,this.map.coordType,i.maxIntensity);this.inner=new Sr(n),e.innerMap.addOverlay(this.inner),this.inner.setDataSet(n.data)}get innerDataMax(){var e;return(e=this.inner.data)==null?void 0:e.max}set innerDataMax(e){var i;((i=this.inner).data??(i.data={})).max=e}setData(e){this.inner.setDataSet(tt.toBaidu(e,this.map.coordType,this.innerDataMax))}setOptions(e){const i=et.toBaidu(e,this.map.coordType,e.maxIntensity??this.innerDataMax);e.data!==this.inner.data?this.inner.setDataSet(i.data):e.maxIntensity&&(this.innerDataMax=e.maxIntensity),this.inner.setOptions(i)}remove(){this.map.innerMap.removeOverlay(this.inner)}}class zt{constructor(t){this.options=t}}function Me(r,t,e){const i=new URL(t,r),n=new URLSearchParams(Object.entries(e).filter(Qt));return i.search="?"+n.toString(),i}function Gt(){const r=window.location.hostname.split(".").filter(t=>!a.Strings.isInt(t));return r.length===3?r.join("."):[...r,"tg","map","urls"].slice(0,3).join(".")}const Et=class extends zt{directions(t,e,i){return Me(Et.BASE_URL,"dir/",{api:"1",origin:a.Location.toString(t,R.gcj02),destination:a.Location.toString(e,R.gcj02),travelmode:i})}search(t){return Me(Et.BASE_URL,"search/",{api:"1",query:a.Location.toString(t,R.gcj02)})}};let Te=Et;p(Te,"BASE_URL","https://www.google.com/maps/");const Ae=class extends zt{directions(t,e,i="driving"){const n=a.Location.getCoordType(e)??a.Location.getCoordType(t)??R.bd09,s=a.Location.toString(e,n);return Me(Ae.BASE_URL,"direction",{origin:a.Location.toString(t,n)??(typeof e!="string"?`name:请选择起点|latlng:${s}`:s),destination:s,coord_type:n===R.bd09?void 0:n,mode:i,output:"html",region:"中国",src:Gt()})}search(t){return typeof t=="string"?this.geocoderApi(t):this.latlngApi(t)}latlngApi(t){const e=t.to(R.bd09);return new URL(`https://map.baidu.com/?latlng=${e.lat},${e.lng}`)}markerApi(t,e,i){return Me(Ae.BASE_URL,"marker",{location:`${t.lat},${t.lng}`,coord_type:t.coord===R.bd09?void 0:t.coord,title:e,content:i,output:"html",src:Gt()})}geocoderApi(t){return Me(Ae.BASE_URL,"geocoder",{...typeof t=="string"?{address:t}:{location:`${t.lat},${t.lng}`,coord_type:t.coord===R.bd09?void 0:t.coord},output:"html",src:Gt()})}};let Ce=Ae;p(Ce,"BASE_URL","https://api.map.baidu.com/");let kr=class pr{constructor(t,e,i){this.extend(pr,google.maps.OverlayView),this.map_=t,this.MARKER_CLUSTER_IMAGE_PATH_="../images/m",this.MARKER_CLUSTER_IMAGE_EXTENSION_="png",this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var n=i||{};this.zIndex_=n.zIndex||google.maps.Marker.MAX_ZINDEX+1,this.gridSize_=n.gridSize||60,this.minClusterSize_=n.minimumClusterSize||2,this.maxZoom_=n.maxZoom||null,this.styles_=n.styles||[],this.imagePath_=n.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=n.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,n.zoomOnClick!=null&&(this.zoomOnClick_=n.zoomOnClick),this.averageCenter_=!1,n.averageCenter!=null&&(this.averageCenter_=n.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var s=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var l=s.map_.getZoom(),d=s.map_.minZoom||0,o=Math.min(s.map_.maxZoom||100,s.map_.mapTypes[s.map_.getMapTypeId()].maxZoom);l=Math.min(Math.max(l,d),o),s.prevZoom_!=l&&(s.prevZoom_=l,s.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){s.redraw()}),e&&(e.length||Object.keys(e).length)&&this.addMarkers(e,!1)}extend(t,e){return function(i){for(var n in i.prototype)this.prototype[n]=i.prototype[n];return this}.apply(t,[e])}onAdd(){this.setReady_(!0)}draw(){}setupStyles_(){if(!this.styles_.length)for(var t=0,e;e=this.sizes[t];t++)this.styles_.push({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:e,width:e})}fitMapToMarkers(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0,n;n=t[i];i++)e.extend(n.getPosition());this.map_.fitBounds(e)}setZIndex(t){this.zIndex_=t}getZIndex(){return this.zIndex_}setStyles(t){this.styles_=t}getStyles(){return this.styles_}isZoomOnClick(){return this.zoomOnClick_}isAverageCenter(){return this.averageCenter_}getMarkers(){return this.markers_}getTotalMarkers(){return this.markers_.length}setMaxZoom(t){this.maxZoom_=t}getMaxZoom(){return this.maxZoom_}calculator_(t,e){for(var i=0,n=t.length,s=n;s!==0;)s=parseInt(s/10,10),i++;return i=Math.min(i,e),{text:n,index:i}}setCalculator(t){this.calculator_=t}getCalculator(){return this.calculator_}addMarkers(t,e){if(t.length)for(let i=0,n;n=t[i];i++)this.pushMarkerTo_(n);else if(Object.keys(t).length)for(let i in t)this.pushMarkerTo_(t[i]);e||this.redraw()}pushMarkerTo_(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)}addMarker(t,e){this.pushMarkerTo_(t),e||this.redraw()}removeMarker_(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var i=0,n;n=this.markers_[i];i++)if(n==t){e=i;break}return e==-1?!1:(t.setMap(null),this.markers_.splice(e,1),!0)}removeMarker(t,e){var i=this.removeMarker_(t);return!e&&i?(this.resetViewport(),this.redraw(),!0):!1}removeMarkers(t,e){for(var i=t===this.getMarkers()?t.slice():t,n=!1,s=0,l;l=i[s];s++){var d=this.removeMarker_(l);n=n||d}if(!e&&n)return this.resetViewport(),this.redraw(),!0}setReady_(t){this.ready_||(this.ready_=t,this.createClusters_())}getTotalClusters(){return this.clusters_.length}getMap(){return this.map_}setMap(t){this.map_=t}getGridSize(){return this.gridSize_}setGridSize(t){this.gridSize_=t}getMinClusterSize(){return this.minClusterSize_}setMinClusterSize(t){this.minClusterSize_=t}getExtendedBounds(t){var e=this.getProjection(),i=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),n=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),s=e.fromLatLngToDivPixel(i);s.x+=this.gridSize_,s.y-=this.gridSize_;var l=e.fromLatLngToDivPixel(n);l.x-=this.gridSize_,l.y+=this.gridSize_;var d=e.fromDivPixelToLatLng(s),o=e.fromDivPixelToLatLng(l);return t.extend(d),t.extend(o),t}isMarkerInBounds_(t,e){return e.contains(t.getPosition())}clearMarkers(){this.resetViewport(!0),this.markers_=[]}resetViewport(t){for(let e=0,i;i=this.clusters_[e];e++)i.remove();for(let e=0,i;i=this.markers_[e];e++)i.isAdded=!1,t&&i.setMap(null);this.clusters_=[]}repaint(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),setTimeout(function(){for(var e=0,i;i=t[e];e++)i.remove()},0)}redraw(){this.createClusters_()}distanceBetweenPoints_(t,e){if(!t||!e)return 0;var i=6371,n=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,l=Math.sin(n/2)*Math.sin(n/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2),d=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),o=i*d;return o}addToClosestCluster_(t){for(var e=4e4,i=null,n=0,s;s=this.clusters_[n];n++){var l=s.getCenter();if(l){var d=this.distanceBetweenPoints_(l,t.getPosition());d<e&&(e=d,i=s)}}if(i&&i.isMarkerInClusterBounds(t))i.addMarker(t);else{var o=new xr(this);o.addMarker(t),this.clusters_.push(o)}}createClusters_(){if(this.ready_)for(var t=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),e=this.getExtendedBounds(t),i=0,n;n=this.markers_[i];i++)!n.isAdded&&this.isMarkerInBounds_(n,e)&&this.addToClosestCluster_(n)}},xr=class{constructor(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new Nt(this,t.getStyles(),t.getGridSize())}isMarkerAlreadyAdded(t){if(this.markers_.indexOf)return this.markers_.indexOf(t)!=-1;for(var e=0,i;i=this.markers_[e];e++)if(i==t)return!0;return!1}addMarker(t){if(this.isMarkerAlreadyAdded(t))return!1;if(!this.center_)this.center_=t.getPosition(),this.calculateBounds_();else if(this.averageCenter_){var e=this.markers_.length+1,i=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,n=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(i,n),this.calculateBounds_()}t.isAdded=!0,this.markers_.push(t);var s=this.markers_.length;if(s<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),s==this.minClusterSize_)for(var l=0;l<s;l++)this.markers_[l].setMap(null);return s>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0}getMarkerClusterer(){return this.markerClusterer_}getBounds(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),e=this.getMarkers(),i=0,n;n=e[i];i++)t.extend(n.getPosition());return t}remove(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_}getSize(){return this.markers_.length}getMarkers(){return this.markers_}getCenter(){return this.center_}calculateBounds_(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)}isMarkerInClusterBounds(t){return this.bounds_.contains(t.getPosition())}getMap(){return this.map_}updateIcon(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e){for(var i=0,n;n=this.markers_[i];i++)n.setMap(this.map_);return}if(this.markers_.length<this.minClusterSize_){this.clusterIcon_.hide();return}var s=this.markerClusterer_.getStyles().length,l=this.markerClusterer_.getCalculator()(this.markers_,s);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(l),this.clusterIcon_.show()}};class Nt{constructor(t,e,i){t.getMarkerClusterer().extend(Nt,google.maps.OverlayView),this.styles_=e,this.padding_=i||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}triggerClusterClick(){var t=this.cluster_.getBounds(),e=this.cluster_.getMarkerClusterer();google.maps.event.trigger(e.map_,"clusterclick",this.cluster_),e.isZoomOnClick()&&(this.map_.fitBounds(t),this.map_.setCenter(t.getCenter()))}onAdd(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}var e=this.getPanes();e.overlayMouseTarget.appendChild(this.div_);var i=this;google.maps.event.addDomListener(this.div_,"click",function(){i.triggerClusterClick()})}getPosFromLatLng_(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10),e}draw(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}}hide(){this.div_&&(this.div_.style.display="none"),this.visible_=!1}show(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0}remove(){this.setMap(null)}onRemove(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)}setSums(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()}useStyle(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition}setCenter(t){this.center_=t}createCss(t){var e=[];e.push("z-index:"+this.cluster_.markerClusterer_.getZIndex()+";"),e.push("background-image:url("+this.url_+");");var i=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+i+";"),typeof this.anchor_=="object"?(typeof this.anchor_[0]=="number"&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),typeof this.anchor_[1]=="number"&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var n=this.textColor_?this.textColor_:"black",s=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+n+"; position:absolute; font-size:"+s+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")}}var vi={exports:{}};(function(r,t){(function(e,i){r.exports=i()})(Bt,function(){var e,i=e=i||{version:"1.3.8"},n={};i.guid="$BAIDU$",n[i.guid]=n[i.guid]||{},i.dom=i.dom||{},i.dom.g=function(o){return typeof o=="string"||o instanceof String?document.getElementById(o):o&&o.nodeName&&(o.nodeType==1||o.nodeType==9)?o:null},i.g=i.G=i.dom.g,i.dom.getDocument=function(o){return o=i.dom.g(o),o.nodeType==9?o:o.ownerDocument||o.document},i.lang=i.lang||{},i.lang.isString=function(o){return Object.prototype.toString.call(o)=="[object String]"},i.isString=i.lang.isString,i.dom._g=function(o){return i.lang.isString(o)?document.getElementById(o):o},i._g=i.dom._g,i.browser=i.browser||{},/msie (\d+\.\d)/i.test(navigator.userAgent)&&(i.browser.ie=i.ie=document.documentMode||+RegExp.$1),i.dom.getComputedStyle=function(o,h){o=i.dom._g(o);var u=i.dom.getDocument(o),f;return u.defaultView&&u.defaultView.getComputedStyle&&(f=u.defaultView.getComputedStyle(o,null),f)?f[h]||f.getPropertyValue(h):""},i.dom._styleFixer=i.dom._styleFixer||{},i.dom._styleFilter=i.dom._styleFilter||[],i.dom._styleFilter.filter=function(o,h,u){for(var f=0,m=i.dom._styleFilter,_;_=m[f];f++)(_=_[u])&&(h=_(o,h));return h},i.string=i.string||{},i.string.toCamelCase=function(o){return o.indexOf("-")<0&&o.indexOf("_")<0?o:o.replace(/[-_][^-_]/g,function(h){return h.charAt(1).toUpperCase()})},i.dom.getStyle=function(o,h){var u=i.dom;o=u.g(o),h=i.string.toCamelCase(h);var f=o.style[h]||(o.currentStyle?o.currentStyle[h]:"")||u.getComputedStyle(o,h);if(!f){var m=u._styleFixer[h];m&&(f=m.get?m.get(o):i.dom.getStyle(o,m))}return(m=u._styleFilter)&&(f=m.filter(h,f,"get")),f},i.getStyle=i.dom.getStyle,/opera\/(\d+\.\d)/i.test(navigator.userAgent)&&(i.browser.opera=+RegExp.$1),i.browser.isWebkit=/webkit/i.test(navigator.userAgent),i.browser.isGecko=/gecko/i.test(navigator.userAgent)&&!/like gecko/i.test(navigator.userAgent),i.browser.isStrict=document.compatMode=="CSS1Compat",i.dom.getPosition=function(o){o=i.dom.g(o);var h=i.dom.getDocument(o),u=i.browser,f=i.dom.getStyle;u.isGecko>0&&h.getBoxObjectFor&&f(o,"position")=="absolute"&&(o.style.top===""||o.style.left);var m={left:0,top:0},_=u.ie&&!u.isStrict?h.body:h.documentElement,T,b;if(o==_)return m;if(o.getBoundingClientRect){b=o.getBoundingClientRect(),m.left=Math.floor(b.left)+Math.max(h.documentElement.scrollLeft,h.body.scrollLeft),m.top=Math.floor(b.top)+Math.max(h.documentElement.scrollTop,h.body.scrollTop),m.left-=h.documentElement.clientLeft,m.top-=h.documentElement.clientTop;var g=h.body,c=parseInt(f(g,"borderLeftWidth")),y=parseInt(f(g,"borderTopWidth"));u.ie&&!u.isStrict&&(m.left-=isNaN(c)?2:c,m.top-=isNaN(y)?2:y)}else{T=o;do{if(m.left+=T.offsetLeft,m.top+=T.offsetTop,u.isWebkit>0&&f(T,"position")=="fixed"){m.left+=h.body.scrollLeft,m.top+=h.body.scrollTop;break}T=T.offsetParent}while(T&&T!=o);for((u.opera>0||u.isWebkit>0&&f(o,"position")=="absolute")&&(m.top-=h.body.offsetTop),T=o.offsetParent;T&&T!=h.body;)m.left-=T.scrollLeft,(!u.opera||T.tagName!="TR")&&(m.top-=T.scrollTop),T=T.offsetParent}return m},i.event=i.event||{},i.event._listeners=i.event._listeners||[],i.event.on=function(o,h,u){h=h.replace(/^on/i,""),o=i.dom._g(o);var f=function(g){u.call(o,g)},m=i.event._listeners,_=i.event._eventFilter,T,b=h;return h=h.toLowerCase(),_&&_[h]&&(T=_[h](o,h,f),b=T.type,f=T.listener),o.addEventListener?o.addEventListener(b,f,!1):o.attachEvent&&o.attachEvent("on"+b,f),m[m.length]=[o,h,u,f,b],o},i.on=i.event.on,function(){var o=n[i.guid];i.lang.guid=function(){return"TANGRAM__"+(o._counter++).toString(36)},o._counter=o._counter||1}(),n[i.guid]._instances=n[i.guid]._instances||{},i.lang.isFunction=function(o){return Object.prototype.toString.call(o)=="[object Function]"},i.lang.Class=function(o){this.guid=o||i.lang.guid(),n[i.guid]._instances[this.guid]=this},n[i.guid]._instances=n[i.guid]._instances||{},i.lang.Class.prototype.dispose=function(){delete n[i.guid]._instances[this.guid];for(var o in this)i.lang.isFunction(this[o])||delete this[o];this.disposed=!0},i.lang.Class.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"},i.lang.Event=function(o,h){this.type=o,this.returnValue=!0,this.target=h||null,this.currentTarget=null},i.lang.Class.prototype.addEventListener=function(o,h,u){if(i.lang.isFunction(h)){!this.__listeners&&(this.__listeners={});var f=this.__listeners,m;if(typeof u=="string"&&u){if(/[^\w\-]/.test(u))throw"nonstandard key:"+u;h.hashCode=u,m=u}o.indexOf("on")!=0&&(o="on"+o),typeof f[o]!="object"&&(f[o]={}),m=m||i.lang.guid(),h.hashCode=m,f[o][m]=h}},i.lang.Class.prototype.removeEventListener=function(o,h){if(!(typeof h<"u"&&(i.lang.isFunction(h)&&!(h=h.hashCode)||!i.lang.isString(h)))){!this.__listeners&&(this.__listeners={}),o.indexOf("on")!=0&&(o="on"+o);var u=this.__listeners;if(u[o])if(typeof h<"u")u[o][h]&&delete u[o][h];else for(var f in u[o])delete u[o][f]}},i.lang.Class.prototype.dispatchEvent=function(o,h){i.lang.isString(o)&&(o=new i.lang.Event(o)),!this.__listeners&&(this.__listeners={}),h=h||{};for(var u in h)o[u]=h[u];var u,f=this.__listeners,m=o.type;if(o.target=o.target||this,o.currentTarget=this,m.indexOf("on")!=0&&(m="on"+m),i.lang.isFunction(this[m])&&this[m].apply(this,arguments),typeof f[m]=="object")for(u in f[m])f[m][u].apply(this,arguments);return o.returnValue},i.lang.inherits=function(o,h,u){var f,m,_=o.prototype,T=new Function;T.prototype=h.prototype,m=o.prototype=new T;for(f in _)m[f]=_[f];o.prototype.constructor=o,o.superClass=h.prototype,typeof u=="string"&&(m._className=u)},i.inherits=i.lang.inherits;var s="http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m",l="png",d=function(o,h,u){try{BMap}catch{throw Error("Baidu Map JS API is not ready yet!")}e.lang.inherits(d,BMap.Overlay,"TextIconOverlay"),this._position=o,this._text=h,this._options=u||{},this._styles=this._options.styles||[],this._zIndex=this._options.zIndex,!this._styles.length&&this._setupDefaultStyles()};return d.prototype._setupDefaultStyles=function(){for(var o=[53,56,66,78,90],h=0,u;u=o[h];h++)this._styles.push({url:s+h+"."+l,size:new BMap.Size(u,u)})},d.prototype.initialize=function(o){return this._map=o,this._domElement=document.createElement("div"),this._updateCss(),this._updateText(),this._updatePosition(),this._bind(),this._map.getPanes().markerMouseTarget.appendChild(this._domElement),this._domElement},d.prototype.draw=function(){this._map&&this._updatePosition()},d.prototype.getText=function(){return this._text},d.prototype.setText=function(o){o&&(!this._text||this._text.toString()!=o.toString())&&(this._text=o,this._updateText(),this._updateCss(),this._updatePosition())},d.prototype.getPosition=function(){return this._position},d.prototype.setPosition=function(o){o&&(!this._position||!this._position.equals(o))&&(this._position=o,this._updatePosition())},d.prototype.getStyleByText=function(o,h){var u=parseInt(o),f=parseInt(u/10);return f=Math.max(0,f),f=Math.min(f,h.length-1),h[f]},d.prototype._updateCss=function(){if(this._domElement){var o=this.getStyleByText(this._text,this._styles);this._domElement.style.cssText=this._buildCssText(o)}},d.prototype._updateText=function(){this._domElement&&(this._domElement.innerHTML=this._text)},d.prototype._updatePosition=function(){if(this._domElement&&this._position){var o=this._domElement.style,h=this._map.pointToOverlayPixel(this._position);h.x-=Math.ceil(parseInt(o.width)/2),h.y-=Math.ceil(parseInt(o.height)/2),o.left=h.x+"px",o.top=h.y+"px"}},d.prototype._buildCssText=function(o){var h=o.url,u=o.size,f=o.anchor,m=o.offset,_=o.textColor||"black",T=o.textSize||10,b=[];if(this._zIndex&&b.push("z-index:"+this._zIndex+";"),e.browser.ie<7)b.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'+h+'");');else{b.push("background-image:url("+h+");");var g="0 0";m instanceof BMap.Size&&(g=m.width+"px "+m.height+"px"),b.push("background-position:"+g+";")}return u instanceof BMap.Size&&(f instanceof BMap.Size?(f.height>0&&f.height<u.height&&b.push("height:"+(u.height-f.height)+"px; padding-top:"+f.height+"px;"),f.width>0&&f.width<u.width&&b.push("width:"+(u.width-f.width)+"px; padding-left:"+f.width+"px;")):(b.push("height:"+u.height+"px; line-height:"+u.height+"px;"),b.push("width:"+u.width+"px; text-align:center;"))),b.push("cursor:pointer; color:"+_+"; position:absolute; font-size:"+T+"px; font-family:Arial,sans-serif; font-weight:bold"),b.join("")},d.prototype._bind=function(){if(!this._domElement)return;var o=this,h=this._map,u=e.lang.Event;function f(m,_){var T=m.srcElement||m.target,b=m.clientX||m.pageX,g=m.clientY||m.pageY;if(m&&_&&b&&g&&T){var c=e.dom.getPosition(h.getContainer());_.pixel=new BMap.Pixel(b-c.left,g-c.top),_.point=h.pixelToPoint(_.pixel)}return _}e.event.on(this._domElement,"mouseover",function(m){o.dispatchEvent(f(m,new u("onmouseover")))}),e.event.on(this._domElement,"mouseout",function(m){o.dispatchEvent(f(m,new u("onmouseout")))}),e.event.on(this._domElement,"click",function(m){o.dispatchEvent(f(m,new u("onclick")))})},d})})(vi);var Ar=vi.exports;const _i=ze(Ar);var bi=function(r,t,e){t=Rr(t);var i=r.pointToPixel(t.getNorthEast()),n=r.pointToPixel(t.getSouthWest());i.x+=e,i.y-=e,n.x-=e,n.y+=e;var s=r.pixelToPoint(i),l=r.pixelToPoint(n);return new BMap.Bounds(l,s)},Rr=function(r){var t=it(r.getNorthEast().lng,-180,180),e=it(r.getSouthWest().lng,-180,180),i=it(r.getNorthEast().lat,-74,74),n=it(r.getSouthWest().lat,-74,74);return new BMap.Bounds(new BMap.Point(e,n),new BMap.Point(t,i))},it=function(r,t,e){return t&&(r=Math.max(r,t)),e&&(r=Math.min(r,e)),r},Mi=function(r){return Object.prototype.toString.call(r)==="[object Array]"},Ti=function(r,t){var e=-1;if(Mi(t)){if(t.indexOf)e=t.indexOf(r);else for(var i=0,n;n=t[i];i++)if(n===r){e=i;break}}return e},L=function(r,t){try{BMap}catch{throw Error("Baidu Map JS API is not ready yet!")}if(r){this._map=r,this._markers=[],this._clusters=[];var e=t||{};this._zIndex=e.zIndex,this._gridSize=e.gridSize||60,this._maxZoom=e.maxZoom||18,this._minClusterSize=e.minClusterSize||2,this._isAverageCenter=!1,e.isAverageCenter!=null&&(this._isAverageCenter=e.isAverageCenter),this._styles=e.styles||[];var i=this;this._map.addEventListener("zoomend",function(){i._redraw()}),this._map.addEventListener("moveend",function(){i._redraw()});var n=e.markers;Mi(n)&&this.addMarkers(n)}};L.prototype.addMarkers=function(r){if(r.length){for(var t=0,e=r.length;t<e;t++)this._pushMarkerTo(r[t]);this._createClusters()}},L.prototype._pushMarkerTo=function(r){var t=Ti(r,this._markers);t===-1&&(r.isInCluster=!1,this._markers.push(r))},L.prototype.addMarker=function(r){this._pushMarkerTo(r),this._createClusters()},L.prototype._createClusters=function(){var r=this._map.getBounds();if(r.getCenter()){for(var t=bi(this._map,r,this._gridSize),e=0,i;i=this._markers[e];e++)!i.isInCluster&&t.containsPoint(i.getPosition())&&this._addToClosestCluster(i);for(var n=this._markers.length,e=0;e<n;e++)this._clusters[e]&&this._clusters[e].render()}},L.prototype._addToClosestCluster=function(r){var t=4e6,e=null;r.getPosition();for(var i=0,n;n=this._clusters[i];i++){var s=n.getCenter();if(s){var l=this._map.getDistance(s,r.getPosition());l<t&&(t=l,e=n)}}if(e&&e.isMarkerInClusterBounds(r))e.addMarker(r);else{var n=new F(this);n.addMarker(r),this._clusters.push(n)}},L.prototype._clearLastClusters=function(){for(var r=0,t;t=this._clusters[r];r++)t.remove();this._clusters=[],this._removeMarkersFromCluster()},L.prototype._removeMarkersFromCluster=function(){for(var r=0,t;t=this._markers[r];r++)t.isInCluster=!1},L.prototype._removeMarkersFromMap=function(){for(var r=0,t;t=this._markers[r];r++){t.isInCluster=!1;var e=t.getLabel();this._map.removeOverlay(t),t.setLabel(e)}},L.prototype._removeMarker=function(r){var t=Ti(r,this._markers);return t===-1?!1:(this._map.removeOverlay(r),this._markers.splice(t,1),!0)},L.prototype.removeMarker=function(r){var t=this._removeMarker(r);return t&&(this._clearLastClusters(),this._createClusters()),t},L.prototype.removeMarkers=function(r){for(var t=!1,e=0;e<r.length;e++){var i=this._removeMarker(r[e]);t=t||i}return t&&(this._clearLastClusters(),this._createClusters()),t},L.prototype.clearMarkers=function(){this._clearLastClusters(),this._removeMarkersFromMap(),this._markers=[]},L.prototype._redraw=function(){this._clearLastClusters(),this._createClusters()},L.prototype.getGridSize=function(){return this._gridSize},L.prototype.setGridSize=function(r){this._gridSize=r,this._redraw()},L.prototype.getMaxZoom=function(){return this._maxZoom},L.prototype.setMaxZoom=function(r){this._maxZoom=r,this._redraw()},L.prototype.getZIndex=function(){return this._zIndex},L.prototype.setZIndex=function(r){this._zIndex!=r&&(this.zIndex=r,this._redraw())},L.prototype.getStyles=function(){return this._styles},L.prototype.setStyles=function(r){this._styles=r,this._redraw()},L.prototype.getMinClusterSize=function(){return this._minClusterSize},L.prototype.setMinClusterSize=function(r){this._minClusterSize=r,this._redraw()},L.prototype.isAverageCenter=function(){return this._isAverageCenter},L.prototype.getMap=function(){return this._map},L.prototype.getMarkers=function(){return this._markers},L.prototype.getClustersCount=function(){for(var r=0,t=0,e;e=this._clusters[t];t++)e.isReal()&&r++;return r},L.prototype._textCalculator=function(r){return r.length.toString()},L.prototype._stylesIndexCalculator=null,L.prototype.setTextCalculator=function(r){this._textCalculator=r},L.prototype.setStylesIndexCalculator=function(r){this._stylesIndexCalculator=r};function F(r){var t=this;this._markerClusterer=r,this._map=r.getMap(),this._minClusterSize=r.getMinClusterSize(),this._isAverageCenter=r.isAverageCenter(),this._center=null,this._markers=[],this._gridBounds=null,this._isReal=!1,this._clusterMarker=new _i(this._center,this._markers.length,{styles:this._markerClusterer.getStyles(),zIndex:r._zIndex}),this._clusterMarker.getStyleByText=function(e,i){if(t._markerClusterer._stylesIndexCalculator){var n=t._markerClusterer._stylesIndexCalculator(t._markers,i.length);return i[n]}return _i.prototype.getStyleByText.call(this,e,i)},this._clusterMarker.addEventListener&&this._clusterMarker.addEventListener("click",function(e){t._map.setViewport(t.getBounds())})}F.prototype.addMarker=function(r){if(this.isMarkerInCluster(r))return!1;if(!this._center)this._center=r.getPosition(),this.updateGridBounds();else if(this._isAverageCenter){var t=this._markers.length+1,e=(this._center.lat*(t-1)+r.getPosition().lat)/t,i=(this._center.lng*(t-1)+r.getPosition().lng)/t;this._center=new BMap.Point(i,e),this.updateGridBounds()}return r.isInCluster=!0,this._markers.push(r),!0},F.prototype.render=function(){var r=this._markers.length;if(r<this._minClusterSize)for(var t=0;t<r;t++)this._map.addOverlay(this._markers[t]);else this._map.addOverlay(this._clusterMarker),this._isReal=!0,this.updateClusterMarker()},F.prototype.isMarkerInCluster=function(r){if(this._markers.indexOf)return this._markers.indexOf(r)!=-1;for(var t=0,e;e=this._markers[t];t++)if(e===r)return!0;return!1},F.prototype.isMarkerInClusterBounds=function(r){return this._gridBounds.containsPoint(r.getPosition())},F.prototype.isReal=function(r){return this._isReal},F.prototype.updateGridBounds=function(){var r=new BMap.Bounds(this._center,this._center);this._gridBounds=bi(this._map,r,this._markerClusterer.getGridSize())},F.prototype.updateClusterMarker=function(){if(this._map.getZoom()>this._markerClusterer.getMaxZoom()){this._clusterMarker&&this._map.removeOverlay(this._clusterMarker);for(var r=0,t;t=this._markers[r];r++)this._map.addOverlay(t);return}if(this._markers.length<this._minClusterSize){this._clusterMarker.hide();return}this._clusterMarker.setPosition(this._center),this._clusterMarker.setText(this._markerClusterer._textCalculator(this._markers))},F.prototype.remove=function(){for(var r=0,t;t=this._markers[r];r++){var e=this._markers[r].getLabel();this._markers[r].getMap()&&this._map.removeOverlay(this._markers[r]),this._markers[r].setLabel(e)}this._map.removeOverlay(this._clusterMarker),this._markers.length=0,delete this._markers},F.prototype.getBounds=function(){for(var r=new BMap.Bounds(this._center,this._center),t=0,e;e=this._markers[t];t++)r.extend(e.getPosition());return r},F.prototype.getCenter=function(){return this._center};var rt;(r=>{function t(i){return{url:i.url,size:new BMap.Size(i.size.width,i.size.height),anchor:i.anchor&&new BMap.Size(i.anchor.x,i.anchor.y),offset:i.offset&&new BMap.Size(i.offset.x,i.offset.y),textColor:i.textColor,textSize:i.textSize}}r.toBaidu=t;function e(i){return{url:i.url,width:i.size.width,height:i.size.height,anchor:i.anchor&&[i.anchor.y,i.anchor.x],backgroundPosition:i.offset&&`${i.offset.x} ${i.offset.y}`,textColor:i.textColor,textSize:i.textSize}}r.toGoogle=e})(rt||(rt={}));class Zt{constructor(t){this.map=t}clearMarkers(){this.inner.clearMarkers()}addMarker(t){this.inner.addMarker(t.innerOverlay)}removeMarker(t){return this.inner.removeMarker(t.innerOverlay)}addMarkers(t){this.inner.addMarkers(t.map(e=>e.innerOverlay))}removeMarkers(t){return this.inner.removeMarkers(t.map(e=>e.innerOverlay))}}class Ci extends Zt{constructor(e,i){var s;super(e);p(this,"inner");this.inner=new L(e.innerMap,{gridSize:i.gridSize,maxZoom:i.maxZoom,minClusterSize:i.minClusterSize,isAverageCenter:i.averageCenter,styles:(s=i.styles)==null?void 0:s.map(l=>rt.toBaidu(l)),zIndex:i.zIndex});const n=i.stylesIndexCalculator;n&&this.inner.setStylesIndexCalculator((l,d)=>n(l.length,d)),i.markers&&this.addMarkers(i.markers)}recreate(){this.inner._redraw()}}class Oi extends Zt{constructor(e,i){var s,l;super(e);p(this,"inner");this.inner=new kr(e.innerMap,(s=i.markers)==null?void 0:s.map(d=>d.innerOverlay),{gridSize:i.gridSize,maxZoom:i.maxZoom,minimumClusterSize:i.minClusterSize,averageCenter:i.averageCenter,styles:(l=i.styles)==null?void 0:l.map(d=>rt.toGoogle(d)),zIndex:i.zIndex});const n=i.stylesIndexCalculator;n&&this.inner.setCalculator((d,o)=>({text:d.length,index:n(d.length,o)+1}))}recreate(){this.inner.repaint()}}class Wt{constructor(){}}class wi extends Wt{constructor(e,i){super();p(this,"inner");this.map=e,this.inner=new google.maps.places.PlacesService(e.innerMap)}search(e,i){return this.searchImpl(e,i instanceof w?i.toGoogle(this.map.coordType):i??this.map.innerMap.getCenter())}searchInBounds(e,i){return this.searchImpl(e,i.toGoogle(this.map.coordType))}searchNearBy(e,i,n){return this.searchImpl(e,{center:i.toGoogle(this.map.coordType),radius:n})}searchImpl(e,i){return new Promise((n,s)=>{this.inner.findPlaceFromQuery({query:e,fields:["formatted_address","geometry","name","place_id"],locationBias:i},(l,d)=>{switch(d){case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:case google.maps.places.PlacesServiceStatus.OK:{const o=(l??[]).map(h=>di(h,this.map));n(o);break}default:s(new Error(`status: ${d}`));break}})})}}class Ei extends Wt{constructor(e,i){super();p(this,"searchRequestMap",new Map);p(this,"currentSearch");this.map=e}get inner(){return this.currentSearch}search(e,i){return this.newSearch(i instanceof w?i.toBaidu(this.map.coordType):i??this.map.innerMap.getCenter(),n=>{n.search(e)})}searchInBounds(e,i){return this.newSearch(void 0,n=>{n.searchInBounds(e,i.toBaidu(this.map.coordType))})}searchNearBy(e,i,n){return this.newSearch(void 0,s=>{s.searchNearby(e,i.toBaidu(this.map.coordType),n)})}newSearch(e,i){return new Promise((n,s)=>{const l=new BMap.LocalSearch(e??this.map.innerMap,{onSearchComplete:d=>{Array.isArray(d)&&He("当前只支持一次搜索一条数据");const o=l.getStatus();switch(o){case BMAP_STATUS_SUCCESS:{const h=[];for(let u=0;u<d.getCurrentNumPois();u++){const f=d.getPoi(u);h.push({id:f.uid,city:f.city,country:"",position:w.fromBaidu(f.point,this.map.coordType),province:f.province,title:f.title,address:f.address})}n(h);break}case BMAP_STATUS_UNKNOWN_LOCATION:n([]);break;default:s(new Error(`status: ${o}`));break}}});i(l)})}}class Ht{constructor(t,e){p(this,"onData");p(this,"onError");this.map=t,this.input=e}setSearchListener(t,e){return this.onData&&I("setSearchListener只能调用一次"),this.onData=t,this.onError=e,le}}class Pi extends Ht{constructor(e,i){super(e,i.input);p(this,"searchBox");this.searchBox=new google.maps.places.SearchBox(i.input),this.searchBox.bindTo("bounds",e.innerMap)}setSearchListener(e,i){return super.setSearchListener(e,i),ti(this.searchBox,"places_changed",()=>{const n=this.searchBox.getPlaces();e((n??[]).map(s=>di(s,this.map)))})}search(){this.input.value&&(google.maps.event.trigger(this.input,"focus",{}),google.maps.event.trigger(this.input,"keydown",{keyCode:13}))}}class Li extends Ht{constructor(e,i){super(e,i.input);p(this,"autocomplete");p(this,"placesService");this.autocomplete=e.createAutocomplete({input:i.input,bindToMap:!0}),this.placesService=e.createPlacesService({})}setSearchListener(e,i){return super.setSearchListener(e,i),this.autocomplete.addResultListener(n=>{this.searchImpl(n.country+n.province+n.city+n.district+n.street+n.streetNumber+n.title)})}search(){this.input.value&&this.searchImpl(this.input.value)}searchImpl(e){this.placesService.search(e).then(this.onData,this.onError)}}var Bi=(r=>(r[r.WORLD=1]="WORLD",r[r.STATE=5]="STATE",r[r.CITY=10]="CITY",r[r.STREET=15]="STREET",r[r.BUILDING=20]="BUILDING",r))(Bi||{});class nt{constructor(t){p(this,"latestInfoWindow");p(this,"delegate",void 0);this.element=t,process.env.NODE_ENV!=="production"&&setTimeout(()=>{this.delegate||console.warn(`${this.constructor.name}继承了AbstractMap, 但未调用setEventTargetDelegate(delegate)`)})}setEventTargetDelegate(t){this.delegate=t.setTarget(this)}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}getLatestInfoWindow(){return this.latestInfoWindow}setLatestInfoWindowInternal(t){this.latestInfoWindow=t}addOverlayMapType(t){this.addLayer(t)}removeOverlayMapType(t){this.removeLayer(t)}addControl(t){t.addTo(this)}removeControl(t){t.removeFrom(this)}getZoom(){return this.innerMap.getZoom()??0}setZoom(t){this.innerMap.setZoom(t)}}var Dr=function(t){return $r(t)&&!zr(t)};function $r(r){return!!r&&typeof r=="object"}function zr(r){var t=Object.prototype.toString.call(r);return t==="[object RegExp]"||t==="[object Date]"||Zr(r)}var Gr=typeof Symbol=="function"&&Symbol.for,Nr=Gr?Symbol.for("react.element"):60103;function Zr(r){return r.$$typeof===Nr}function Wr(r){return Array.isArray(r)?[]:{}}function Oe(r,t){return t.clone!==!1&&t.isMergeableObject(r)?de(Wr(r),r,t):r}function Hr(r,t,e){return r.concat(t).map(function(i){return Oe(i,e)})}function Vr(r,t){if(!t.customMerge)return de;var e=t.customMerge(r);return typeof e=="function"?e:de}function jr(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(t){return Object.propertyIsEnumerable.call(r,t)}):[]}function Ii(r){return Object.keys(r).concat(jr(r))}function Si(r,t){try{return t in r}catch{return!1}}function Fr(r,t){return Si(r,t)&&!(Object.hasOwnProperty.call(r,t)&&Object.propertyIsEnumerable.call(r,t))}function Ur(r,t,e){var i={};return e.isMergeableObject(r)&&Ii(r).forEach(function(n){i[n]=Oe(r[n],e)}),Ii(t).forEach(function(n){Fr(r,n)||(Si(r,n)&&e.isMergeableObject(t[n])?i[n]=Vr(n,e)(r[n],t[n],e):i[n]=Oe(t[n],e))}),i}function de(r,t,e){e=e||{},e.arrayMerge=e.arrayMerge||Hr,e.isMergeableObject=e.isMergeableObject||Dr,e.cloneUnlessOtherwiseSpecified=Oe;var i=Array.isArray(t),n=Array.isArray(r),s=i===n;return s?i?e.arrayMerge(r,t,e):Ur(r,t,e):Oe(t,e)}de.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,n){return de(i,n,e)},{})};var qr=de,Yr=qr;const ki=ze(Yr);/*!
3
3
  * isobject <https://github.com/jonschlinkert/isobject>
4
4
  *
5
5
  * Copyright (c) 2014-2017, Jon Schlinkert.
6
6
  * Released under the MIT License.
7
- */function Sr(r){return r!=null&&typeof r=="object"&&Array.isArray(r)===!1}/*!
7
+ */function Kr(r){return r!=null&&typeof r=="object"&&Array.isArray(r)===!1}/*!
8
8
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
9
9
  *
10
10
  * Copyright (c) 2014-2017, Jon Schlinkert.
11
11
  * Released under the MIT License.
12
- */function yi(r){return Sr(r)===!0&&Object.prototype.toString.call(r)==="[object Object]"}function vi(r){var t,e;return!(yi(r)===!1||(t=r.constructor,typeof t!="function")||(e=t.prototype,yi(e)===!1)||e.hasOwnProperty("isPrototypeOf")===!1)}o.Objects=void 0,(r=>{function t(c,p){return c.reduce((g,v)=>(g[p(v)]=v,g),{})}r.fromArray=t;function e(c){return c.reduce((p,g)=>(p[g[0]]=g[1],p),{})}r.fromEntries=e;function i(c){return JSON.stringify(c,(p,g)=>typeof g=="object"&&Object.getPrototypeOf(g)!==Object.prototype?g.toString!==Object.prototype.toString?g.toString():`[object ${Object.getPrototypeOf(g).constructor.name}]`:g)}r.toJsonSafely=i;function n(c){vi(c)&&Object.keys(c).forEach(p=>{c[p]===void 0?delete c[p]:n(c[p])})}r.deleteUndefinedPropertyOnPlainObjectDeeply=n;function s(c,p,g){let v=c[p];return v===void 0&&(v=g(),c[p]=v),v}r.putIfAbsent=s;function l(c,...p){const g=_i(p),v={};for(const M in c)g(M)||(v[M]=c[M]);return v}r.omit=l;function u(c,...p){const g=_i(p),v={};for(const M in c)g(M)&&(v[M]=c[M]);return v}r.pick=u;function a(c,p){const g=typeof p=="string"?p.split("."):p;let v=c;for(const M of g){if(v==null)return;v=v[M]}return v}r.get=a;function h(c,p){const g=typeof p=="string"?p.split("."):p,v=a(c,g.slice(0,-1)),M=g[g.length-1];v!=null&&delete v[M]}r.del=h})(o.Objects||(o.Objects={}));function _i(r){if(r.length<=4)return r.includes.bind(r);{const t=new Set(r);return t.has.bind(t)}}o.Objects.toJsonSafely;const bi=["single","multi"];var W=(r=>(r.auto="auto",r.none="none",r.greedy="greedy",r.cooperative="cooperative",r))(W||{});o.MapOptions=void 0,(r=>{function t(e){o.Objects.deleteUndefinedPropertyOnPlainObjectDeeply(e);const i={center:b.ZERO,zoom:5};return fi(i,e||{},{isMergeableObject:vi})}r.create=t})(o.MapOptions||(o.MapOptions={}));class Lt{constructor(t,e){d(this,"_delegate");this.innerOverlay=t,this.coordType=e}get delegate(){return this._delegate??(this._delegate=this.createDelegate().setTarget(this)),this._delegate}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}remove(){this.map.removeOverlay(this)}}class He extends Lt{constructor(t,e,i){super(t,e),this.map=i}createDelegate(){return new Y(this.innerOverlay,this.map)}isVisible(){return this.innerOverlay.getVisible()}setVisible(t){this.innerOverlay.setVisible(t)}}class ye extends Lt{constructor(t,e,i){super(t,e),this.map=i}createDelegate(){return new ee(this.innerOverlay,this.map)}get overlay(){return this.innerOverlay}isVisible(){return this.overlay.isVisible()}setVisible(t){t?this.overlay.show():this.overlay.hide()}visibleOptionInternal(t){return t!==void 0&&(t||this.setVisible(!1)),this}}const pt=class extends ye{constructor(t,e,i,n){super(t,e,i),this.state=n}isEditable(){return this.state.editable}setEditable(t){this.state.editable=t,t?this.innerOverlay.enableEditing():this.innerOverlay.disableEditing()}setStrokeColor(t){this.innerOverlay.setStrokeColor(t)}setStrokeOpacity(t){this.innerOverlay.setStrokeOpacity(t+pt.OPACITY_DELTA)}setStrokeWeight(t){this.innerOverlay.setStrokeWeight(t)}setFillColor(t){this.innerOverlay.setFillColor(t)}setFillOpacity(t){this.innerOverlay.setFillOpacity(t+pt.OPACITY_DELTA)}};let z=pt;d(z,"OPACITY_DELTA",.001);class Fe extends He{isEditable(){return this.innerOverlay.getEditable()}setEditable(t){this.innerOverlay.setEditable(t)}setStrokeColor(t){this.innerOverlay.setOptions({strokeColor:t})}setStrokeOpacity(t){this.innerOverlay.setOptions({strokeOpacity:t})}setStrokeWeight(t){this.innerOverlay.setOptions({strokeWeight:t})}setFillColor(t){this.innerOverlay.setOptions({fillColor:t})}setFillOpacity(t){this.innerOverlay.setOptions({fillOpacity:t})}}class Ue extends z{constructor(){super(...arguments);d(this,"prevCenter");d(this,"prevRadius");d(this,"isDoingSetCenter",!1);d(this,"isDoingSetRadius",!1);d(this,"eventHubDelegate");d(this,"onRadiusChanged",()=>{var i;const e=this.innerOverlay.getRadius();this.prevRadius!==e&&(this.isDoingSetRadius||(i=this.eventHubDelegate)==null||i.notify({type:"radius-changed",target:this}),this.prevRadius=e)});d(this,"onCenterChanged",()=>{var i;const e=this.innerOverlay.getCenter();this.prevCenter!==e&&(this.isDoingSetCenter||(i=this.eventHubDelegate)==null||i.notify({type:"center-changed",target:this}),this.prevCenter=e)});d(this,"resetEditableTimeoutId")}static create(e){const i=this.coordType,n=new BMap.Circle(e.center.toBaidu(i),e.radius,{enableClicking:e.clickable,enableEditing:!1,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+z.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+z.OPACITY_DELTA:void 0}),s=new Ue(n,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible);return s.state.editable&&setTimeout(()=>{s.state.editable&&n.enableEditing()},0),s}createDelegate(){return this.eventHubDelegate=new ke(super.createDelegate(),{types:["radius-changed","center-changed"],onListen:e=>{e==="radius-changed"?(this.prevRadius=this.innerOverlay.getRadius(),this.innerOverlay.addEventListener("lineupdate",this.onRadiusChanged)):(this.prevCenter=this.innerOverlay.getCenter(),this.innerOverlay.addEventListener("lineupdate",this.onCenterChanged))},onCancel:e=>{this.innerOverlay.removeEventListener("lineupdate",e==="radius-changed"?this.onRadiusChanged:this.onCenterChanged)}})}setCenter(e){this.coordType=this.map.coordType,this.isDoingSetCenter=!0,this.innerOverlay.setCenter(e.toBaidu(this.coordType)),this.isDoingSetCenter=!1,this.state.editable&&(clearTimeout(this.resetEditableTimeoutId),this.resetEditableTimeoutId=setTimeout(()=>{this.state.editable&&(this.innerOverlay.disableEditing(),this.innerOverlay.enableEditing())},0))}getCenter(){return b.fromBaidu(this.innerOverlay.getCenter(),this.coordType)}setRadius(e){this.isDoingSetRadius=!0,this.innerOverlay.setRadius(e),this.isDoingSetRadius=!1}getRadius(){return this.innerOverlay.getRadius()}}class Ye extends Fe{static create(t){const e=this.coordType,i=new google.maps.Circle({center:t.center.toGoogle(e),radius:t.radius,clickable:t.clickable,editable:t.editable,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,visible:t.visible});return new Ye(i,e,this)}setCenter(t){this.coordType=this.map.coordType,this.innerOverlay.setCenter(t.toGoogle(this.coordType))}getCenter(){return b.fromGoogle(this.innerOverlay.getCenter()??F.LATLNG_ZERO,this.coordType)}setRadius(t){this.innerOverlay.setRadius(t)}getRadius(){return this.innerOverlay.getRadius()}}function Mi(){BMap.OverlayV3||(BMap.OverlayV3=BMap.Overlay)}const Ti={equals(r,t){return r.lat===t.lat&&r.lng===t.lng}};o.Point=void 0,(r=>{r.ZERO={x:0,y:0}})(o.Point||(o.Point={}));const Ln="";let Bt;function kr(r,t,e,i,n,s){return Bt||(Bt=Ar()),new Bt(r,t,e,i,n,s)}function Ar(){Mi();const r=new BMap.Point(0,0);return class extends BMap.OverlayV3{constructor(i,n=r,s=o.Point.ZERO,l,u=654,a=""){super();d(this,"container");d(this,"border");d(this,"inner");d(this,"map");d(this,"marker");this.content=i,this.position=n,this.offset=s;const h="baidu-info-box-container";this.container=document.createElement("div"),this.container.className=h,this.container.style.position="absolute",this.border=document.createElement("div"),this.border.className=`${h}__border ${a}`,this.inner=document.createElement("div"),this.inner.className=h+"__inner";const c=document.createElement("img");c.className=h+"__close",c.src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23000000%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%0A%3C%2Fsvg%3E%0A",c.addEventListener("click",()=>{this.close(),this.dispatchEvent({type:"onclickclose"})}),this.inner.appendChild(i),this.border.appendChild(this.inner),this.border.appendChild(c),this.container.appendChild(this.border),l&&this.setZIndex(l),this.setMaxWidth(u),this.onMarkerPositionChanged=this.onMarkerPositionChanged.bind(this)}initialize(i){return this.map=i,i.getPanes().floatPane.appendChild(this.container),this.container}draw(){if(!this.map)return;const i=this.marker?this.marker.getPosition():this.position,n=this.map.pointToOverlayPixel(i),s=n.x+this.offset.x,l=n.y+this.offset.y;this.container.style.left=`${s}px`,this.container.style.top=`${l}px`}open(i,n){n&&n===this.marker||(this.marker&&this.detachMarker(this.marker),this.marker=n,this.marker&&this.attachMarker(this.marker),this.isOpen()?this.draw():this.marker&&!this.marker.getMap()||i.addOverlay(this))}attachMarker(i){i.__info_box__=this,i.addEventListener("dragging",this.onMarkerPositionChanged),i.addEventListener("dragend",this.onMarkerPositionChanged)}detachMarker(i){i.__info_box__=void 0,i.removeEventListener("dragging",this.onMarkerPositionChanged),i.removeEventListener("dragend",this.onMarkerPositionChanged)}close(){this.map&&(this.map.removeOverlay(this),this.marker&&(this.detachMarker(this.marker),this.marker=void 0),this.map=void 0)}isOpen(){return this.map&&this.map.getPanes().floatPane===this.container.parentNode}onMarkerPositionChanged(){this.draw()}setZIndex(i){this.container.style.zIndex=`${i}`}setMaxWidth(i){this.border.style.maxWidth=`${i}px`}setPosition(i){this.marker||(this.position=i,this.draw())}getPosition(){return this.position}setOffset(i){this.offset=i,this.draw()}getOffset(){return this.offset}}}class qe{constructor(t){this.delegate=t,this.delegate.setTarget(this)}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}}class Ke extends qe{constructor(t,e,i){super(new ee(t,e)),this.inner=t,this.map=e,this.state=i}static create(t){const e=t.position||b.ZERO,i=new BMap.InfoWindow(t.content,{maxWidth:t.maxWidth,offset:t.offset&&new BMap.Size(t.offset.x,t.offset.y),enableAutoPan:!t.disableAutoPan});return new Ke(i,this,{position:e})}isOpen(){return this.inner.isOpen()}open(t){t?t.innerOverlay.openInfoWindow(this.inner):this.map.innerMap.openInfoWindow(this.inner,(this.state.position||b.ZERO).toBaidu(this.map.coordType)),this.map.setLatestInfoWindowInternal(this)}close(){this.inner.isOpen()&&this.map.innerMap.closeInfoWindow()}getPosition(){const t=this.inner.getPosition();return t&&b.fromBaidu(t,this.map.coordType)||this.state.position||b.ZERO}setPosition(t){this.state.position=t,this.inner.isOpen()&&this.open()}}class Xe extends qe{constructor(e,i){super(new Y(e,i));d(this,"eventHub",new Ft);d(this,"isOpened",!1);this.inner=e,this.map=i,e.addListener("closeclick",()=>{this.isOpened=!1,this.eventHub.hasListener("close")&&this.eventHub.notify({type:"close",target:this})}),e.addListener("map_changed",()=>{const n=this.isOpened;this.isOpened=!!e.getMap(),n&&!this.isOpened&&this.eventHub.hasListener("close")&&this.eventHub.notify({type:"close",target:this})})}static create(e){const i=e.position||b.ZERO,n=new google.maps.InfoWindow({content:e.content,maxWidth:e.maxWidth,pixelOffset:e.offset&&new google.maps.Size(e.offset.x,e.offset.y),position:i.toGoogle(this.coordType),disableAutoPan:e.disableAutoPan});return new Xe(n,this)}isOpen(){return this.isOpened}addEventListener(e,i){if(e==="open"||e==="close"){this.eventHub.addEventListener(e,i);return}super.addEventListener(e,i)}removeEventListener(e,i){if(e==="open"||e==="close"){this.eventHub.removeEventListener(e,i);return}super.removeEventListener(e,i)}open(e){if(!this.isOpened){if(this.map.mapOptions.infoWindowMode==="single"){const i=this.map.getLatestInfoWindow();i&&i.close()}this.inner.open(this.map.innerMap,e==null?void 0:e.innerOverlay),this.isOpened=!0,this.map.setLatestInfoWindowInternal(this),this.eventHub.notify({type:"open",target:this})}}close(){this.isOpened&&(this.isOpened=!1,this.inner.close(),this.eventHub.notify({type:"close",target:this}))}getPosition(){return b.fromGoogle(this.inner.getPosition()??F.LATLNG_ZERO,this.map.coordType)}setPosition(e){this.inner.setPosition(e.toGoogle(this.map.coordType))}}class Je extends ye{constructor(t,e,i){super(t,e,i),this.baiduMap=i}static create(t){var n;const e=this.coordType,i=kr(t.content,(n=t.position)==null?void 0:n.toBaidu(e),t.offset,t.zIndex,t.maxWidth,t.borderClass);return new Je(i,e,this)}open(t){this.innerOverlay.open(this.baiduMap.innerMap,t==null?void 0:t.innerOverlay)}close(){this.innerOverlay.close()}getPosition(){return b.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(t){this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toBaidu(this.coordType))}setMaxWidth(t){this.innerOverlay.setMaxWidth(t)}setZIndex(t){this.innerOverlay.setZIndex(t)}}class Qe extends qe{constructor(t,e,i){super(new Y(t,i)),this.inner=t,this.coordType=e,this.map=i}static create(t){var s;const e=this.coordType,i=new google.maps.InfoWindow({content:t.content,position:(s=t.position)==null?void 0:s.toGoogle(e),pixelOffset:t.offset&&new google.maps.Size(t.offset.x,t.offset.y),zIndex:t.zIndex,maxWidth:t.maxWidth}),n=t.borderClass;return n&&i.addListener("domready",()=>{var u;const l=(u=t.content.parentElement)==null?void 0:u.parentElement;l&&l.className.includes("gm-style-iw-c")&&!l.className.includes(n)&&(l.className+=` ${n}`)}),new Qe(i,e,this)}open(t){this.inner.open(this.map.innerMap,t==null?void 0:t.innerOverlay)}close(){this.inner.close()}getPosition(){return b.fromGoogle(this.inner.getPosition()??F.LATLNG_ZERO,this.coordType)}setPosition(t){this.coordType=this.map.coordType,this.inner.setPosition(t.toGoogle(this.coordType))}isOpen(){return this.inner.getMap()!=null}setMaxWidth(t){if(this.isOpen()){const e=this.inner.getMap(),i=this.inner.getAnchor();this.inner.close(),this.inner.setOptions({maxWidth:t}),this.inner.open(e,i)}else this.inner.setOptions({maxWidth:t})}setZIndex(t){this.inner.setZIndex(t)}}o.Strings=void 0,(r=>{function t(s,l){if(s!==void 0)return Object.values(l).includes(s)?s:void 0}r.toEnumOrNull=t;function e(s){return s.split(`
12
+ */function xi(r){return Kr(r)===!0&&Object.prototype.toString.call(r)==="[object Object]"}function Ai(r){var t,e;return!(xi(r)===!1||(t=r.constructor,typeof t!="function")||(e=t.prototype,xi(e)===!1)||e.hasOwnProperty("isPrototypeOf")===!1)}a.Objects=void 0,(r=>{function t(u,f){return u.reduce((m,_)=>(m[f(_)]=_,m),{})}r.fromArray=t;function e(u){return u.reduce((f,m)=>(f[m[0]]=m[1],f),{})}r.fromEntries=e;function i(u){return JSON.stringify(u,(f,m)=>typeof m=="object"&&Object.getPrototypeOf(m)!==Object.prototype?m.toString!==Object.prototype.toString?m.toString():`[object ${Object.getPrototypeOf(m).constructor.name}]`:m)}r.toJsonSafely=i;function n(u){Ai(u)&&Object.keys(u).forEach(f=>{u[f]===void 0?delete u[f]:n(u[f])})}r.deleteUndefinedPropertyOnPlainObjectDeeply=n;function s(u,f,m){let _=u[f];return _===void 0&&(_=m(),u[f]=_),_}r.putIfAbsent=s;function l(u,...f){const m=Ri(f),_={};for(const T in u)m(T)||(_[T]=u[T]);return _}r.omit=l;function d(u,...f){const m=Ri(f),_={};for(const T in u)m(T)&&(_[T]=u[T]);return _}r.pick=d;function o(u,f){const m=typeof f=="string"?f.split("."):f;let _=u;for(const T of m){if(_==null)return;_=_[T]}return _}r.get=o;function h(u,f){const m=typeof f=="string"?f.split("."):f,_=o(u,m.slice(0,-1)),T=m[m.length-1];_!=null&&delete _[T]}r.del=h})(a.Objects||(a.Objects={}));function Ri(r){if(r.length<=4)return r.includes.bind(r);{const t=new Set(r);return t.has.bind(t)}}a.Objects.toJsonSafely;const Di=["single","multi"];var X=(r=>(r.auto="auto",r.none="none",r.greedy="greedy",r.cooperative="cooperative",r))(X||{});a.MapOptions=void 0,(r=>{function t(e){a.Objects.deleteUndefinedPropertyOnPlainObjectDeeply(e);const i={center:w.ZERO,zoom:5};return ki(i,e||{},{isMergeableObject:Ai})}r.create=t})(a.MapOptions||(a.MapOptions={}));class Vt{constructor(t,e){p(this,"_delegate");this.innerOverlay=t,this.coordType=e}get delegate(){return this._delegate??(this._delegate=this.createDelegate().setTarget(this)),this._delegate}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}remove(){this.map.removeOverlay(this)}}class st extends Vt{constructor(t,e,i){super(t,e),this.map=i}createDelegate(){return new ne(this.innerOverlay,this.map)}isVisible(){return this.innerOverlay.getVisible()}setVisible(t){this.innerOverlay.setVisible(t)}}class we extends Vt{constructor(t,e,i){super(t,e),this.map=i}createDelegate(){return new he(this.innerOverlay,this.map)}get overlay(){return this.innerOverlay}isVisible(){return this.overlay.isVisible()}setVisible(t){t?this.overlay.show():this.overlay.hide()}visibleOptionInternal(t){return t!==void 0&&(t||this.setVisible(!1)),this}}const Pt=class extends we{constructor(t,e,i,n){super(t,e,i),this.state=n}isEditable(){return this.state.editable}setEditable(t){this.state.editable=t,t?this.innerOverlay.enableEditing():this.innerOverlay.disableEditing()}setStrokeColor(t){this.innerOverlay.setStrokeColor(t)}setStrokeOpacity(t){this.innerOverlay.setStrokeOpacity(t+Pt.OPACITY_DELTA)}setStrokeWeight(t){this.innerOverlay.setStrokeWeight(t)}setFillColor(t){this.innerOverlay.setFillColor(t)}setFillOpacity(t){this.innerOverlay.setFillOpacity(t+Pt.OPACITY_DELTA)}};let V=Pt;p(V,"OPACITY_DELTA",.001);class ot extends st{isEditable(){return this.innerOverlay.getEditable()}setEditable(t){this.innerOverlay.setEditable(t)}setStrokeColor(t){this.innerOverlay.setOptions({strokeColor:t})}setStrokeOpacity(t){this.innerOverlay.setOptions({strokeOpacity:t})}setStrokeWeight(t){this.innerOverlay.setOptions({strokeWeight:t})}setFillColor(t){this.innerOverlay.setOptions({fillColor:t})}setFillOpacity(t){this.innerOverlay.setOptions({fillOpacity:t})}}class at extends V{constructor(){super(...arguments);p(this,"prevCenter");p(this,"prevRadius");p(this,"isDoingSetCenter",!1);p(this,"isDoingSetRadius",!1);p(this,"eventHubDelegate");p(this,"onRadiusChanged",()=>{var i;const e=this.innerOverlay.getRadius();this.prevRadius!==e&&(this.isDoingSetRadius||(i=this.eventHubDelegate)==null||i.notify({type:"radius-changed",target:this}),this.prevRadius=e)});p(this,"onCenterChanged",()=>{var i;const e=this.innerOverlay.getCenter();this.prevCenter!==e&&(this.isDoingSetCenter||(i=this.eventHubDelegate)==null||i.notify({type:"center-changed",target:this}),this.prevCenter=e)});p(this,"resetEditableTimeoutId")}static create(e){const i=this.coordType,n=new BMap.Circle(e.center.toBaidu(i),e.radius,{enableClicking:e.clickable,enableEditing:!1,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+V.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+V.OPACITY_DELTA:void 0}),s=new at(n,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible);return s.state.editable&&setTimeout(()=>{s.state.editable&&n.enableEditing()},0),s}createDelegate(){return this.eventHubDelegate=new Ve(super.createDelegate(),{types:["radius-changed","center-changed"],onListen:e=>{e==="radius-changed"?(this.prevRadius=this.innerOverlay.getRadius(),this.innerOverlay.addEventListener("lineupdate",this.onRadiusChanged)):(this.prevCenter=this.innerOverlay.getCenter(),this.innerOverlay.addEventListener("lineupdate",this.onCenterChanged))},onCancel:e=>{this.innerOverlay.removeEventListener("lineupdate",e==="radius-changed"?this.onRadiusChanged:this.onCenterChanged)}})}setCenter(e){this.coordType=this.map.coordType,this.isDoingSetCenter=!0,this.innerOverlay.setCenter(e.toBaidu(this.coordType)),this.isDoingSetCenter=!1,this.state.editable&&(clearTimeout(this.resetEditableTimeoutId),this.resetEditableTimeoutId=setTimeout(()=>{this.state.editable&&(this.innerOverlay.disableEditing(),this.innerOverlay.enableEditing())},0))}getCenter(){return w.fromBaidu(this.innerOverlay.getCenter(),this.coordType)}setRadius(e){this.isDoingSetRadius=!0,this.innerOverlay.setRadius(e),this.isDoingSetRadius=!1}getRadius(){return this.innerOverlay.getRadius()}}class lt extends ot{static create(t){const e=this.coordType,i=new google.maps.Circle({center:t.center.toGoogle(e),radius:t.radius,clickable:t.clickable,editable:t.editable,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,visible:t.visible});return new lt(i,e,this)}setCenter(t){this.coordType=this.map.coordType,this.innerOverlay.setCenter(t.toGoogle(this.coordType))}getCenter(){return w.fromGoogle(this.innerOverlay.getCenter()??ie.LATLNG_ZERO,this.coordType)}setRadius(t){this.innerOverlay.setRadius(t)}getRadius(){return this.innerOverlay.getRadius()}}function $i(){BMap.OverlayV3||(BMap.OverlayV3=BMap.Overlay)}const zi={equals(r,t){return r.lat===t.lat&&r.lng===t.lng}};a.Point=void 0,(r=>{r.ZERO={x:0,y:0}})(a.Point||(a.Point={}));const Vn="";let jt;function Xr(r,t,e,i,n,s){return jt||(jt=Jr()),new jt(r,t,e,i,n,s)}function Jr(){$i();const r=new BMap.Point(0,0);return class extends BMap.OverlayV3{constructor(i,n=r,s=a.Point.ZERO,l,d=654,o=""){super();p(this,"container");p(this,"border");p(this,"inner");p(this,"map");p(this,"marker");this.content=i,this.position=n,this.offset=s;const h="baidu-info-box-container";this.container=document.createElement("div"),this.container.className=h,this.container.style.position="absolute",this.border=document.createElement("div"),this.border.className=`${h}__border ${o}`,this.inner=document.createElement("div"),this.inner.className=h+"__inner";const u=document.createElement("span");u.className=h+"__close",u.addEventListener("click",()=>{this.close(),this.dispatchEvent({type:"onclickclose"})}),this.inner.appendChild(i),this.border.appendChild(this.inner),this.border.appendChild(u),this.container.appendChild(this.border),l&&this.setZIndex(l),this.setMaxWidth(d),this.onMarkerPositionChanged=this.onMarkerPositionChanged.bind(this)}initialize(i){return this.map=i,i.getPanes().floatPane.appendChild(this.container),this.container}draw(){if(!this.map)return;const i=this.marker?this.marker.getPosition():this.position,n=this.map.pointToOverlayPixel(i),s=n.x+this.offset.x,l=n.y+this.offset.y;this.container.style.left=`${s}px`,this.container.style.top=`${l}px`}open(i,n){n&&n===this.marker||(this.marker&&this.detachMarker(this.marker),this.marker=n,this.marker&&this.attachMarker(this.marker),this.isOpen()?this.draw():this.marker&&!this.marker.getMap()||i.addOverlay(this))}attachMarker(i){i.__info_box__=this,i.addEventListener("dragging",this.onMarkerPositionChanged),i.addEventListener("dragend",this.onMarkerPositionChanged)}detachMarker(i){i.__info_box__=void 0,i.removeEventListener("dragging",this.onMarkerPositionChanged),i.removeEventListener("dragend",this.onMarkerPositionChanged)}close(){this.map&&(this.map.removeOverlay(this),this.marker&&(this.detachMarker(this.marker),this.marker=void 0),this.map=void 0)}isOpen(){return this.map&&this.map.getPanes().floatPane===this.container.parentNode}onMarkerPositionChanged(){this.draw()}setZIndex(i){this.container.style.zIndex=`${i}`}setMaxWidth(i){this.border.style.maxWidth=`${i}px`}setPosition(i){this.marker||(this.position=i,this.draw())}getPosition(){return this.position}setOffset(i){this.offset=i,this.draw()}getOffset(){return this.offset}}}class ht{constructor(t){this.delegate=t,this.delegate.setTarget(this)}addEventListener(t,e){this.delegate.addEventListener(t,e)}removeEventListener(t,e){this.delegate.removeEventListener(t,e)}}class ct extends ht{constructor(t,e,i){super(new he(t,e)),this.inner=t,this.map=e,this.state=i}static create(t){const e=t.position||w.ZERO,i=new BMap.InfoWindow(t.content,{maxWidth:t.maxWidth,offset:t.offset&&new BMap.Size(t.offset.x,t.offset.y),enableAutoPan:!t.disableAutoPan});return new ct(i,this,{position:e})}isOpen(){return this.inner.isOpen()}open(t){t?t.innerOverlay.openInfoWindow(this.inner):this.map.innerMap.openInfoWindow(this.inner,(this.state.position||w.ZERO).toBaidu(this.map.coordType)),this.map.setLatestInfoWindowInternal(this)}close(){this.inner.isOpen()&&this.map.innerMap.closeInfoWindow()}getPosition(){const t=this.inner.getPosition();return t&&w.fromBaidu(t,this.map.coordType)||this.state.position||w.ZERO}setPosition(t){this.state.position=t,this.inner.isOpen()&&this.open()}}class dt extends ht{constructor(e,i){super(new ne(e,i));p(this,"eventHub",new ni);p(this,"isOpened",!1);this.inner=e,this.map=i,e.addListener("closeclick",()=>{this.isOpened=!1,this.eventHub.hasListener("close")&&this.eventHub.notify({type:"close",target:this})}),e.addListener("map_changed",()=>{const n=this.isOpened;this.isOpened=!!e.getMap(),n&&!this.isOpened&&this.eventHub.hasListener("close")&&this.eventHub.notify({type:"close",target:this})})}static create(e){const i=e.position||w.ZERO,n=new google.maps.InfoWindow({content:e.content,maxWidth:e.maxWidth,pixelOffset:e.offset&&new google.maps.Size(e.offset.x,e.offset.y),position:i.toGoogle(this.coordType),disableAutoPan:e.disableAutoPan});return new dt(n,this)}isOpen(){return this.isOpened}addEventListener(e,i){if(e==="open"||e==="close"){this.eventHub.addEventListener(e,i);return}super.addEventListener(e,i)}removeEventListener(e,i){if(e==="open"||e==="close"){this.eventHub.removeEventListener(e,i);return}super.removeEventListener(e,i)}open(e){if(!this.isOpened){if(this.map.mapOptions.infoWindowMode==="single"){const i=this.map.getLatestInfoWindow();i&&i.close()}this.inner.open(this.map.innerMap,e==null?void 0:e.innerOverlay),this.isOpened=!0,this.map.setLatestInfoWindowInternal(this),this.eventHub.notify({type:"open",target:this})}}close(){this.isOpened&&(this.isOpened=!1,this.inner.close(),this.eventHub.notify({type:"close",target:this}))}getPosition(){return w.fromGoogle(this.inner.getPosition()??ie.LATLNG_ZERO,this.map.coordType)}setPosition(e){this.inner.setPosition(e.toGoogle(this.map.coordType))}}class ut extends we{constructor(t,e,i){super(t,e,i),this.baiduMap=i}static create(t){var n;const e=this.coordType,i=Xr(t.content,(n=t.position)==null?void 0:n.toBaidu(e),t.offset,t.zIndex,t.maxWidth,t.borderClass);return new ut(i,e,this)}open(t){this.innerOverlay.open(this.baiduMap.innerMap,t==null?void 0:t.innerOverlay)}close(){this.innerOverlay.close()}getPosition(){return w.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(t){this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toBaidu(this.coordType))}setMaxWidth(t){this.innerOverlay.setMaxWidth(t)}setZIndex(t){this.innerOverlay.setZIndex(t)}}class pt extends ht{constructor(t,e,i){super(new ne(t,i)),this.inner=t,this.coordType=e,this.map=i}static create(t){var s;const e=this.coordType,i=new google.maps.InfoWindow({content:t.content,position:(s=t.position)==null?void 0:s.toGoogle(e),pixelOffset:t.offset&&new google.maps.Size(t.offset.x,t.offset.y),zIndex:t.zIndex,maxWidth:t.maxWidth}),n=t.borderClass;return n&&i.addListener("domready",()=>{var d;const l=(d=t.content.parentElement)==null?void 0:d.parentElement;l&&l.className.includes("gm-style-iw-c")&&!l.className.includes(n)&&(l.className+=` ${n}`)}),new pt(i,e,this)}open(t){this.inner.open(this.map.innerMap,t==null?void 0:t.innerOverlay)}close(){this.inner.close()}getPosition(){return w.fromGoogle(this.inner.getPosition()??ie.LATLNG_ZERO,this.coordType)}setPosition(t){this.coordType=this.map.coordType,this.inner.setPosition(t.toGoogle(this.coordType))}isOpen(){return this.inner.getMap()!=null}setMaxWidth(t){if(this.isOpen()){const e=this.inner.getMap(),i=this.inner.getAnchor();this.inner.close(),this.inner.setOptions({maxWidth:t}),this.inner.open(e,i)}else this.inner.setOptions({maxWidth:t})}setZIndex(t){this.inner.setZIndex(t)}}a.Strings=void 0,(r=>{function t(s,l){if(s!==void 0)return Object.values(l).includes(s)?s:void 0}r.toEnumOrNull=t;function e(s){return s.split(`
13
13
  `).map(l=>l.trim()).join(`
14
- `)}r.trimIndent=e;function i(s){return s.replace(/([^A-Z]?)([A-Z])/g,(l,u,a)=>u?`${u}-${a.toLowerCase()}`:a.toLowerCase())}r.pascal2kebab=i;function n(s){return/^-?\d+$/.test(s)}r.isInt=n})(o.Strings||(o.Strings={}));const Ci={basename(r,t){const e=r.endsWith("/")?r.slice(0,-1):r,i=e.lastIndexOf("/"),n=i>=0?e.substring(i+1):e;return t&&n.endsWith(t)?n.slice(0,-t.length):n}},Bn="";var re=(r=>(r.map="map",r.overlay="overlay",r.overlayMouseTarget="overlayMouseTarget",r.float="float",r))(re||{});o.MapPanes=void 0,(r=>{function t(i,n){switch(i){case"float":return n.floatPane;case"overlayMouseTarget":return n.overlayMouseTarget;case"overlay":return n.overlayLayer;case"map":return n.mapPane;default:Pe(i)}}r.toGoogle=t;function e(i,n){switch(i){case"float":return n.floatPane;case"overlayMouseTarget":return n.markerMouseTarget;case"overlay":return n.markerPane;case"map":return n.mapPane;default:Pe(i)}}r.toBaidu=e})(o.MapPanes||(o.MapPanes={}));class Oi{constructor(t,e){d(this,"baidu");d(this,"google");d(this,"projection");d(this,"element",void 0);d(this,"mapPane");this.map=t,this.mapPane=e.mapPane}create(){return this.element=this.onCreate(),this.element.className+=" element-overlay",this.element}draw(){this.projection&&this.onDraw(this.projection)}getProjection(){return this.projection}asBaidu(){if(!this.baidu){const t=this;Mi();class e extends BMap.OverlayV3{initialize(s){var a;const l=t.create(),u=s.getPanes();return(a=o.MapPanes.toBaidu(t.mapPane,u))==null||a.appendChild(l),l}draw(){t.draw()}}this.baidu=new e;const i=t.map.innerMap;this.projection={fromLatLngToOverlayPoint(n){return i.pointToOverlayPixel(n.toBaidu(t.map.coordType))},fromOverlayPointToLatLng(n){return b.fromBaidu(i.overlayPixelToPoint(new BMap.Pixel(n.x,n.y)),t.map.coordType)}}}return this.baidu}asGoogle(){if(!this.google){const t=this;class e extends google.maps.OverlayView{onAdd(){const n=t.create(),s=this.getPanes()??E("onAdd回调中一定会有panes");o.MapPanes.toGoogle(t.mapPane,s).appendChild(n)}draw(){t.draw()}onRemove(){var n;(n=t.element.parentNode)==null||n.removeChild(t.element)}}this.google=new e,this.projection={fromLatLngToOverlayPoint(i){return t.google.getProjection().fromLatLngToDivPixel(i.toGoogle(t.map.coordType))??o.Point.ZERO},fromOverlayPointToLatLng(i){return b.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x,i.y))??F.LATLNG_ZERO,t.map.coordType)}}}return this.google}}let It;function xr(r,t,e,i,n){return It||(It=Rr()),new It(r,t,e,i,n)}function Rr(){return class extends google.maps.OverlayView{constructor(e,i,n,s=re.overlayMouseTarget,l){super();d(this,"container");this.position=i,this.offset=n,this._mapPane=s,this.container=document.createElement("div"),this.container.className="label-container",this.container.style.position="absolute",l&&this.setZIndex(l),this.container.addEventListener("click",()=>{google.maps.event.trigger(this,"click")}),this.setElement(e)}setZIndex(e){this.container.style.zIndex=`${e}`}setElement(e){const i=this.container.firstChild;i!==e&&(i?this.container.replaceChild(i,e):this.container.appendChild(e))}onAdd(){const e=this.getPanes()??E("onAdd回调中一定能够获取panes");o.MapPanes.toGoogle(this._mapPane,e).appendChild(this.container)}draw(){var e,i;if(this.container.style.display=this.position?"block":"none",this.position){const n=this.getProjection();if(n){const s=n.fromLatLngToDivPixel(this.position);s&&(this.container.style.left=`${s.x+(((e=this.offset)==null?void 0:e.x)??0)}px`,this.container.style.top=`${s.y+(((i=this.offset)==null?void 0:i.y)??0)}px`)}}}onRemove(){var e;(e=this.container.parentNode)==null||e.removeChild(this.container)}setPosition(e){this.position=e,this.draw()}getPosition(){return this.position}setOffset(e){this.offset=e,this.draw()}getOffset(){return this.offset}getVisible(){return this.container.style.visibility!=="hidden"}setVisible(e){this.container.style.visibility=e?"visible":"hidden"}}}var ne;(r=>{function t(i){return typeof i=="string"?i:i.outerHTML}r.toString=t;function e(i){if(typeof i=="string"){const n=document.createElement("div");return n.innerHTML=i,n}return i}r.toElement=e})(ne||(ne={}));class St extends ye{constructor(e,i,n,s){super(e,i,n);d(this,"icon");d(this,"iconAnchor");d(this,"content",void 0);d(this,"contentObserver");this.setContentInternal(s,!0)}static create(e){var l;const i=this.coordType,n=new BMap.Label(ne.toString(e.content),{position:(l=e.position)==null?void 0:l.toBaidu(i),offset:e.offset&&new BMap.Size(e.offset.x,e.offset.y)});e.zIndex&&n.setZIndex(e.zIndex),n.setStyle({border:"0px",padding:"0px",backgroundColor:"unset"});const s=new St(n,i,this,e.content);return n.__label__=s,s}setContentInternal(e,i=!1){this.content!==e&&(this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=void 0),typeof e!="string"&&(this.contentObserver=new MutationObserver(()=>{this.innerOverlay.setContent(e.outerHTML)}),this.contentObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),i||this.innerOverlay.setContent(ne.toString(e)),this.content=e)}setZIndex(e){this.innerOverlay.setZIndex(e)}getPosition(){return b.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(e){this.coordType=this.map.coordType,this.innerOverlay.setPosition(e.toBaidu(this.coordType))}getOffset(){const e=this.innerOverlay.getOffset();let i=0,n=0;return this.iconAnchor&&(i=this.iconAnchor.width,n=this.iconAnchor.height),{x:e.width-i,y:e.height-n}}setOffset(e){let i=0,n=0;this.iconAnchor&&(i=this.iconAnchor.width,n=this.iconAnchor.height),this.innerOverlay.setOffset(new BMap.Size(e.x+i,e.y+n))}setContent(e){this.setContentInternal(e)}attachIcon(e){var u;let i;if(e instanceof BMap.Icon)i=e.anchor;else if(e)if(e.anchor)i=e.anchor;else{const a=((u=e.__icon__)==null?void 0:u.baiduLabelOffset)??{x:0,y:0};i={width:e.style.anchor.width+a.x,height:e.style.anchor.height+a.y},process.env.NODE_ENV!=="production"&&setTimeout(()=>{var p,g;if(U(e.__icon__,`${e}必须是由'SymbolIcon.toBaidu()'创建的`),!e.anchor){console.log("BaiduLabelOverlay.attachIcon","Bmap.Symbol.anchor尚未计算完成");return}const h=e.anchor.width-e.style.anchor.width,c=e.anchor.height-e.style.anchor.height;if(a.x!==h||a.y!==c){const v=[(p=e.__icon__.anchor)==null?void 0:p.x,(g=e.__icon__.anchor)==null?void 0:g.y,e.__icon__.rotation,e.__icon__.scale,e.__icon__.strokeWeight].map(M=>M??"").join(",");console.warn("BaiduLabelOverlay.attachIcon",e.__icon__,o.Strings.trimIndent(`
15
- 为了保证Label的位置正确, 请将SymbolIcon(${v})中baiduLabelOffset的值改写成:
16
- ${JSON.stringify({x:h,y:c})}
17
- `))}},1)}const n=this.innerOverlay.getOffset();let s=n.width,l=n.height;this.iconAnchor&&(s-=this.iconAnchor.width,l-=this.iconAnchor.height),i&&(s+=i.width,l+=i.height),this.innerOverlay.setOffset(new BMap.Size(s,l)),this.icon=e,this.iconAnchor=i}}class kt extends He{static create(t){var n;const e=this.coordType,i=xr(ne.toElement(t.content),(n=t.position)==null?void 0:n.toGoogle(e),t.offset,t.mapPane,t.zIndex);return new kt(i,e,this)}setZIndex(t){this.innerOverlay.setZIndex(t)}setContent(t){this.innerOverlay.setElement(ne.toElement(t))}getPosition(){const t=this.innerOverlay.getPosition();return t?b.fromGoogle(t,this.coordType):b.ZERO}setPosition(t){this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toGoogle(this.coordType))}getOffset(){return this.innerOverlay.getOffset()??o.Point.ZERO}setOffset(t){this.innerOverlay.setOffset(t)}}const ve={toGoogle:r=>"url"in r?o.Icon.toGoogle(r):o.SymbolIcon.toGoogle(r),toBaidu:r=>"url"in r?o.Icon.toBaidu(r):o.SymbolIcon.toBaidu(r)};o.Icon=void 0,(r=>{function t(i){return{url:i.url,size:new google.maps.Size(i.size.width,i.size.height),origin:i.origin&&new google.maps.Point(i.origin.x,i.origin.y),scaledSize:i.scaledSize&&new google.maps.Size(i.scaledSize.width,i.scaledSize.height),anchor:i.anchor&&new google.maps.Point(i.anchor.x,i.anchor.y)}}r.toGoogle=t;function e(i){return new BMap.Icon(i.url,new BMap.Size(i.size.width,i.size.height),{imageOffset:i.origin&&new BMap.Size(-i.origin.x,-i.origin.y),imageSize:i.scaledSize&&new BMap.Size(i.scaledSize.width,i.scaledSize.height),anchor:i.anchor?new BMap.Size(i.anchor.x,i.anchor.y):new BMap.Size(i.size.width/2,i.size.height)})}r.toBaidu=e})(o.Icon||(o.Icon={})),o.SymbolIcon=void 0,(r=>{function t(i){return{path:typeof i.path=="string"?i.path:i.path.google(),anchor:i.anchor&&new google.maps.Point(i.anchor.x,i.anchor.y),fillColor:i.fillColor,fillOpacity:i.fillOpacity,scale:i.scale,rotation:i.rotation,strokeColor:i.strokeColor,strokeOpacity:i.strokeOpacity,strokeWeight:i.strokeWeight}}r.toGoogle=t;function e(i){const n=new BMap.Symbol(typeof i.path=="string"?i.path:i.path.baidu(),{anchor:i.anchor&&new BMap.Size(i.anchor.x,i.anchor.y),fillColor:i.fillColor,fillOpacity:i.fillOpacity,scale:i.scale,rotation:i.rotation,strokeColor:i.strokeColor,strokeOpacity:i.strokeOpacity,strokeWeight:i.strokeWeight});return n.__icon__=i,n}r.toBaidu=e})(o.SymbolIcon||(o.SymbolIcon={}));const $r={CIRCLE:{baidu:()=>BMap_Symbol_SHAPE_CIRCLE,google:()=>google.maps.SymbolPath.CIRCLE},BACKWARD_CLOSED_ARROW:{baidu:()=>BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW,google:()=>google.maps.SymbolPath.BACKWARD_CLOSED_ARROW},BACKWARD_OPEN_ARROW:{baidu:()=>BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW,google:()=>google.maps.SymbolPath.BACKWARD_OPEN_ARROW},FORWARD_CLOSED_ARROW:{baidu:()=>BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW,google:()=>google.maps.SymbolPath.FORWARD_CLOSED_ARROW},FORWARD_OPEN_ARROW:{baidu:()=>BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW,google:()=>google.maps.SymbolPath.FORWARD_OPEN_ARROW}};o.IconSequence=void 0,(r=>{function t(i){return{icon:o.SymbolIcon.toGoogle(i.icon),offset:i.offset,repeat:i.repeat,fixedRotation:i.fixedRotation}}r.toGoogle=t;function e(i){return new BMap.IconSequence(o.SymbolIcon.toBaidu(i.icon),i.offset,i.repeat??"",i.fixedRotation)}r.toBaidu=e})(o.IconSequence||(o.IconSequence={}));class se extends ye{constructor(t,e,i,n){super(t,e,i),this.state=n}static create(t){const e=this.coordType,i=t.icon,n={title:t.title,icon:i&&ve.toBaidu(i),enableClicking:t.clickable,enableDragging:t.draggable,raiseOnDrag:t.crossOnDrag===void 0?!0:t.crossOnDrag,draggingCursor:t.cursor},s=new BMap.Marker(t.position.toBaidu(e,t.normalizePositionForBaidu),n);s.__create_by_tg__=!0,t.zIndex!==void 0&&s.setZIndex(t.zIndex);const l=t.clickable===void 0?!0:t.clickable,u=!!t.draggable;return new se(s,e,this,{clickable:l,draggable:u,zIndex:t.zIndex,normalize:t.normalizePositionForBaidu}).visibleOptionInternal(t.visible)}getPosition(){return b.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(t){var e;this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toBaidu(this.coordType,this.state.normalize)),(e=this.innerOverlay.__info_box__)==null||e.onMarkerPositionChanged()}setTitle(t){this.innerOverlay.setTitle(t)}getTitle(){return this.innerOverlay.getTitle()}setIcon(t){const e=ve.toBaidu(t);this.innerOverlay.setIcon(e);const i=this.getLabel();i&&i.attachIcon(e)}getIcon(){return this.innerOverlay.getIcon()}setClickable(t){this.state.clickable=t}isClickable(){return this.state.clickable}setDraggable(t){this.state.draggable=t,t?this.innerOverlay.enableDragging():this.innerOverlay.disableDragging()}isDraggable(){return this.state.draggable}setZIndex(t){this.state.zIndex=t,this.innerOverlay.setZIndex(t||0)}getZIndex(){return this.state.zIndex}setLabel(t){const e=this.getLabel();e&&e.attachIcon(void 0),t&&t.attachIcon(this.innerOverlay.getIcon()),this.innerOverlay.setLabel(t==null?void 0:t.innerOverlay)}getLabel(){var t;return(t=this.innerOverlay.getLabel())==null?void 0:t.__label__}}class et extends He{constructor(){super(...arguments);d(this,"label");d(this,"labelPositionListener");d(this,"labelVisibleListener");d(this,"labelMapChangedListener")}static create(e){const i=this.coordType,n=e.icon,s={position:e.position.toGoogle(i),title:e.title,zIndex:e.zIndex,visible:e.visible,icon:n&&ve.toGoogle(n),clickable:e.clickable,draggable:e.draggable,crossOnDrag:e.crossOnDrag,cursor:e.cursor,anchorPoint:new google.maps.Point(0,0)};return new et(new google.maps.Marker(s),i,this)}getPosition(){return b.fromGoogle(this.innerOverlay.getPosition(),this.coordType)}setPosition(e){this.coordType=this.map.coordType,this.innerOverlay.setPosition(e.toGoogle(this.coordType))}setTitle(e){this.innerOverlay.setTitle(e)}getTitle(){return this.innerOverlay.getTitle()||""}setIcon(e){this.innerOverlay.setIcon(ve.toGoogle(e))}getIcon(){return this.innerOverlay.getIcon()}setClickable(e){this.innerOverlay.setClickable(e)}isClickable(){return this.innerOverlay.getClickable()}setDraggable(e){this.innerOverlay.setDraggable(e)}isDraggable(){return!!this.innerOverlay.getDraggable()}setZIndex(e){this.innerOverlay.setZIndex(e===void 0?null:e)}getZIndex(){const e=this.innerOverlay.getZIndex();return e===null?void 0:e}setLabel(e){if(this.label&&this.map.removeOverlay(this.label),this.labelPositionListener&&this.labelPositionListener.remove(),this.labelVisibleListener&&this.labelVisibleListener.remove(),this.labelMapChangedListener&&this.labelMapChangedListener.remove(),e){const i=()=>{e.innerOverlay.setPosition(this.innerOverlay.getPosition())},n=()=>{e.innerOverlay.setVisible(this.innerOverlay.getVisible())},s=()=>{this.innerOverlay.getMap()?this.map.addOverlay(e):this.map.removeOverlay(e)};s(),i(),n(),this.label=e,this.labelMapChangedListener=this.innerOverlay.addListener("map_changed",s),this.labelPositionListener=this.innerOverlay.addListener("position_changed",i),this.labelVisibleListener=this.innerOverlay.addListener("visible_changed",n)}else this.label=void 0,this.labelPositionListener=void 0,this.labelVisibleListener=void 0,this.labelMapChangedListener=void 0}}class tt extends z{constructor(){super(...arguments);d(this,"eventHubDelegate");d(this,"prevPath");d(this,"isDoingSetPath",!1);d(this,"onLineUpdate",()=>{var i;const e=this.innerOverlay.getPath();e!==this.prevPath&&(this.isDoingSetPath||(i=this.eventHubDelegate)==null||i.notify({type:this.pathEditedEventType,target:this,originalEvent:{prevPath:this.prevPath,path:e}}),this.prevPath=e)})}setPathInternal(e){this.isDoingSetPath=!0,this.innerOverlay.setPath(e),this.isDoingSetPath=!1}createDelegate(){return this.eventHubDelegate=new ke(super.createDelegate(),{types:[this.pathEditedEventType],onListen:()=>{this.prevPath=this.innerOverlay.getPath(),this.innerOverlay.addEventListener("lineupdate",this.onLineUpdate)},onCancel:()=>{this.innerOverlay.removeEventListener("lineupdate",this.onLineUpdate),this.prevPath=void 0}})}}class it extends tt{constructor(){super(...arguments);d(this,"pathEditedEventType","path-edited")}static create(e){var s,l;const i=this.coordType,n=new BMap.Polyline(e.path.map(u=>u.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+z.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,icons:(s=e.icons)==null?void 0:s.map(o.IconSequence.toBaidu)});return new it(n,i,this,{editable:!!e.editable,symbolIcons:(l=e.icons)==null?void 0:l.map(u=>u.icon)}).visibleOptionInternal(e.visible)}getPath(){return this.innerOverlay.getPath().map(e=>b.fromBaidu(e,this.coordType))}setPath(e){this.coordType=this.map.coordType,this.setPathInternal(e.map(i=>i.toBaidu(this.coordType)))}remove(){var e;super.remove(),(e=this.state.symbolIcons)!=null&&e.length&&this.map.innerMap.getOverlays().filter(n=>{var a;if(!(n instanceof BMap.Marker))return!1;const s=n;if(s.__create_by_tg__)return!1;const l=s.getIcon();if(!(l instanceof BMap.Symbol))return!1;const u=l;return u.__icon__?(a=this.state.symbolIcons)==null?void 0:a.includes(u.__icon__):!1}).forEach(n=>this.map.innerMap.removeOverlay(n))}}class rt extends Fe{constructor(){super(...arguments);d(this,"pathChangedListeners");d(this,"eventHubDelegate")}static create(e){var s;const i=this.coordType,n=new google.maps.Polyline({path:e.path.map(l=>l.toGoogle(i)),clickable:e.clickable,editable:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,visible:e.visible,icons:(s=e.icons)==null?void 0:s.map(o.IconSequence.toGoogle)});return new rt(n,i,this)}setupPathChangedListeners(){const e=()=>{var n;return(n=this.eventHubDelegate)==null?void 0:n.notify({type:"path-edited",target:this})},i=this.innerOverlay.getPath();this.pathChangedListeners=o.MVCArrays.listenChanged(i,e)}clearPathChangedListeners(){var e;(e=this.pathChangedListeners)==null||e.forEach(i=>i.remove()),this.pathChangedListeners=void 0}createDelegate(){return this.eventHubDelegate=new ke(super.createDelegate(),{types:["path-edited"],onListen:()=>this.setupPathChangedListeners(),onCancel:()=>this.clearPathChangedListeners()})}getPath(){const e=[];return this.innerOverlay.getPath().forEach(i=>{e.push(b.fromGoogle(i,this.coordType))}),e}setPath(e){var i;this.coordType=this.map.coordType,this.innerOverlay.setPath(e.map(n=>n.toGoogle(this.coordType))),(i=this.eventHubDelegate)!=null&&i.hasListener("path-edited")&&this.setupPathChangedListeners()}}class nt extends tt{constructor(){super(...arguments);d(this,"pathEditedEventType","paths-edited")}static create(e){const i=this.coordType;e.paths.length>1&&console.warn("baidu不支持多path, 只会显示paths[0]");const n=e.paths[0]||[],s=new BMap.Polygon(n.map(l=>l.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+z.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+z.OPACITY_DELTA:void 0});return new nt(s,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible)}getPaths(){return[this.innerOverlay.getPath().map(e=>b.fromBaidu(e,this.coordType))]}setPaths(e){e.length>1&&console.warn("baidu不支持多path, 只会显示paths[0]"),this.coordType=this.map.coordType,this.setPathInternal((e[0]||[]).map(i=>i.toBaidu(this.coordType)))}}class st extends Fe{constructor(){super(...arguments);d(this,"pathChangedListeners");d(this,"eventHubDelegate")}static create(e){const i=this.coordType,n=new google.maps.Polygon({paths:e.paths.map(s=>s.map(l=>l.toGoogle(i))),clickable:e.clickable,editable:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity,visible:e.visible});return new st(n,i,this)}setupPathChangedListeners(){const e=()=>{var n;return(n=this.eventHubDelegate)==null?void 0:n.notify({type:"paths-edited",target:this})},i=this.innerOverlay.getPaths();this.pathChangedListeners=[],i.forEach(n=>{this.pathChangedListeners.push(...o.MVCArrays.listenChanged(n,e))})}clearPathChangedListeners(){var e;(e=this.pathChangedListeners)==null||e.forEach(i=>i.remove()),this.pathChangedListeners=void 0}createDelegate(){return this.eventHubDelegate=new ke(super.createDelegate(),{types:["paths-edited"],onListen:()=>this.setupPathChangedListeners(),onCancel:()=>this.clearPathChangedListeners()})}getPaths(){const e=this.innerOverlay.getPaths(),i=[];return e.forEach(n=>{const s=[];i.push(s),n.forEach(l=>{s.push(b.fromGoogle(l,this.coordType))})}),i}setPaths(e){var i;this.coordType=this.map.coordType,this.innerOverlay.setPaths(e.map(n=>n.map(s=>s.toGoogle(this.coordType)))),(i=this.eventHubDelegate)!=null&&i.hasListener("paths-edited")&&this.setupPathChangedListeners()}}class ot extends tt{constructor(e,i,n,s){super(e,i,n,s);d(this,"pathEditedEventType","bounds-changed");d(this,"isDoingUpdateRectangle",!1);d(this,"onBoundsChanged",({originalEvent:e})=>{if(this.isDoingUpdateRectangle)return;const i=e.prevPath??[],n=e.path;setTimeout(()=>{let s=n;const l=n.length;if(i.length===4)if(l>i.length){for(let a=0;a<l;a++)if(i[a]==null||!Ti.equals(n[a],i[a])){const h=n[(a-2+l)%l],c=n[(a-1+l)%l],p=n[a],g=n[(a+1)%l],v=n[(a+2)%l];let M;c.lat===g.lat?M=new BMap.Point(c.lng,p.lat):c.lng===g.lng?M=new BMap.Point(p.lng,c.lat):M=p,s=[h,v,M];break}}else if(l===i.length){for(let a=0;a<l;a++)if(!Ti.equals(n[a],i[a])){s=[n[a],n[(a+2)%4]];break}}else l<i.length;const u=R.fromArray(s.map(a=>b.fromBaidu(a,this.coordType)));u&&(this.isDoingUpdateRectangle=!0,this.innerOverlay.setPath(u.toRectArray().map(a=>a.toBaidu(this.coordType))),this.isDoingUpdateRectangle=!1)},0)});this.addEventListener("bounds-changed",this.onBoundsChanged)}static create(e){const i=this.coordType,n=new BMap.Polygon(e.bounds.toRectArray().map(s=>s.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+z.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+z.OPACITY_DELTA:void 0});return new ot(n,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible)}getBounds(){return R.fromBaidu(this.innerOverlay.getBounds(),this.coordType)}setBounds(e){const i=e.toRectArray();this.innerOverlay.getPath().length===i.length?e.toRectArray().forEach((n,s)=>{this.innerOverlay.setPositionAt(s,n.toBaidu(this.coordType))}):this.setPathInternal(i.map(n=>n.toBaidu(this.coordType)))}}class at extends Fe{static create(t){const e=this.coordType,i=new google.maps.Rectangle({bounds:t.bounds.toGoogle(e),clickable:t.clickable,editable:t.editable,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,visible:t.visible});return new at(i,e,this)}getBounds(){return R.fromGoogle(this.innerOverlay.getBounds()??F.BOUNDS_ZERO,this.coordType)}setBounds(t){const e=t.toGoogle(this.coordType);e.equals(this.innerOverlay.getBounds())||this.innerOverlay.setBounds(e)}}const q=1;class zr extends je{constructor(e,i){var n;super(e);d(this,"buildInMapTypeId2BIMT");d(this,"baiduMapType2BIMT");d(this,"map");d(this,"createLabel",St.create);d(this,"createCircle",Ue.create);d(this,"createPolygon",nt.create);d(this,"createPolyline",it.create);d(this,"createRectangle",ot.create);d(this,"createInfoWindow",Ke.create);d(this,"createInfoBox",Je.create);d(this,"createMarker",se.create);d(this,"createMapTypeControl",Re.create);d(this,"createZoomControl",Ge.create);d(this,"createStreetViewControl",De.create);d(this,"createScaleControl",$e.create);this.buildInMapTypeId2BIMT=o.MapType.BUILD_IN_MAP_TYPES.getValueMap($.prototype.getId),this.baiduMapType2BIMT=o.MapType.BUILD_IN_MAP_TYPES.getValueMap($.prototype.asBaiduMapType),this.map=new BMap.Map(e,{minZoom:i.minZoom&&i.minZoom+q,maxZoom:i.maxZoom&&i.maxZoom+q,mapType:i.buildInMapTypeId&&((n=this.buildInMapTypeId2BIMT.get(i.buildInMapTypeId))==null?void 0:n.asBaiduMapType()),enableMapClick:!1}),this.map.centerAndZoom(i.center.toBaidu(this.coordType),i.zoom+q),this.setGestureHandling(i.gestureHandling),i.infoWindowMode==="multi"&&console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"),i.mapStyle&&this.map.setMapStyleV2(i.mapStyle.baidu),this.setEventTargetDelegate(new ee(this.map,this)),this.map.addEventListener("addoverlay",s=>{const l=s.target.__info_box__;l&&(console.debug("add:info-box",l),this.map.addOverlay(l))}),this.map.addEventListener("removeoverlay",s=>{const l=s.target.__info_box__;l&&(console.debug("remove:info-box",l),this.map.removeOverlay(l))})}setGestureHandling(e=W.auto){switch(e===W.auto&&(e=this.element.parentElement&&yt.isScrollable(this.element.parentElement)?W.cooperative:W.greedy),e){case W.cooperative:this.map.disableScrollWheelZoom(),this.map.enableDragging(),this.map.enableDoubleClickZoom();break;case W.greedy:this.map.enableScrollWheelZoom(),this.map.enableDragging(),this.map.enableDoubleClickZoom();break;case W.none:this.map.disableDragging(),this.map.disableScrollWheelZoom(),this.map.disableDoubleClickZoom();break}}get innerMap(){return this.map}get coordType(){return this.getMapType().getBaiduCoordType()}addEventListener(e,i){if(e==="center-changed"){super.addEventListener("movestart",i),super.addEventListener("moving",i),super.addEventListener("moveend",i),super.addEventListener("zoomend",i);return}super.addEventListener(e,i)}removeEventListener(e,i){if(e==="center-changed"){super.removeEventListener("movestart",i),super.removeEventListener("moving",i),super.removeEventListener("moveend",i),super.removeEventListener("zoomend",i);return}super.removeEventListener(e,i)}fromContainerPointToLatLng(e){return b.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x,e.y)),this.coordType)}fromLatLngToContainerPoint(e){return this.innerMap.pointToPixel(e.toBaidu(this.coordType))}setDefaultCursor(e){this.innerMap.setDefaultCursor(e)}setDraggable(e){e?this.innerMap.enableDragging():this.innerMap.disableDragging()}setDoubleClickZoom(e){e?this.map.enableDoubleClickZoom():this.map.disableDoubleClickZoom()}getCenter(){return b.fromBaidu(this.map.getCenter(),this.coordType)}setCenter(e){this.map.setCenter(e.toBaidu(this.coordType))}getZoom(){return super.getZoom()-q}setZoom(e){return super.setZoom(e+q)}setMinZoom(e){this.map.setMinZoom(e+q)}setMaxZoom(e){this.map.setMaxZoom(e+q)}setMapStyle(e){this.map.setMapStyleV2((e==null?void 0:e.baidu)??{styleJson:[]})}setBuildInMapTypeId(e){var n;const i=(n=this.buildInMapTypeId2BIMT.get(e))==null?void 0:n.asBaiduMapType();this.map.setMapType(i??E("理论上来说不可能为空"))}setMapType(e){this.map.setMapType(e.asBaiduMapType())}getMapType(){const e=this.map.getMapType(),i=this.baiduMapType2BIMT.get(e);return i||(e.__baidu_map_type__??E("实现asBaiduMapType()时, 忘了给实例设置__baidu_map_type__?"))}addLayer(e){this.map.addTileLayer(e.asBaiduLayer())}removeLayer(e){this.map.removeTileLayer(e.asBaiduLayer())}panTo(e){this.map.panTo(e.toBaidu(this.coordType))}panBy(e,i){this.map.panBy(e,i)}fitBounds(e,i){this.map.setViewport(e.toBaiduArray(this.coordType),{margins:i&&[i.top,i.right,i.bottom,i.left]})}getBounds(){return R.fromBaidu(this.map.getBounds(),this.coordType)}addElementOverlay(e){this.map.addOverlay(e.asBaidu())}removeElementOverlay(e){this.map.removeOverlay(e.asBaidu())}addOverlay(e){this.map.addOverlay(e.innerOverlay)}removeOverlay(e){this.map.removeOverlay(e.innerOverlay)}addCustomControl(e){if(!e.inner){const i=class extends BMap.Control{constructor(){super(...arguments);d(this,"defaultAnchor",o.ControlPositionConverter.getBaidu().toValue(e.position));d(this,"defaultOffset",new BMap.Size(0,0))}initialize(s){const l=e.onCreateElement();return s.getContainer().appendChild(l),l}};e.inner=new i,this.map.addControl(e.inner)}}removeCustomControl(e){e.inner&&(U(e.inner instanceof BMap.Control,`control.inner(${e.inner})需要是BMap.Control`),this.map.removeControl(e.inner))}createMarkerClusterer(e){return new ai(this,e)}createAutocomplete(e){return new ti(this,e)}createSearchBox(e){return new ui(this,e)}createPlacesService(e){return new ci(this,e)}createMapUrls(e){return new me(e)}}class Dr extends je{constructor(e,i){var s,l;super(e);d(this,"buildInMapTypeId2BIMT");d(this,"googleMapTypeId2BIMT");d(this,"map");d(this,"createLabel",kt.create);d(this,"createCircle",Ye.create);d(this,"createPolygon",st.create);d(this,"createPolyline",rt.create);d(this,"createRectangle",at.create);d(this,"createInfoWindow",Xe.create);d(this,"createInfoBox",Qe.create);d(this,"createMarker",et.create);d(this,"createMapTypeControl",ue.create);d(this,"createZoomControl",Ze.create);d(this,"createStreetViewControl",Ne.create);d(this,"createScaleControl",ze.create);this.mapOptions=i,this.buildInMapTypeId2BIMT=o.MapType.BUILD_IN_MAP_TYPES.getValueMap($.prototype.getId),this.googleMapTypeId2BIMT=o.MapType.BUILD_IN_MAP_TYPES.getValueMap($.prototype.getGoogleMapTypeId);const n=i.buildInMapTypeId&&this.buildInMapTypeId2BIMT.get(i.buildInMapTypeId);this.map=new google.maps.Map(e,{center:i.center.toGoogle((n??o.MapType.NORMAL).getGoogleCoordType()),zoom:i.zoom,disableDefaultUI:!0,gestureHandling:i.gestureHandling,minZoom:i.minZoom,maxZoom:i.maxZoom,styles:(s=i.mapStyle)==null?void 0:s.google.styles,mapId:(l=i.mapStyle)==null?void 0:l.google.mapId,mapTypeId:n==null?void 0:n.getGoogleMapTypeId()}),this.setEventTargetDelegate(new Y(this.map,this))}setGestureHandling(e){this.map.setOptions({gestureHandling:e})}get innerMap(){return this.map}get coordType(){return this.getMapType().getGoogleCoordType()}fromContainerPointToLatLng(e){const i=this.innerMap.getProjection(),n=this.innerMap.getBounds();if(i==null||n==null)return b.ZERO;const s=i.fromLatLngToPoint(n.getSouthWest()),l=i.fromLatLngToPoint(n.getNorthEast()),u=this.innerMap.getZoom();if(s==null||l==null||u==null)return b.ZERO;const a=Math.pow(2,u),h=new google.maps.Point(e.x/a+s.x,e.y/a+l.y);return b.fromGoogle(i.fromPointToLatLng(h)??F.LATLNG_ZERO,this.coordType)}fromLatLngToContainerPoint(e){const i=this.innerMap.getProjection(),n=this.innerMap.getBounds();if(i==null||n==null)return o.Point.ZERO;const s=i.fromLatLngToPoint(n.getSouthWest()),l=i.fromLatLngToPoint(n.getNorthEast()),u=this.innerMap.getZoom();if(s==null||l==null||u==null)return o.Point.ZERO;const a=Math.pow(2,u),h=i.fromLatLngToPoint(e.toGoogle(this.coordType));return h==null?o.Point.ZERO:{x:(h.x-s.x)*a,y:(h.y-l.y)*a}}setDefaultCursor(e){this.innerMap.setOptions({draggableCursor:e})}setDraggable(e){this.innerMap.setOptions({draggable:e})}setDoubleClickZoom(e){this.map.setOptions({disableDoubleClickZoom:!e})}getCenter(){return b.fromGoogle(this.map.getCenter()??F.LATLNG_ZERO,this.coordType)}setCenter(e){this.map.setCenter(e.toGoogle(this.coordType))}setMinZoom(e){this.map.setOptions({minZoom:e})}setMaxZoom(e){this.map.setOptions({maxZoom:e})}setMapStyle(e){this.map.setOptions({styles:e==null?void 0:e.google.styles,mapId:e==null?void 0:e.google.mapId})}setBuildInMapTypeId(e){var n;const i=(n=this.buildInMapTypeId2BIMT.get(e))==null?void 0:n.getGoogleMapTypeId();this.map.setMapTypeId(i??E("理论上来说不可能为空"))}setMapType(e){e instanceof $?this.map.setMapTypeId(e.getGoogleMapTypeId()):(this.map.mapTypes.set(e.id,e.asGoogleMapType()),this.map.setMapTypeId(e.id))}getMapType(){const e=this.map.getMapTypeId()??google.maps.MapTypeId.ROADMAP,i=this.googleMapTypeId2BIMT.get(e);return i||(this.map.mapTypes.get(e).__google_map_type__??E(`实现${e}的asGoogleMapType()时, 忘了给实例设置__google_map_type__?`))}addOverlayMapType(e){this.map.overlayMapTypes.push(e.asGoogleMapType())}removeOverlayMapType(e){o.MVCArrays.remove(this.map.overlayMapTypes,e.asGoogleMapType())}addLayer(e){e.asGoogleLayer().setMap(this.map)}removeLayer(e){e.asGoogleLayer().setMap(null)}panTo(e){this.map.panTo(e.toGoogle(this.coordType))}panBy(e,i){this.map.panBy(e,i)}fitBounds(e,i){this.map.fitBounds(e.toGoogle(this.coordType),i)}getBounds(){const e=this.map.getBounds();return e?R.fromGoogle(e,this.coordType):R.EMPTY}addElementOverlay(e){e.asGoogle().setMap(this.map)}removeElementOverlay(e){e.asGoogle().setMap(null)}addOverlay(e){e.innerOverlay.setMap(this.map)}removeOverlay(e){e.innerOverlay.setMap(null)}addCustomControl(e){e.inner||(e.inner=e.onCreateElement(),this.map.controls[o.ControlPositionConverter.getGoogle().toValue(e.position)].push(e.inner))}removeCustomControl(e){if(e.inner){const i=this.map.controls[o.ControlPositionConverter.getGoogle().toValue(e.position)];o.MVCArrays.remove(i,e.inner)}}createMarkerClusterer(e){return new li(this,e)}createAutocomplete(e){return new ei(this,e)}createSearchBox(e){return new di(this,e)}createPlacesService(e){return new hi(this,e)}createMapUrls(e){return new ge(e)}}const lt=["3.0"],Nr={baidu:{version:"3.0",key:"kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"},google:{version:"quarterly",key:"AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",language:"en-us",libraries:["places"]},here:{version:lt[0],key:""}};let wi;function At(){return wi||E("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})")}function Ei(r){r!=null&&(wi=fi(Nr,r))}class Gr extends je{constructor(e,i){var l;super(e);d(this,"map");d(this,"defaultLayers");this.mapOptions=i;const n=At().here;lt.includes(n.version)||E(`不支持${n.version}, HereMap当前只支持如下版本: ${lt}`);const s=new H.service.Platform({app_id:n.key.split(",")[0],app_code:n.key.split(",")[1]});this.defaultLayers=s.createDefaultLayers(),this.map=new H.Map(e,this.defaultLayers.normal.map,{zoom:i.zoom,center:(l=i.center)==null?void 0:l.toHere(this.coordType)}),new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map)),H.ui.UI.createDefault(this.map,this.defaultLayers)}get innerMap(){return this.map}get coordType(){return I.wgs84}getCenter(){return b.fromHere(this.map.getCenter(),this.coordType)}setCenter(e){this.map.setCenter(e.toHere(this.coordType))}setGestureHandling(e){throw new Error("Method not implemented.")}fromContainerPointToLatLng(e){throw new Error("Method not implemented.")}fromLatLngToContainerPoint(e){throw new Error("Method not implemented.")}setDefaultCursor(e){throw new Error("Method not implemented.")}setDraggable(e){throw new Error("Method not implemented.")}setDoubleClickZoom(e){throw new Error("Method not implemented.")}setMinZoom(e){throw new Error("Method not implemented.")}setMaxZoom(e){throw new Error("Method not implemented.")}setMapStyle(e){throw new Error("Method not implemented.")}setBuildInMapTypeId(e){throw new Error("Method not implemented.")}setMapType(e){throw new Error("Method not implemented.")}getMapType(){throw new Error("Method not implemented.")}addLayer(e){throw new Error("Method not implemented.")}removeLayer(e){throw new Error("Method not implemented.")}panTo(e){throw new Error("Method not implemented.")}panBy(e,i){throw new Error("Method not implemented.")}fitBounds(e,i){throw new Error("Method not implemented.")}getBounds(){throw new Error("Method not implemented.")}addElementOverlay(e){throw new Error("Method not implemented.")}removeElementOverlay(e){throw new Error("Method not implemented.")}addOverlay(e){throw new Error("Method not implemented.")}removeOverlay(e){throw new Error("Method not implemented.")}createMarker(e){throw new Error("Method not implemented.")}createMarkerClusterer(e){throw new Error("Method not implemented.")}createAutocomplete(e){throw new Error("Method not implemented.")}createSearchBox(e){throw new Error("Method not implemented.")}createPlacesService(e){throw new Error("Method not implemented.")}createMapUrls(e){throw new Error("Method not implemented.")}createInfoWindow(e){throw new Error("Method not implemented.")}createInfoBox(e){throw new Error("Method not implemented.")}createPolyline(e){throw new Error("Method not implemented.")}createPolygon(e){throw new Error("Method not implemented.")}createRectangle(e){throw new Error("Method not implemented.")}createCircle(e){throw new Error("Method not implemented.")}createLabel(e){throw new Error("Method not implemented.")}addCustomControl(e){throw new Error("Method not implemented.")}removeCustomControl(e){throw new Error("Method not implemented.")}createMapTypeControl(e){throw new Error("Method not implemented.")}createZoomControl(e){throw new Error("Method not implemented.")}createStreetViewControl(e){throw new Error("Method not implemented.")}createScaleControl(e){throw new Error("Method not implemented.")}}var Z=(r=>(r.google="google",r.baidu="baidu",r.here="here",r))(Z||{});o.TgMapFactory=void 0,(r=>{function t(e,i,n){const s=o.MapOptions.create(n);switch(e){case"google":return new Dr(i,s);case"baidu":return new zr(i,s);case"here":return new Gr(i,s)}}r.createMap=t})(o.TgMapFactory||(o.TgMapFactory={}));const Zr={};function Pi(r){return o.Objects.putIfAbsent(Zr,r,()=>Wt(()=>Wr({type:r,config:At()[r]})))()}function Wr({type:r,config:t}){const e=window,i=Vr(r);if(o.Objects.get(e,i))return Promise.resolve();switch(r!==Z.here&&!t.key&&E(`请先配置${r}地图的key`),r){case Z.google:return{}.VITE_FALSE?(cr({key:t.key,v:"3.52"}),google.maps.importLibrary("core")):Li(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);case Z.baidu:return Li(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);case Z.here:return be(_e("core",t.version)).then(()=>Promise.all([be(_e("service",t.version)),be(_e("mapevents",t.version)),be(_e("clustering",t.version)),be(_e("ui",t.version))])).catch(n=>(o.Objects.del(e,i),Promise.reject(n)));default:Pe(r)}}function _e(r,t=lt[0]){return`https://js.api.here.com/v3/${t}/mapsjs-${r}.js`}function Vr(r){switch(r){case Z.google:return"google.maps";case Z.baidu:return"BMap";case Z.here:return"H"}}let jr=0;function Li(r,t="callback"){return new Promise((e,i)=>{const n=`__callback${jr++}`;window[n]=e;const s=document.createElement("script");s.src=`${r}&${t}=${n}`,s.onerror=i,document.body.appendChild(s)})}function be(r){return new Promise((t,e)=>{const i=document.createElement("script");i.src=r,i.onload=t,i.onerror=e,document.body.appendChild(i)})}function D(r,t){return{type:String,default:t,validator:e=>Object.values(r).includes(e)}}function Bi(r,t){return{type:String,default:t,validator:e=>r.includes(e)}}function N(r){return{type:r,required:!0}}function y(r,t){return{type:r,default:t}}function Hr(r){const t={};return Object.entries(r).forEach(([e,i])=>{const n=`__${e}`;t[e]={get(){const s=this[n];return s===void 0?i:s},set(s){this[n]=s}}}),t}const Me={enumerable:!0,configurable:!0,get:Q,set:Q};function Ii(r){return Object.keys(r).forEach(t=>{const e=r[t];let i=!1;typeof e=="function"?(Me.get=e,Me.set=Q,i=!0):typeof e=="object"&&typeof e.get=="function"&&(Me.get=e.get,Me.set=e.set,i=!0),i&&(r[t]=Object.defineProperty(r,t,Me))}),r}function Fr(r){return Ii(r)}function ht(){return m.createCommentVNode()}function Te(r,t){const e=r.$options[t];if(e)for(const i of e)i.call(r)}function Ur(r,t){for(const e of r)if(e.$options.name===t.name)return e}function Yr(r,t){if(!r.default)return;const e=r.default();for(const i of e)if((i==null?void 0:i.type).name===t.name)return i}function Si(r,t){const e={},i={},n={};return Object.keys(r).forEach(s=>{s.startsWith("on")?e[o.Strings.pascal2kebab(s.substring(2))]=r[s]:i[s]=r[s]}),t&&Object.keys(t).forEach(s=>{s.startsWith("on")&&(n[o.Strings.pascal2kebab(s.substring(2))]=t[s])}),{binds:i,listeners:e,listenerProps:n}}function V(r,t){return m.computed(()=>Si(r,t))}function B(){return Function}const qr=()=>{let r,t;function e(n){console.log(n),r=n&&n.type,t=Date.now()}function i(n){((n&&n.type)!==r||Date.now()-(t??0)>1e3)&&e(n)}return{eventLog:e,eventLogLess:i}},ct="$map",oe="onCreate",ae="onDestroy",k=m.defineComponent({inject:[ct],mounted(){Te(this,oe)},beforeUnmount(){Te(this,ae)},methods:{recreate(){Te(this,ae),Te(this,oe)}},render(){return ht()}}),Kr=m.defineComponent({name:"tg-map",provide(){return{[ct]:m.computed(()=>this.map)}},inheritAttrs:!1,props:{type:D(Z,Z.google),center:N(b),centerSyncDelay:y(Number,300),currentCenter:y(b),lastCenter:y(b),zoom:N(Number),infoWindowMode:Bi(bi),gestureHandling:D(W),minZoom:y(Number),maxZoom:y(Number),mapStyle:y(Object),mapTypeId:D(_t),mapType:y(Object),hideLogo:y(Boolean),onLoad:B(),"onUpdate:center":B(),"onUpdate:current-center":B(),"onUpdate:last-center":B(),"onUpdate:map-type":B(),"onUpdate:map-type-id":B(),"onUpdate:zoom":B(),onError:B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),centerSyncTimeoutId:void 0}},data(){return{map:Le(),isDestroyed:!1}},computed:{propsJson(){return o.Objects.toJsonSafely(this.$props)}},watch:{gestureHandling(r){var t;r&&((t=this.map)==null||t.setGestureHandling(r))},minZoom(r){var t;(t=this.map)==null||t.setMinZoom(r)},maxZoom(r){var t;(t=this.map)==null||t.setMaxZoom(r)},mapStyle(r){var t;(t=this.map)==null||t.setMapStyle(r)},mapTypeId(r){var t;r&&((t=this.map)==null||t.setBuildInMapTypeId(r))},mapType(r){var t;(t=this.map)==null||t.setMapType(r??o.MapType.NORMAL)}},async mounted(){const r=this.type;try{await Pi(r)}catch(n){this.$emit("error",n);return}if(this.isDestroyed){console.warn(`tg-map(type=${r})已销毁, 不需要继续执行`);return}const t=o.TgMapFactory.createMap(r,this.$refs.map,{center:this.center,zoom:this.zoom,infoWindowMode:this.infoWindowMode,gestureHandling:this.gestureHandling,minZoom:this.minZoom,maxZoom:this.maxZoom,mapStyle:this.mapStyle,buildInMapTypeId:this.mapTypeId});if(this.map=m.markRaw(t),this.mapType&&t.setMapType(this.mapType),"ready"in this.attrs.listeners&&console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"),S(this.attrs.listeners,t,["load"]),this.$emit("load",t),m.watch([()=>this.zoom,()=>this.center],([n,s],[l,u])=>{n!==l&&t.setZoom(n),s!==u&&(t.getCenter().equals(s)||t.setCenter(s))}),"update:center"in this.attrs.listenerProps){const n=()=>this.$emit("update:center",t.getCenter());t.addEventListener("center-changed",()=>{this.centerSyncDelay>0?(clearTimeout(this.centerSyncTimeoutId),this.centerSyncTimeoutId=setTimeout(n,this.centerSyncDelay)):n()})}"update:current-center"in this.attrs.listenerProps&&(this.$emit("update:current-center",this.center),t.addEventListener("center-changed",()=>{this.$emit("update:current-center",t.getCenter())})),"update:zoom"in this.attrs.listenerProps&&t.addEventListener("zoom-changed",()=>{this.$emit("update:zoom",t.getZoom())});const e="update:map-type"in this.attrs.listenerProps,i="update:map-type-id"in this.attrs.listenerProps;(e||i)&&t.addEventListener("map-type-changed",()=>{const n=t.getMapType();e&&this.$emit("update:map-type",n),i&&this.$emit("update:map-type-id",n.id)})},unmounted(){this.isDestroyed=!0,this.map&&("update:last-center"in this.attrs.listenerProps&&this.$emit("update:last-center",this.map.getCenter()),"update:center"in this.attrs.listenerProps&&(clearTimeout(this.centerSyncTimeoutId),this.$emit("update:center",this.map.getCenter())))},methods:{}}),In="",j=(r,t)=>{const e=r.__vccOpts||r;for(const[i,n]of t)e[i]=n;return e};function Xr(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:"tg-map"},r.attrs.binds),[m.createElementVNode("div",{ref:"map",class:m.normalizeClass({"tg-map__map":!0,[`tg-map__map--hide-logo-${r.type}`]:r.hideLogo})},null,2),m.createCommentVNode("",!0),r.map?m.renderSlot(r.$slots,"default",{key:1}):m.createCommentVNode("",!0),m.renderSlot(r.$slots,"overlay")],16)}const le=j(Kr,[["render",Xr]]);function Jr(r){if(r==null)return;let t;if(typeof r=="string"){if(t=+r,Number.isNaN(t))return r}else t=r;return`${t}px`}const Qr=m.defineComponent({name:"tg-map-widget",props:{left:{type:[Number,String],default:null},top:{type:[Number,String],default:null},right:{type:[Number,String],default:null},bottom:{type:[Number,String],default:null}},computed:{topValue(){return this.top==null&&this.bottom==null?0:this.top}},methods:{dimen:Jr}}),Sn="";function en(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(r.$options.name),style:m.normalizeStyle({left:r.dimen(r.left),top:r.dimen(r.topValue),right:r.dimen(r.right),bottom:r.dimen(r.bottom)})},[m.renderSlot(r.$slots,"default")],6)}const ki=j(Qr,[["render",en]]),tn=m.defineComponent({name:"tg-custom-control",mixins:[k],props:{position:D(L,L.RIGHT_BOTTOM)},setup(){return{control:void 0}},watch:{position(){this.recreate()}},onCreate(){mt(this.$parent,le)||console.warn("请将tg-custom-control放到tg-map中");const{$el:r}=this,t=class extends Yt{onCreateElement(){return r}};this.control=new t(this.position),this.$map.addCustomControl(this.control)},onDestroy(){this.$map.removeCustomControl(this.control)}}),kn="";function rn(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(r.$options.name)},[m.renderSlot(r.$slots,"default")],2)}const Ai=j(tn,[["render",rn]]),xi=m.defineComponent({name:"tg-map-type-control",mixins:[k],props:{position:D(L,L.TOP_LEFT),type:D(bt),mapTypes:y(Array)},setup(){return{control:void 0}},watch:{position(r){this.control.setPosition(r)},type(){this.recreate()},mapTypes:{handler(){this.recreate()},deep:!0}},onCreate(){this.control=this.$map.createMapTypeControl(this),this.$map.addControl(this.control)},onDestroy(){this.$map.removeControl(this.control)}}),Ri=m.defineComponent({name:"tg-scale-control",mixins:[k],props:{position:D(L,L.BOTTOM_RIGHT)},setup(){return{control:void 0}},watch:{position(r){this.control.setPosition(r)}},onCreate(){this.control=this.$map.createScaleControl(this),this.$map.addControl(this.control)},onDestroy(){this.$map.removeControl(this.control)}});function $i(){var e;const r=(e=m.getCurrentInstance())==null?void 0:e.type;let t=(r==null?void 0:r.name)??(r==null?void 0:r.__name);if(!t){const i=r==null?void 0:r.__file;i&&(t=Ci.basename(i,".vue"))}return t}function xt(){const r=m.inject(ct);let t,e;return r==null&&E(`<${$i()||"unknown"}>必须作为<tg-map>的子代组件`),{mapRef:r,get map(){return r.value??E("map尚未初始化")},[oe](i){m.onMounted(i),t&&E(`${oe}只能调用一次`),t=i},[ae](i){m.onBeforeUnmount(i),e&&E(`${ae}只能调用一次`),e=i},recreate(){e==null||e(),t==null||t()}}}const zi=m.defineComponent({name:"tg-street-view-control",props:{position:D(L,L.RIGHT_BOTTOM)},setup(r){let t=void 0;const{map:e,onCreate:i,onDestroy:n}=xt();return i(()=>{t=e.createStreetViewControl(r),e.addControl(t)}),n(()=>{e.removeControl(t)}),m.watch(()=>r.position,s=>{t.setPosition(s)}),ht}}),Di=m.defineComponent({name:"tg-zoom-control",props:{position:D(L,L.RIGHT_BOTTOM)},setup(r){let t=void 0;const{map:e,onCreate:i,onDestroy:n}=xt();return i(()=>{t=e.createZoomControl(r),e.addControl(t)}),n(()=>{e.removeControl(t)}),m.watch(()=>r.position,s=>{t.setPosition(s)}),ht}}),nn=m.defineComponent({name:"tg-marker-clusterer",mixins:[k],props:{gridSize:y(Number),maxZoom:y(Number),minClusterSize:y(Number),averageCenter:y(Boolean),styles:y(Array),stylesIndexCalculator:y(Function),zIndex:y(Number)},setup(){return{clusterer:void 0,markers:[]}},watch:{gridSize(){this.recreate()},maxZoom(){this.recreate()},minClusterSize(){this.recreate()},averageCenter(){this.recreate()},styles:{handler(){this.recreate()},deep:!0},stylesIndexCalculator(){this.recreate()},zIndex(){this.recreate()}},onCreate(){this.clusterer=this.$map.createMarkerClusterer(this)},onDestroy(){this.clusterer.clearMarkers()},methods:{isInitiated(){return this.clusterer!=null},onAddMarker(r){this.markers.push(r),this.isInitiated()&&this.clusterer.addMarker(r)},onRemoveMarker(r){this.isInitiated()&&this.clusterer.removeMarker(r),o.Arrays.remove(this.markers,r)}}});function sn(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(r.$options.name)},[m.renderSlot(r.$slots,"default")],2)}const Rt=j(nn,[["render",sn]]),Ni=m.defineComponent({name:"tg-traffic-layer",mixins:[k],setup(){return{layer:void 0}},watch:{},onCreate(){this.layer=new Kt,this.$map.addLayer(this.layer)},onDestroy(){this.$map.removeLayer(this.layer)}}),Gi=m.defineComponent({name:"tg-circle",mixins:[k],inheritAttrs:!1,props:{center:N(b),radius:N(Number),clickable:y(Boolean),editable:y(Boolean),strokeColor:y(String),strokeOpacity:y(Number),strokeWeight:y(Number),visible:y(Boolean),fillColor:y(String),fillOpacity:y(Number),"onUpdate:center":B(),"onUpdate:radius":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0,emittedRadius:void 0,emittedCenter:void 0}},watch:{center(r){if(this.emittedCenter!=null){const t=this.emittedCenter;if(this.emittedCenter=void 0,t===m.toRaw(r))return}this.overlay.setCenter(r)},radius(r){if(this.emittedRadius!=null){const t=this.emittedRadius;if(this.emittedRadius=void 0,t===r)return}this.overlay.setRadius(r)},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createCircle(this),this.$map.addOverlay(this.overlay),S(this.attrs.listeners,this.overlay),"update:center"in this.attrs.listenerProps&&this.overlay.addEventListener("center-changed",()=>{this.$emit("update:center",this.emittedCenter=this.overlay.getCenter())}),"update:radius"in this.attrs.listenerProps&&this.overlay.addEventListener("radius-changed",()=>{this.$emit("update:radius",this.emittedRadius=this.overlay.getRadius())})},onDestroy(){this.$map.removeOverlay(this.overlay)}});class on extends Oi{constructor(t,e,i,n){super(t,e),this.content=i,this.position=n}onCreate(){return this.content}onDraw(t){const e=t.fromLatLngToOverlayPoint(this.position);this.content.style.left=e.x+"px",this.content.style.top=e.y+"px"}setPosition(t){this.position=t,this.draw()}}const an=m.defineComponent({name:"tg-element-overlay",mixins:[k],props:{mapPane:D(re,re.overlayMouseTarget),position:N(b)},setup(){return{overlay:void 0}},watch:{position(r){this.overlay.setPosition(r)},mapPane(){this.recreate()}},methods:{content(){return this.$el}},onCreate(){this.overlay=new on(this.$map,this,this.content(),this.position),this.$map.addElementOverlay(this.overlay)},onDestroy(){this.$map.removeElementOverlay(this.overlay)}}),An="";function ln(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:r.$options.name},r.$attrs),[m.renderSlot(r.$slots,"default")],16)}const Zi=j(an,[["render",ln]]),hn=m.defineComponent({name:"tg-marker",mixins:[k],inheritAttrs:!1,props:{position:N(b),title:y(String),icon:y(Object),clickable:y(Boolean),draggable:y(Boolean),crossOnDrag:y(Boolean),cursor:y(String),zIndex:y(Number),visible:y(Boolean),normalizePositionForBaidu:y(Boolean),autoAddToClusterer:y(Boolean,!0),"onUpdate:position":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),marker:void 0,label:Le(),info:Le(),emittedPosition:void 0,autoAddToClustererWhenCreate:r.autoAddToClusterer}},watch:{position(r){if(this.emittedPosition!=null){const t=this.emittedPosition;if(this.emittedPosition=void 0,t===m.toRaw(r))return}this.marker.setPosition(r)},title(r){this.marker.setTitle(r)},icon(r){r?this.marker.setIcon(r):this.recreate()},clickable(r){this.marker instanceof se?this.recreate():this.marker.setClickable(r)},draggable(r){this.marker.setDraggable(r)},crossOnDrag(){this.recreate()},cursor(){this.recreate()},zIndex(r){this.marker instanceof se?this.recreate():this.marker.setZIndex(r)},visible(r){this.marker.setVisible(r)},normalizePositionForBaidu(){this.recreate()},autoAddToClusterer(){this.recreate()}},onCreate(){this.marker=this.$map.createMarker(this),this.label&&this.marker.setLabel(this.label.overlay),this.$clusterer()&&this.autoAddToClusterer?this.$clusterer().onAddMarker(this.marker):this.$map.addOverlay(this.marker),this.autoAddToClustererWhenCreate=this.autoAddToClusterer,this.info&&this.info.show&&this.info.overlay.open(this.marker),S(this.attrs.listeners,this.marker),"update:position"in this.attrs.listenerProps&&this.marker.addEventListener("dragend",r=>{this.$emit("update:position",this.emittedPosition=r.position)})},onDestroy(){this.$clusterer()&&this.autoAddToClustererWhenCreate?this.$clusterer().onRemoveMarker(this.marker):this.$map.removeOverlay(this.marker)},methods:{$clusterer(){return mt(this.$parent,Rt)},onAddLabel(r){this.label=r,this.marker&&this.marker.setLabel(r.overlay)},onRemoveLabel(r){this.marker.setLabel(void 0),this.label=void 0},onAddInfo(r){this.info=r,this.marker&&r.show&&r.overlay.open(this.marker)},onRemoveInfo(r){r.overlay.close(),this.info=void 0},onInfoShowChanged(r,t){t?r.overlay.open(this.marker):r.overlay.close()}}});function cn(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:r.$options.name},r.attrs.binds),[m.renderSlot(r.$slots,"default")],16)}const Ce=j(hn,[["render",cn]]),dn=m.defineComponent({name:"tg-info-box",mixins:[k],inheritAttrs:!1,props:{show:N(Boolean),position:y(b),offset:y(Object),maxWidth:y(Number),borderClass:y(String),zIndex:y(Number),"onUpdate:show":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0}},watch:{show(r){this.$marker()?this.$marker().onInfoShowChanged(this,r):r?this.overlay.open():this.overlay.close()},position(r){this.overlay.setPosition(r)},offset(){this.recreate()},maxWidth(r){this.overlay.setMaxWidth(r)},borderClass(){this.recreate()},zIndex(r){this.overlay.setZIndex(r)}},onCreate(){this.overlay=this.$map.createInfoBox(this.getOptions()),this.$marker()?this.$marker().onAddInfo(this):this.show&&this.overlay.open(),"update:show"in this.attrs.listenerProps&&this.overlay.addEventListener("closeclick",()=>{this.$emit("update:show",!1)}),S(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveInfo(this):this.overlay.close()},methods:{getOptions(){return{content:this.content(),position:this.position,offset:this.offset,zIndex:this.zIndex,maxWidth:this.maxWidth,borderClass:this.borderClass}},content(){return this.$el},$marker(){return Ie(Ce,this.$parent,le)},open(r){this.overlay.open(r)},close(){this.overlay.close()}}}),xn="";function un(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:r.$options.name},r.attrs.binds),[m.renderSlot(r.$slots,"default")],16)}const Wi=j(dn,[["render",un]]),pn=m.defineComponent({name:"tg-info-window",mixins:[k],inheritAttrs:!1,props:{show:N(Boolean),position:y(b),maxWidth:y(Number),offset:y(Object),disableAutoPan:y(Boolean),"onUpdate:show":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0}},watch:{show(r){this.$marker()?this.$marker().onInfoShowChanged(this,r):r?this.overlay.open():this.overlay.close()},position(r){this.overlay.setPosition(r)},maxWidth(){this.recreate()},offset(){this.recreate()},disableAutoPan(){this.recreate()}},methods:{content(){return this.$el},$marker(){return Ie(Ce,this.$parent,le)},getOptions(){return{content:this.content(),position:this.position,maxWidth:this.maxWidth,offset:this.offset,disableAutoPan:this.disableAutoPan}}},onCreate(){this.overlay=this.$map.createInfoWindow(this.getOptions()),this.$marker()?this.$marker().onAddInfo(this):this.show&&this.overlay.open(),this.overlay.addEventListener("open",()=>{this.$emit("update:show",!0)}),this.overlay.addEventListener("close",()=>{this.$emit("update:show",!1)}),S(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveInfo(this):this.overlay.close()}});function gn(r,t,e,i,n,s){return m.withDirectives((m.openBlock(),m.createElementBlock("div",m.mergeProps({class:r.$options.name},r.attrs.binds),[m.renderSlot(r.$slots,"default")],16)),[[m.vShow,r.show]])}const Vi=j(pn,[["render",gn]]),mn=m.defineComponent({name:"tg-label",mixins:[k],inheritAttrs:!1,props:{position:y(b),offset:y(Object),zIndex:y(Number),mapPane:D(re)},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t),overlay:void 0}},watch:{position(r){this.overlay.setPosition(r)},offset(r){this.overlay.setOffset(r)},zIndex(r){this.overlay.setZIndex(r)},visible(r){this.overlay.setVisible(r)},mapPane(){this.recreate()}},methods:{content(){return this.$el},marker(){var r;return(r=this.$marker())==null?void 0:r.marker},$marker(){return Ie(Ce,this.$parent,le)},getOptions(){return{content:this.content(),position:this.position,offset:this.offset,zIndex:this.zIndex,mapPane:this.mapPane}}},onCreate(){this.overlay=this.$map.createLabel(this.getOptions()),this.$marker()?this.$marker().onAddLabel(this):this.$map.addOverlay(this.overlay),S(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveLabel(this):this.$map.removeOverlay(this.overlay)}}),Rn="";function fn(r,t,e,i,n,s){return m.openBlock(),m.createElementBlock("div",m.mergeProps({class:r.$options.name},r.attrs.binds),[m.renderSlot(r.$slots,"default")],16)}const ji=j(mn,[["render",fn]]),Hi=m.defineComponent({name:"tg-polygon",mixins:[k],inheritAttrs:!1,props:{paths:N(Array),clickable:y(Boolean),editable:y(Boolean),strokeColor:y(String),strokeOpacity:y(Number),strokeWeight:y(Number),visible:y(Boolean),fillColor:y(String),fillOpacity:y(Number),"onUpdate:paths":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0,emittedPaths:void 0}},watch:{paths:{handler(r){if(this.emittedPaths!=null){const t=this.emittedPaths;if(this.emittedPaths=void 0,t.length===r.length&&t.every((e,i)=>e===m.toRaw(r[i])))return}this.overlay.setPaths(r)},deep:!0},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createPolygon(this),this.$map.addOverlay(this.overlay),S(this.attrs.listeners,this.overlay),"update:paths"in this.attrs.listenerProps&&this.overlay.addEventListener("paths-edited",()=>{this.$emit("update:paths",this.emittedPaths=this.overlay.getPaths())})},onDestroy(){this.$map.removeOverlay(this.overlay)}}),Fi=m.defineComponent({name:"tg-polyline",mixins:[k],inheritAttrs:!1,props:{path:N(Array),icons:y(Array),clickable:y(Boolean),editable:y(Boolean),strokeColor:y(String),strokeOpacity:y(Number),strokeWeight:y(Number),visible:y(Boolean),"onUpdate:path":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0,emittedPath:void 0}},watch:{path:{handler(r){if(this.emittedPath!=null){const t=this.emittedPath;if(this.emittedPath=void 0,t===m.toRaw(r))return}this.overlay.setPath(r)},deep:!0},icons:{handler(){this.recreate()},deep:!0},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createPolyline(this),this.$map.addOverlay(this.overlay),S(this.attrs.listeners,this.overlay),"update:path"in this.attrs.listenerProps&&this.overlay.addEventListener("path-edited",()=>{this.$emit("update:path",this.emittedPath=this.overlay.getPath())})},onDestroy(){this.overlay.remove()}}),Ui=m.defineComponent({name:"tg-rectangle",mixins:[k],inheritAttrs:!1,props:{bounds:N(Object),clickable:y(Boolean),editable:y(Boolean),strokeColor:y(String),strokeOpacity:y(Number),strokeWeight:y(Number),visible:y(Boolean),fillColor:y(String),fillOpacity:y(Number),"onUpdate:bounds":B()},emits:void 0,setup(r,{attrs:t}){return{attrs:V(t,r),overlay:void 0,emittedBounds:void 0}},watch:{bounds(r){if(this.emittedBounds!=null){const t=this.emittedBounds;if(this.emittedBounds=void 0,t.equals(r))return}this.overlay.setBounds(r)},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createRectangle(this),this.$map.addOverlay(this.overlay),S(this.attrs.listeners,this.overlay),"update:bounds"in this.attrs.listenerProps&&this.overlay.addEventListener("bounds-changed",()=>{this.$emit("update:bounds",this.emittedBounds=this.overlay.getBounds())})},onDestroy(){this.$map.removeOverlay(this.overlay)}}),yn=["beforeUpdate","updated"],vn={install(r,t={}){if(t.enable!==!1){const e=m.defineComponent({beforeCreate(){const i=$i()??"",s=(t.nameRegex||/^[A-Z]/).test(i)?l=>{t.hookNames?t.hookNames.includes(l)&&console.debug("[lifecycle]",i,l):yn.includes(l)||console.debug("[lifecycle]",i,l)}:Q;s("beforeCreate"),this.__life_impl=s},created(){this.__life("created")},beforeMount(){this.__life("beforeMount")},mounted(){this.__life("mounted")},beforeUpdate(){this.__life("beforeUpdate")},updated(){this.__life("updated")},beforeUnmount(){this.__life("beforeUnmount")},unmounted(){this.__life("unmounted")},methods:{__life(i){this.__life_impl(i)}},onCreate(){this.__life("onCreate")},onDestroy(){this.__life("onDestroy")}});r.mixin(e)}}},_n=6378137;function Oe(r){return r*Math.PI/180}function Yi(r){return r*180/Math.PI}function bn(r,t){if(r.lat===t.lat&&r.lng===t.lng)return 0;const e=Oe((r.lat+t.lat)/2),i=Oe((r.lat-t.lat)/2),n=Oe((r.lng-t.lng)/2);let s=Math.sin(i),l=Math.sin(n),u=Math.sin(e);const a=_n,h=1/298.257;s=s*s,l=l*l,u=u*u;const c=s*(1-l)+(1-u)*l,p=(1-s)*(1-l)+u*l,g=Math.atan(Math.sqrt(c/p)),v=Math.sqrt(c*p)/g,M=2*g*a,C=(3*v-1)/2/p,f=(3*v+1)/2/c;return M*(1+h*(C*u*(1-s)-f*(1-u)*s))}function qi(r,t,e){const n=63567523142e-4,s=1/298.257223563,l=Oe(t),u=Math.sin(l),a=Math.cos(l),h=(1-s)*Math.tan(Oe(r.lat)),c=1/Math.sqrt(1+h*h),p=h*c,g=Math.atan2(h,a),v=c*u,M=1-v*v,C=M*(6378137*6378137-n*n)/(n*n),f=1+C/16384*(4096+C*(-768+C*(320-175*C))),_=C/1024*(256+C*(-128+C*(74-47*C)));let T=0,w=0,A=0,P=e/(n*f),X=2*Math.PI;for(;Math.abs(P-X)>1e-12;){T=Math.cos(2*g+P),w=Math.sin(P),A=Math.cos(P);const wn=_*w*(T+_/4*(A*(-1+2*T*T)-_/6*T*(-3+4*w*w)*(-3+4*T*T)));X=P,P=e/(n*f)+wn}const ce=p*w-c*A*a,zt=Math.atan2(p*A+c*w*a,(1-s)*Math.sqrt(v*v+ce*ce)),Cn=Math.atan2(w*u,c*A-p*w*a),Dt=s/16*M*(4+s*(4-3*M)),On=Cn-(1-Dt)*s*v*(P+Dt*w*(T+Dt*A*(-1+2*T*T)));return{lng:r.lng+Yi(On),lat:Yi(zt)}}const Mn={getDistance:bn,getDestination:qi},Tn={install(r,t){if(Ei(t),{}.VITE_FALSE){const i=Object.assign({"./TgMap.vue":le,"./TgMapWidget.vue":ki,"./controls/TgCustomControl.vue":Ai,"./controls/TgMapTypeControl.vue":xi,"./controls/TgScaleControl.vue":Ri,"./controls/TgStreetViewControl.vue":zi,"./controls/TgZoomControl.vue":Di,"./extra/TgMarkerClusterer.vue":Rt,"./layers/TgTrafficLayer.vue":Ni,"./overlays/TgCircle.vue":Gi,"./overlays/TgElementOverlay.vue":Zi,"./overlays/TgInfoBox.vue":Wi,"./overlays/TgInfoWindow.vue":Vi,"./overlays/TgLabel.vue":ji,"./overlays/TgMarker.vue":Ce,"./overlays/TgPolygon.vue":Hi,"./overlays/TgPolyline.vue":Fi,"./overlays/TgRectangle.vue":Ui});Object.keys(i).forEach(n=>{const s=i[n];r.component(s.name??E(`Tg开头的组件必须设置name: ${n}`),s)})}const e=r.config.optionMergeStrategies;e[oe]=e[ae]=(i,n)=>i?[...new Set([].concat(i,n))]:Array.isArray(n)?n:[n]}};o.AbstractControl=Ae,o.AbstractMap=je,o.Autocomplete=Mt,o.BaiduAutocomplete=ti,o.BaiduCircle=Ue,o.BaiduControl=xe,o.BaiduInfoBoxOverlay=Je,o.BaiduInfoWindow=Ke,o.BaiduMapTypeControl=Re,o.BaiduMapUrls=me,o.BaiduMarker=se,o.BaiduMarkerClusterer=ai,o.BaiduOverlay=ye,o.BaiduPlacesService=ci,o.BaiduPolyShape=tt,o.BaiduPolygon=nt,o.BaiduPolyline=it,o.BaiduRectangle=ot,o.BaiduScaleControl=$e,o.BaiduSearchBox=ui,o.BaiduStreetViewControl=De,o.BaiduZoomControl=Ge,o.BuildInMapType=$,o.BuildInMapTypeId=_t,o.CachedValue=te,o.ControlPosition=L,o.CoordType=I,o.CustomControl=Yt,o.ElementOverlay=Oi,o.EmptyControl=qt,o.FastFindValues=Ut,o.GestureHandlingOptions=W,o.GoogleAutocomplete=ei,o.GoogleCircle=Ye,o.GoogleControl=de,o.GoogleInfoBoxOverlay=Qe,o.GoogleInfoWindow=Xe,o.GoogleMapTypeControl=ue,o.GoogleMapUrls=ge,o.GoogleMarker=et,o.GoogleMarkerClusterer=li,o.GoogleOverlay=He,o.GooglePlacesService=hi,o.GooglePolygon=st,o.GooglePolyline=rt,o.GoogleRectangle=at,o.GoogleScaleControl=ze,o.GoogleSearchBox=di,o.GoogleStreetViewControl=Ne,o.GoogleZoomControl=Ze,o.ImageMapType=hr,o.InfoWindow=qe,o.InfoWindowModeValues=bi,o.KeyValue=vt,o.LatLng=b,o.LatLngBounds=R,o.LifecycleLogPlugin=vn,o.MIXIN_HOOK_CREATE=oe,o.MIXIN_HOOK_DESTROY=ae,o.MIXIN_MAP_NAME=ct,o.MapMixin=k,o.MapPane=re,o.MapTypeControlType=bt,o.MapUrls=Tt,o.MapZoom=pi,o.MarkerClusterer=wt,o.Overlay=Lt,o.PlacesService=Et,o.SearchBox=Pt,o.SphericalUtils=Mn,o.SymbolPath=$r,o.TgCircle=Gi,o.TgCustomControl=Ai,o.TgElementOverlay=Zi,o.TgInfoBox=Wi,o.TgInfoWindow=Vi,o.TgLabel=ji,o.TgMap=le,o.TgMapType=Z,o.TgMapTypeControl=xi,o.TgMapWidget=ki,o.TgMarker=Ce,o.TgMarkerClusterer=Rt,o.TgPolygon=Hi,o.TgPolyline=Fi,o.TgRectangle=Ui,o.TgScaleControl=Ri,o.TgStreetViewControl=zi,o.TgTrafficLayer=Ni,o.TgZoomControl=Di,o.TrafficLayer=Kt,o.UnionIcon=ve,o.assert=U,o.assertNever=Pe,o.callHook=Te,o.computedSaveOnThis=Hr,o.createAsyncSingleton=Wt,o.createEmptyVNode=ht,o.createPropertyObject=Ii,o.createPropertyObjectTyped=Fr,o.debug=sr,o.default=Tn,o.eventProp=B,o.extractVNodeFromSlotsByComponent=Yr,o.findAncestorComponentByType=Ie,o.findByComponentType=Ur,o.getDestination=qi,o.getTgMapConfig=At,o.isComponentByType=Be,o.isDef=or,o.isEntryValueDef=Zt,o.isInstanceOf=tr,o.lateinit=er,o.loadCachedMap=Pi,o.noop=Q,o.optionalProp=y,o.path=Ci,o.requiredProp=N,o.safeAs=ir,o.safeAsComponent=mt,o.setTgMapConfig=Ei,o.splitAttrs=Si,o.stringEnumProp=D,o.stringUnionPropFromValues=Bi,o.throwError=E,o.throwUnsupported=Se,o.todo=nr,o.typed=Le,o.unwrapStringEnumValue=rr,o.useEventLogMethods=qr,o.useSplittedAttrs=V,o.useTgMapInner=xt,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
14
+ `)}r.trimIndent=e;function i(s){return s.replace(/([^A-Z]?)([A-Z])/g,(l,d,o)=>d?`${d}-${o.toLowerCase()}`:o.toLowerCase())}r.pascal2kebab=i;function n(s){return/^-?\d+$/.test(s)}r.isInt=n})(a.Strings||(a.Strings={}));const Gi={basename(r,t){const e=r.endsWith("/")?r.slice(0,-1):r,i=e.lastIndexOf("/"),n=i>=0?e.substring(i+1):e;return t&&n.endsWith(t)?n.slice(0,-t.length):n}},jn="";var ue=(r=>(r.map="map",r.overlay="overlay",r.overlayMouseTarget="overlayMouseTarget",r.float="float",r))(ue||{});a.MapPanes=void 0,(r=>{function t(i,n){switch(i){case"float":return n.floatPane;case"overlayMouseTarget":return n.overlayMouseTarget;case"overlay":return n.overlayLayer;case"map":return n.mapPane;default:Ge(i)}}r.toGoogle=t;function e(i,n){switch(i){case"float":return n.floatPane;case"overlayMouseTarget":return n.markerMouseTarget;case"overlay":return n.markerPane;case"map":return n.mapPane;default:Ge(i)}}r.toBaidu=e})(a.MapPanes||(a.MapPanes={}));class Ni{constructor(t,e){p(this,"baidu");p(this,"google");p(this,"projection");p(this,"element",void 0);p(this,"mapPane");this.map=t,this.mapPane=e.mapPane}create(){return this.element=this.onCreate(),this.element.className+=" element-overlay",this.element}draw(){this.projection&&this.onDraw(this.projection)}getProjection(){return this.projection}asBaidu(){if(!this.baidu){const t=this;$i();class e extends BMap.OverlayV3{initialize(s){var o;const l=t.create(),d=s.getPanes();return(o=a.MapPanes.toBaidu(t.mapPane,d))==null||o.appendChild(l),l}draw(){t.draw()}}this.baidu=new e;const i=t.map.innerMap;this.projection={fromLatLngToOverlayPoint(n){return i.pointToOverlayPixel(n.toBaidu(t.map.coordType))},fromOverlayPointToLatLng(n){return w.fromBaidu(i.overlayPixelToPoint(new BMap.Pixel(n.x,n.y)),t.map.coordType)}}}return this.baidu}asGoogle(){if(!this.google){const t=this;class e extends google.maps.OverlayView{onAdd(){const n=t.create(),s=this.getPanes()??I("onAdd回调中一定会有panes");a.MapPanes.toGoogle(t.mapPane,s).appendChild(n)}draw(){t.draw()}onRemove(){var n;(n=t.element.parentNode)==null||n.removeChild(t.element)}}this.google=new e,this.projection={fromLatLngToOverlayPoint(i){return t.google.getProjection().fromLatLngToDivPixel(i.toGoogle(t.map.coordType))??a.Point.ZERO},fromOverlayPointToLatLng(i){return w.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(i.x,i.y))??ie.LATLNG_ZERO,t.map.coordType)}}}return this.google}}let Ft;function Qr(r,t,e,i,n){return Ft||(Ft=en()),new Ft(r,t,e,i,n)}function en(){return class extends google.maps.OverlayView{constructor(e,i,n,s=ue.overlayMouseTarget,l){super();p(this,"container");this.position=i,this.offset=n,this._mapPane=s,this.container=document.createElement("div"),this.container.className="label-container",this.container.style.position="absolute",l&&this.setZIndex(l),this.container.addEventListener("click",()=>{google.maps.event.trigger(this,"click")}),this.setElement(e)}setZIndex(e){this.container.style.zIndex=`${e}`}setElement(e){const i=this.container.firstChild;i!==e&&(i?this.container.replaceChild(i,e):this.container.appendChild(e))}onAdd(){const e=this.getPanes()??I("onAdd回调中一定能够获取panes");a.MapPanes.toGoogle(this._mapPane,e).appendChild(this.container)}draw(){var e,i;if(this.container.style.display=this.position?"block":"none",this.position){const n=this.getProjection();if(n){const s=n.fromLatLngToDivPixel(this.position);s&&(this.container.style.left=`${s.x+(((e=this.offset)==null?void 0:e.x)??0)}px`,this.container.style.top=`${s.y+(((i=this.offset)==null?void 0:i.y)??0)}px`)}}}onRemove(){var e;(e=this.container.parentNode)==null||e.removeChild(this.container)}setPosition(e){this.position=e,this.draw()}getPosition(){return this.position}setOffset(e){this.offset=e,this.draw()}getOffset(){return this.offset}getVisible(){return this.container.style.visibility!=="hidden"}setVisible(e){this.container.style.visibility=e?"visible":"hidden"}}}var pe;(r=>{function t(i){return typeof i=="string"?i:i.outerHTML}r.toString=t;function e(i){if(typeof i=="string"){const n=document.createElement("div");return n.innerHTML=i,n}return i}r.toElement=e})(pe||(pe={}));class Ut extends we{constructor(e,i,n,s){super(e,i,n);p(this,"icon");p(this,"iconAnchor");p(this,"content",void 0);p(this,"contentObserver");this.setContentInternal(s,!0)}static create(e){var l;const i=this.coordType,n=new BMap.Label(pe.toString(e.content),{position:(l=e.position)==null?void 0:l.toBaidu(i),offset:e.offset&&new BMap.Size(e.offset.x,e.offset.y)});e.zIndex&&n.setZIndex(e.zIndex),n.setStyle({border:"0px",padding:"0px",backgroundColor:"unset"});const s=new Ut(n,i,this,e.content);return n.__label__=s,s}setContentInternal(e,i=!1){this.content!==e&&(this.contentObserver&&(this.contentObserver.disconnect(),this.contentObserver=void 0),typeof e!="string"&&(this.contentObserver=new MutationObserver(()=>{this.innerOverlay.setContent(e.outerHTML)}),this.contentObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),i||this.innerOverlay.setContent(pe.toString(e)),this.content=e)}setZIndex(e){this.innerOverlay.setZIndex(e)}getPosition(){return w.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(e){this.coordType=this.map.coordType,this.innerOverlay.setPosition(e.toBaidu(this.coordType))}getOffset(){const e=this.innerOverlay.getOffset();let i=0,n=0;return this.iconAnchor&&(i=this.iconAnchor.width,n=this.iconAnchor.height),{x:e.width-i,y:e.height-n}}setOffset(e){let i=0,n=0;this.iconAnchor&&(i=this.iconAnchor.width,n=this.iconAnchor.height),this.innerOverlay.setOffset(new BMap.Size(e.x+i,e.y+n))}setContent(e){this.setContentInternal(e)}attachIcon(e){var d;let i;if(e instanceof BMap.Icon)i=e.anchor;else if(e)if(e.anchor)i=e.anchor;else{const o=((d=e.__icon__)==null?void 0:d.baiduLabelOffset)??{x:0,y:0};i={width:e.style.anchor.width+o.x,height:e.style.anchor.height+o.y},process.env.NODE_ENV!=="production"&&setTimeout(()=>{var f,m;if(re(e.__icon__,`${e}必须是由'SymbolIcon.toBaidu()'创建的`),!e.anchor){console.log("BaiduLabelOverlay.attachIcon","Bmap.Symbol.anchor尚未计算完成");return}const h=e.anchor.width-e.style.anchor.width,u=e.anchor.height-e.style.anchor.height;if(o.x!==h||o.y!==u){const _=[(f=e.__icon__.anchor)==null?void 0:f.x,(m=e.__icon__.anchor)==null?void 0:m.y,e.__icon__.rotation,e.__icon__.scale,e.__icon__.strokeWeight].map(T=>T??"").join(",");console.warn("BaiduLabelOverlay.attachIcon",e.__icon__,a.Strings.trimIndent(`
15
+ 为了保证Label的位置正确, 请将SymbolIcon(${_})中baiduLabelOffset的值改写成:
16
+ ${JSON.stringify({x:h,y:u})}
17
+ `))}},1)}const n=this.innerOverlay.getOffset();let s=n.width,l=n.height;this.iconAnchor&&(s-=this.iconAnchor.width,l-=this.iconAnchor.height),i&&(s+=i.width,l+=i.height),this.innerOverlay.setOffset(new BMap.Size(s,l)),this.icon=e,this.iconAnchor=i}}class qt extends st{static create(t){var n;const e=this.coordType,i=Qr(pe.toElement(t.content),(n=t.position)==null?void 0:n.toGoogle(e),t.offset,t.mapPane,t.zIndex);return new qt(i,e,this)}setZIndex(t){this.innerOverlay.setZIndex(t)}setContent(t){this.innerOverlay.setElement(pe.toElement(t))}getPosition(){const t=this.innerOverlay.getPosition();return t?w.fromGoogle(t,this.coordType):w.ZERO}setPosition(t){this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toGoogle(this.coordType))}getOffset(){return this.innerOverlay.getOffset()??a.Point.ZERO}setOffset(t){this.innerOverlay.setOffset(t)}}const Ee={toGoogle:r=>"url"in r?a.Icon.toGoogle(r):a.SymbolIcon.toGoogle(r),toBaidu:r=>"url"in r?a.Icon.toBaidu(r):a.SymbolIcon.toBaidu(r)};a.Icon=void 0,(r=>{function t(i){return{url:i.url,size:new google.maps.Size(i.size.width,i.size.height),origin:i.origin&&new google.maps.Point(i.origin.x,i.origin.y),scaledSize:i.scaledSize&&new google.maps.Size(i.scaledSize.width,i.scaledSize.height),anchor:i.anchor&&new google.maps.Point(i.anchor.x,i.anchor.y)}}r.toGoogle=t;function e(i){return new BMap.Icon(i.url,new BMap.Size(i.size.width,i.size.height),{imageOffset:i.origin&&new BMap.Size(-i.origin.x,-i.origin.y),imageSize:i.scaledSize&&new BMap.Size(i.scaledSize.width,i.scaledSize.height),anchor:i.anchor?new BMap.Size(i.anchor.x,i.anchor.y):new BMap.Size(i.size.width/2,i.size.height)})}r.toBaidu=e})(a.Icon||(a.Icon={})),a.SymbolIcon=void 0,(r=>{function t(i){return{path:typeof i.path=="string"?i.path:i.path.google(),anchor:i.anchor&&new google.maps.Point(i.anchor.x,i.anchor.y),fillColor:i.fillColor,fillOpacity:i.fillOpacity,scale:i.scale,rotation:i.rotation,strokeColor:i.strokeColor,strokeOpacity:i.strokeOpacity,strokeWeight:i.strokeWeight}}r.toGoogle=t;function e(i){const n=new BMap.Symbol(typeof i.path=="string"?i.path:i.path.baidu(),{anchor:i.anchor&&new BMap.Size(i.anchor.x,i.anchor.y),fillColor:i.fillColor,fillOpacity:i.fillOpacity,scale:i.scale,rotation:i.rotation,strokeColor:i.strokeColor,strokeOpacity:i.strokeOpacity,strokeWeight:i.strokeWeight});return n.__icon__=i,n}r.toBaidu=e})(a.SymbolIcon||(a.SymbolIcon={}));const tn={CIRCLE:{baidu:()=>BMap_Symbol_SHAPE_CIRCLE,google:()=>google.maps.SymbolPath.CIRCLE},BACKWARD_CLOSED_ARROW:{baidu:()=>BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW,google:()=>google.maps.SymbolPath.BACKWARD_CLOSED_ARROW},BACKWARD_OPEN_ARROW:{baidu:()=>BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW,google:()=>google.maps.SymbolPath.BACKWARD_OPEN_ARROW},FORWARD_CLOSED_ARROW:{baidu:()=>BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW,google:()=>google.maps.SymbolPath.FORWARD_CLOSED_ARROW},FORWARD_OPEN_ARROW:{baidu:()=>BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW,google:()=>google.maps.SymbolPath.FORWARD_OPEN_ARROW}};a.IconSequence=void 0,(r=>{function t(i){return{icon:a.SymbolIcon.toGoogle(i.icon),offset:i.offset,repeat:i.repeat,fixedRotation:i.fixedRotation}}r.toGoogle=t;function e(i){return new BMap.IconSequence(a.SymbolIcon.toBaidu(i.icon),i.offset,i.repeat??"",i.fixedRotation)}r.toBaidu=e})(a.IconSequence||(a.IconSequence={}));class ge extends we{constructor(t,e,i,n){super(t,e,i),this.state=n}static create(t){const e=this.coordType,i=t.icon,n={title:t.title,icon:i&&Ee.toBaidu(i),enableClicking:t.clickable,enableDragging:t.draggable,raiseOnDrag:t.crossOnDrag===void 0?!0:t.crossOnDrag,draggingCursor:t.cursor},s=new BMap.Marker(t.position.toBaidu(e,t.normalizePositionForBaidu),n);s.__create_by_tg__=!0,t.zIndex!==void 0&&s.setZIndex(t.zIndex);const l=t.clickable===void 0?!0:t.clickable,d=!!t.draggable;return new ge(s,e,this,{clickable:l,draggable:d,zIndex:t.zIndex,normalize:t.normalizePositionForBaidu}).visibleOptionInternal(t.visible)}getPosition(){return w.fromBaidu(this.innerOverlay.getPosition(),this.coordType)}setPosition(t){var e;this.coordType=this.map.coordType,this.innerOverlay.setPosition(t.toBaidu(this.coordType,this.state.normalize)),(e=this.innerOverlay.__info_box__)==null||e.onMarkerPositionChanged()}setTitle(t){this.innerOverlay.setTitle(t)}getTitle(){return this.innerOverlay.getTitle()}setIcon(t){const e=Ee.toBaidu(t);this.innerOverlay.setIcon(e);const i=this.getLabel();i&&i.attachIcon(e)}getIcon(){return this.innerOverlay.getIcon()}setClickable(t){this.state.clickable=t}isClickable(){return this.state.clickable}setDraggable(t){this.state.draggable=t,t?this.innerOverlay.enableDragging():this.innerOverlay.disableDragging()}isDraggable(){return this.state.draggable}setZIndex(t){this.state.zIndex=t,this.innerOverlay.setZIndex(t||0)}getZIndex(){return this.state.zIndex}setLabel(t){const e=this.getLabel();e&&e.attachIcon(void 0),t&&t.attachIcon(this.innerOverlay.getIcon()),this.innerOverlay.setLabel(t==null?void 0:t.innerOverlay)}getLabel(){var t;return(t=this.innerOverlay.getLabel())==null?void 0:t.__label__}}class gt extends st{constructor(){super(...arguments);p(this,"label");p(this,"labelPositionListener");p(this,"labelVisibleListener");p(this,"labelMapChangedListener")}static create(e){const i=this.coordType,n=e.icon,s={position:e.position.toGoogle(i),title:e.title,zIndex:e.zIndex,visible:e.visible,icon:n&&Ee.toGoogle(n),clickable:e.clickable,draggable:e.draggable,crossOnDrag:e.crossOnDrag,cursor:e.cursor,anchorPoint:new google.maps.Point(0,0)};return new gt(new google.maps.Marker(s),i,this)}getPosition(){return w.fromGoogle(this.innerOverlay.getPosition(),this.coordType)}setPosition(e){this.coordType=this.map.coordType,this.innerOverlay.setPosition(e.toGoogle(this.coordType))}setTitle(e){this.innerOverlay.setTitle(e)}getTitle(){return this.innerOverlay.getTitle()||""}setIcon(e){this.innerOverlay.setIcon(Ee.toGoogle(e))}getIcon(){return this.innerOverlay.getIcon()}setClickable(e){this.innerOverlay.setClickable(e)}isClickable(){return this.innerOverlay.getClickable()}setDraggable(e){this.innerOverlay.setDraggable(e)}isDraggable(){return!!this.innerOverlay.getDraggable()}setZIndex(e){this.innerOverlay.setZIndex(e===void 0?null:e)}getZIndex(){const e=this.innerOverlay.getZIndex();return e===null?void 0:e}setLabel(e){if(this.label&&this.map.removeOverlay(this.label),this.labelPositionListener&&this.labelPositionListener.remove(),this.labelVisibleListener&&this.labelVisibleListener.remove(),this.labelMapChangedListener&&this.labelMapChangedListener.remove(),e){const i=()=>{e.innerOverlay.setPosition(this.innerOverlay.getPosition())},n=()=>{e.innerOverlay.setVisible(this.innerOverlay.getVisible())},s=()=>{this.innerOverlay.getMap()?this.map.addOverlay(e):this.map.removeOverlay(e)};s(),i(),n(),this.label=e,this.labelMapChangedListener=this.innerOverlay.addListener("map_changed",s),this.labelPositionListener=this.innerOverlay.addListener("position_changed",i),this.labelVisibleListener=this.innerOverlay.addListener("visible_changed",n)}else this.label=void 0,this.labelPositionListener=void 0,this.labelVisibleListener=void 0,this.labelMapChangedListener=void 0}}class mt extends V{constructor(){super(...arguments);p(this,"eventHubDelegate");p(this,"prevPath");p(this,"isDoingSetPath",!1);p(this,"onLineUpdate",()=>{var i;const e=this.innerOverlay.getPath();e!==this.prevPath&&(this.isDoingSetPath||(i=this.eventHubDelegate)==null||i.notify({type:this.pathEditedEventType,target:this,originalEvent:{prevPath:this.prevPath,path:e}}),this.prevPath=e)})}setPathInternal(e){this.isDoingSetPath=!0,this.innerOverlay.setPath(e),this.isDoingSetPath=!1}createDelegate(){return this.eventHubDelegate=new Ve(super.createDelegate(),{types:[this.pathEditedEventType],onListen:()=>{this.prevPath=this.innerOverlay.getPath(),this.innerOverlay.addEventListener("lineupdate",this.onLineUpdate)},onCancel:()=>{this.innerOverlay.removeEventListener("lineupdate",this.onLineUpdate),this.prevPath=void 0}})}}class ft extends mt{constructor(){super(...arguments);p(this,"pathEditedEventType","path-edited")}static create(e){var s,l;const i=this.coordType,n=new BMap.Polyline(e.path.map(d=>d.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+V.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,icons:(s=e.icons)==null?void 0:s.map(a.IconSequence.toBaidu)});return new ft(n,i,this,{editable:!!e.editable,symbolIcons:(l=e.icons)==null?void 0:l.map(d=>d.icon)}).visibleOptionInternal(e.visible)}getPath(){return this.innerOverlay.getPath().map(e=>w.fromBaidu(e,this.coordType))}setPath(e){this.coordType=this.map.coordType,this.setPathInternal(e.map(i=>i.toBaidu(this.coordType)))}remove(){var e;super.remove(),(e=this.state.symbolIcons)!=null&&e.length&&this.map.innerMap.getOverlays().filter(n=>{var o;if(!(n instanceof BMap.Marker))return!1;const s=n;if(s.__create_by_tg__)return!1;const l=s.getIcon();if(!(l instanceof BMap.Symbol))return!1;const d=l;return d.__icon__?(o=this.state.symbolIcons)==null?void 0:o.includes(d.__icon__):!1}).forEach(n=>this.map.innerMap.removeOverlay(n))}}class yt extends ot{constructor(){super(...arguments);p(this,"pathChangedListeners");p(this,"eventHubDelegate")}static create(e){var s;const i=this.coordType,n=new google.maps.Polyline({path:e.path.map(l=>l.toGoogle(i)),clickable:e.clickable,editable:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,visible:e.visible,icons:(s=e.icons)==null?void 0:s.map(a.IconSequence.toGoogle)});return new yt(n,i,this)}setupPathChangedListeners(){const e=()=>{var n;return(n=this.eventHubDelegate)==null?void 0:n.notify({type:"path-edited",target:this})},i=this.innerOverlay.getPath();this.pathChangedListeners=a.MVCArrays.listenChanged(i,e)}clearPathChangedListeners(){var e;(e=this.pathChangedListeners)==null||e.forEach(i=>i.remove()),this.pathChangedListeners=void 0}createDelegate(){return this.eventHubDelegate=new Ve(super.createDelegate(),{types:["path-edited"],onListen:()=>this.setupPathChangedListeners(),onCancel:()=>this.clearPathChangedListeners()})}getPath(){const e=[];return this.innerOverlay.getPath().forEach(i=>{e.push(w.fromGoogle(i,this.coordType))}),e}setPath(e){var i;this.coordType=this.map.coordType,this.innerOverlay.setPath(e.map(n=>n.toGoogle(this.coordType))),(i=this.eventHubDelegate)!=null&&i.hasListener("path-edited")&&this.setupPathChangedListeners()}}class vt extends mt{constructor(){super(...arguments);p(this,"pathEditedEventType","paths-edited")}static create(e){const i=this.coordType;e.paths.length>1&&console.warn("baidu不支持多path, 只会显示paths[0]");const n=e.paths[0]||[],s=new BMap.Polygon(n.map(l=>l.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+V.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+V.OPACITY_DELTA:void 0});return new vt(s,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible)}getPaths(){return[this.innerOverlay.getPath().map(e=>w.fromBaidu(e,this.coordType))]}setPaths(e){e.length>1&&console.warn("baidu不支持多path, 只会显示paths[0]"),this.coordType=this.map.coordType,this.setPathInternal((e[0]||[]).map(i=>i.toBaidu(this.coordType)))}}class _t extends ot{constructor(){super(...arguments);p(this,"pathChangedListeners");p(this,"eventHubDelegate")}static create(e){const i=this.coordType,n=new google.maps.Polygon({paths:e.paths.map(s=>s.map(l=>l.toGoogle(i))),clickable:e.clickable,editable:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity,visible:e.visible});return new _t(n,i,this)}setupPathChangedListeners(){const e=()=>{var n;return(n=this.eventHubDelegate)==null?void 0:n.notify({type:"paths-edited",target:this})},i=this.innerOverlay.getPaths();this.pathChangedListeners=[],i.forEach(n=>{this.pathChangedListeners.push(...a.MVCArrays.listenChanged(n,e))})}clearPathChangedListeners(){var e;(e=this.pathChangedListeners)==null||e.forEach(i=>i.remove()),this.pathChangedListeners=void 0}createDelegate(){return this.eventHubDelegate=new Ve(super.createDelegate(),{types:["paths-edited"],onListen:()=>this.setupPathChangedListeners(),onCancel:()=>this.clearPathChangedListeners()})}getPaths(){const e=this.innerOverlay.getPaths(),i=[];return e.forEach(n=>{const s=[];i.push(s),n.forEach(l=>{s.push(w.fromGoogle(l,this.coordType))})}),i}setPaths(e){var i;this.coordType=this.map.coordType,this.innerOverlay.setPaths(e.map(n=>n.map(s=>s.toGoogle(this.coordType)))),(i=this.eventHubDelegate)!=null&&i.hasListener("paths-edited")&&this.setupPathChangedListeners()}}class bt extends mt{constructor(e,i,n,s){super(e,i,n,s);p(this,"pathEditedEventType","bounds-changed");p(this,"isDoingUpdateRectangle",!1);p(this,"onBoundsChanged",({originalEvent:e})=>{if(this.isDoingUpdateRectangle)return;const i=e.prevPath??[],n=e.path;setTimeout(()=>{let s=n;const l=n.length;if(i.length===4)if(l>i.length){for(let o=0;o<l;o++)if(i[o]==null||!zi.equals(n[o],i[o])){const h=n[(o-2+l)%l],u=n[(o-1+l)%l],f=n[o],m=n[(o+1)%l],_=n[(o+2)%l];let T;u.lat===m.lat?T=new BMap.Point(u.lng,f.lat):u.lng===m.lng?T=new BMap.Point(f.lng,u.lat):T=f,s=[h,_,T];break}}else if(l===i.length){for(let o=0;o<l;o++)if(!zi.equals(n[o],i[o])){s=[n[o],n[(o+2)%4]];break}}else l<i.length;const d=Z.fromArray(s.map(o=>w.fromBaidu(o,this.coordType)));d&&(this.isDoingUpdateRectangle=!0,this.innerOverlay.setPath(d.toRectArray().map(o=>o.toBaidu(this.coordType))),this.isDoingUpdateRectangle=!1)},0)});this.addEventListener("bounds-changed",this.onBoundsChanged)}static create(e){const i=this.coordType,n=new BMap.Polygon(e.bounds.toRectArray().map(s=>s.toBaidu(i)),{enableClicking:e.clickable,enableEditing:e.editable,strokeColor:e.strokeColor,strokeOpacity:e.strokeOpacity!=null?e.strokeOpacity+V.OPACITY_DELTA:void 0,strokeWeight:e.strokeWeight,fillColor:e.fillColor,fillOpacity:e.fillOpacity!=null?e.fillOpacity+V.OPACITY_DELTA:void 0});return new bt(n,i,this,{editable:!!e.editable}).visibleOptionInternal(e.visible)}getBounds(){return Z.fromBaidu(this.innerOverlay.getBounds(),this.coordType)}setBounds(e){const i=e.toRectArray();this.innerOverlay.getPath().length===i.length?e.toRectArray().forEach((n,s)=>{this.innerOverlay.setPositionAt(s,n.toBaidu(this.coordType))}):this.setPathInternal(i.map(n=>n.toBaidu(this.coordType)))}}class Mt extends ot{static create(t){const e=this.coordType,i=new google.maps.Rectangle({bounds:t.bounds.toGoogle(e),clickable:t.clickable,editable:t.editable,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,fillColor:t.fillColor,fillOpacity:t.fillOpacity,visible:t.visible});return new Mt(i,e,this)}getBounds(){return Z.fromGoogle(this.innerOverlay.getBounds()??ie.BOUNDS_ZERO,this.coordType)}setBounds(t){const e=t.toGoogle(this.coordType);e.equals(this.innerOverlay.getBounds())||this.innerOverlay.setBounds(e)}}const se=1;class rn extends nt{constructor(e,i){var n;super(e);p(this,"buildInMapTypeId2BIMT");p(this,"baiduMapType2BIMT");p(this,"map");p(this,"createLabel",Ut.create);p(this,"createCircle",at.create);p(this,"createPolygon",vt.create);p(this,"createPolyline",ft.create);p(this,"createRectangle",bt.create);p(this,"createInfoWindow",ct.create);p(this,"createInfoBox",ut.create);p(this,"createMarker",ge.create);p(this,"createMapTypeControl",Ue.create);p(this,"createZoomControl",Je.create);p(this,"createStreetViewControl",Ke.create);p(this,"createScaleControl",qe.create);this.buildInMapTypeId2BIMT=a.MapType.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId),this.baiduMapType2BIMT=a.MapType.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.asBaiduMapType),this.map=new BMap.Map(e,{minZoom:i.minZoom&&i.minZoom+se,maxZoom:i.maxZoom&&i.maxZoom+se,mapType:i.buildInMapTypeId&&((n=this.buildInMapTypeId2BIMT.get(i.buildInMapTypeId))==null?void 0:n.asBaiduMapType()),enableMapClick:!1}),this.map.centerAndZoom(i.center.toBaidu(this.coordType),i.zoom+se),this.setGestureHandling(i.gestureHandling),i.infoWindowMode==="multi"&&console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"),i.mapStyle&&this.map.setMapStyleV2(i.mapStyle.baidu),this.setEventTargetDelegate(new he(this.map,this)),this.map.addEventListener("addoverlay",s=>{const l=s.target.__info_box__;l&&(console.debug("add:info-box",l),this.map.addOverlay(l))}),this.map.addEventListener("removeoverlay",s=>{const l=s.target.__info_box__;l&&(console.debug("remove:info-box",l),this.map.removeOverlay(l))})}setGestureHandling(e=X.auto){switch(e===X.auto&&(e=this.element.parentElement&&kt.isScrollable(this.element.parentElement)?X.cooperative:X.greedy),e){case X.cooperative:this.map.disableScrollWheelZoom(),this.map.enableDragging(),this.map.enableDoubleClickZoom();break;case X.greedy:this.map.enableScrollWheelZoom(),this.map.enableDragging(),this.map.enableDoubleClickZoom();break;case X.none:this.map.disableDragging(),this.map.disableScrollWheelZoom(),this.map.disableDoubleClickZoom();break}}get innerMap(){return this.map}get coordType(){return this.getMapType().getBaiduCoordType()}addEventListener(e,i){if(e==="center-changed"){super.addEventListener("movestart",i),super.addEventListener("moving",i),super.addEventListener("moveend",i),super.addEventListener("zoomend",i);return}super.addEventListener(e,i)}removeEventListener(e,i){if(e==="center-changed"){super.removeEventListener("movestart",i),super.removeEventListener("moving",i),super.removeEventListener("moveend",i),super.removeEventListener("zoomend",i);return}super.removeEventListener(e,i)}fromContainerPointToLatLng(e){return w.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x,e.y)),this.coordType)}fromLatLngToContainerPoint(e){return this.innerMap.pointToPixel(e.toBaidu(this.coordType))}setDefaultCursor(e){this.innerMap.setDefaultCursor(e)}setDraggable(e){e?this.innerMap.enableDragging():this.innerMap.disableDragging()}setDoubleClickZoom(e){e?this.map.enableDoubleClickZoom():this.map.disableDoubleClickZoom()}getCenter(){return w.fromBaidu(this.map.getCenter(),this.coordType)}setCenter(e){this.map.setCenter(e.toBaidu(this.coordType))}getZoom(){return super.getZoom()-se}setZoom(e){return super.setZoom(e+se)}setMinZoom(e){this.map.setMinZoom(e+se)}setMaxZoom(e){this.map.setMaxZoom(e+se)}setMapStyle(e){this.map.setMapStyleV2((e==null?void 0:e.baidu)??{styleJson:[]})}setBuildInMapTypeId(e){var n;const i=(n=this.buildInMapTypeId2BIMT.get(e))==null?void 0:n.asBaiduMapType();this.map.setMapType(i??I("理论上来说不可能为空"))}setMapType(e){this.map.setMapType(e.asBaiduMapType())}getMapType(){const e=this.map.getMapType(),i=this.baiduMapType2BIMT.get(e);return i||(e.__baidu_map_type__??I("实现asBaiduMapType()时, 忘了给实例设置__baidu_map_type__?"))}addLayer(e){this.map.addTileLayer(e.asBaiduLayer())}removeLayer(e){this.map.removeTileLayer(e.asBaiduLayer())}panTo(e){this.map.panTo(e.toBaidu(this.coordType))}panBy(e,i){this.map.panBy(e,i)}fitBounds(e,i){this.map.setViewport(e.toBaiduArray(this.coordType),{margins:i&&[i.top,i.right,i.bottom,i.left]})}getBounds(){return Z.fromBaidu(this.map.getBounds(),this.coordType)}addElementOverlay(e){this.map.addOverlay(e.asBaidu())}removeElementOverlay(e){this.map.removeOverlay(e.asBaidu())}addOverlay(e){this.map.addOverlay(e.innerOverlay)}removeOverlay(e){this.map.removeOverlay(e.innerOverlay)}addCustomControl(e){if(!e.inner){const i=class extends BMap.Control{constructor(){super(...arguments);p(this,"defaultAnchor",a.ControlPositionConverter.getBaidu().toValue(e.position));p(this,"defaultOffset",new BMap.Size(0,0))}initialize(s){const l=e.onCreateElement();return s.getContainer().appendChild(l),l}};e.inner=new i,this.map.addControl(e.inner)}}removeCustomControl(e){e.inner&&(re(e.inner instanceof BMap.Control,`control.inner(${e.inner})需要是BMap.Control`),this.map.removeControl(e.inner))}createMarkerClusterer(e){return new Ci(this,e)}createHeatmap(e){return new yi(this,e)}createAutocomplete(e){return new pi(this,e)}createSearchBox(e){return new Li(this,e)}createPlacesService(e){return new Ei(this,e)}createMapUrls(e){return new Ce(e)}}class nn extends nt{constructor(e,i){var s,l;super(e);p(this,"buildInMapTypeId2BIMT");p(this,"googleMapTypeId2BIMT");p(this,"map");p(this,"createLabel",qt.create);p(this,"createCircle",lt.create);p(this,"createPolygon",_t.create);p(this,"createPolyline",yt.create);p(this,"createRectangle",Mt.create);p(this,"createInfoWindow",dt.create);p(this,"createInfoBox",pt.create);p(this,"createMarker",gt.create);p(this,"createMapTypeControl",be.create);p(this,"createZoomControl",Qe.create);p(this,"createStreetViewControl",Xe.create);p(this,"createScaleControl",Ye.create);this.mapOptions=i,this.buildInMapTypeId2BIMT=a.MapType.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getId),this.googleMapTypeId2BIMT=a.MapType.BUILD_IN_MAP_TYPES.getValueMap(W.prototype.getGoogleMapTypeId);const n=i.buildInMapTypeId&&this.buildInMapTypeId2BIMT.get(i.buildInMapTypeId);this.map=new google.maps.Map(e,{center:i.center.toGoogle((n??a.MapType.NORMAL).getGoogleCoordType()),zoom:i.zoom,disableDefaultUI:!0,gestureHandling:i.gestureHandling,minZoom:i.minZoom,maxZoom:i.maxZoom,styles:(s=i.mapStyle)==null?void 0:s.google.styles,mapId:(l=i.mapStyle)==null?void 0:l.google.mapId,mapTypeId:n==null?void 0:n.getGoogleMapTypeId()}),this.setEventTargetDelegate(new ne(this.map,this))}setGestureHandling(e){this.map.setOptions({gestureHandling:e})}get innerMap(){return this.map}get coordType(){return this.getMapType().getGoogleCoordType()}fromContainerPointToLatLng(e){const i=this.innerMap.getProjection(),n=this.innerMap.getBounds();if(i==null||n==null)return w.ZERO;const s=i.fromLatLngToPoint(n.getSouthWest()),l=i.fromLatLngToPoint(n.getNorthEast()),d=this.innerMap.getZoom();if(s==null||l==null||d==null)return w.ZERO;const o=Math.pow(2,d),h=new google.maps.Point(e.x/o+s.x,e.y/o+l.y);return w.fromGoogle(i.fromPointToLatLng(h)??ie.LATLNG_ZERO,this.coordType)}fromLatLngToContainerPoint(e){const i=this.innerMap.getProjection(),n=this.innerMap.getBounds();if(i==null||n==null)return a.Point.ZERO;const s=i.fromLatLngToPoint(n.getSouthWest()),l=i.fromLatLngToPoint(n.getNorthEast()),d=this.innerMap.getZoom();if(s==null||l==null||d==null)return a.Point.ZERO;const o=Math.pow(2,d),h=i.fromLatLngToPoint(e.toGoogle(this.coordType));return h==null?a.Point.ZERO:{x:(h.x-s.x)*o,y:(h.y-l.y)*o}}setDefaultCursor(e){this.innerMap.setOptions({draggableCursor:e})}setDraggable(e){this.innerMap.setOptions({draggable:e})}setDoubleClickZoom(e){this.map.setOptions({disableDoubleClickZoom:!e})}getCenter(){return w.fromGoogle(this.map.getCenter()??ie.LATLNG_ZERO,this.coordType)}setCenter(e){this.map.setCenter(e.toGoogle(this.coordType))}setMinZoom(e){this.map.setOptions({minZoom:e})}setMaxZoom(e){this.map.setOptions({maxZoom:e})}setMapStyle(e){this.map.setOptions({styles:e==null?void 0:e.google.styles,mapId:e==null?void 0:e.google.mapId})}setBuildInMapTypeId(e){var n;const i=(n=this.buildInMapTypeId2BIMT.get(e))==null?void 0:n.getGoogleMapTypeId();this.map.setMapTypeId(i??I("理论上来说不可能为空"))}setMapType(e){e instanceof W?this.map.setMapTypeId(e.getGoogleMapTypeId()):(this.map.mapTypes.set(e.id,e.asGoogleMapType()),this.map.setMapTypeId(e.id))}getMapType(){const e=this.map.getMapTypeId()??google.maps.MapTypeId.ROADMAP,i=this.googleMapTypeId2BIMT.get(e);return i||(this.map.mapTypes.get(e).__google_map_type__??I(`实现${e}的asGoogleMapType()时, 忘了给实例设置__google_map_type__?`))}addOverlayMapType(e){this.map.overlayMapTypes.push(e.asGoogleMapType())}removeOverlayMapType(e){a.MVCArrays.remove(this.map.overlayMapTypes,e.asGoogleMapType())}addLayer(e){e.asGoogleLayer().setMap(this.map)}removeLayer(e){e.asGoogleLayer().setMap(null)}panTo(e){this.map.panTo(e.toGoogle(this.coordType))}panBy(e,i){this.map.panBy(e,i)}fitBounds(e,i){this.map.fitBounds(e.toGoogle(this.coordType),i)}getBounds(){const e=this.map.getBounds();return e?Z.fromGoogle(e,this.coordType):Z.EMPTY}addElementOverlay(e){e.asGoogle().setMap(this.map)}removeElementOverlay(e){e.asGoogle().setMap(null)}addOverlay(e){e.innerOverlay.setMap(this.map)}removeOverlay(e){e.innerOverlay.setMap(null)}addCustomControl(e){e.inner||(e.inner=e.onCreateElement(),this.map.controls[a.ControlPositionConverter.getGoogle().toValue(e.position)].push(e.inner))}removeCustomControl(e){if(e.inner){const i=this.map.controls[a.ControlPositionConverter.getGoogle().toValue(e.position)];a.MVCArrays.remove(i,e.inner)}}createMarkerClusterer(e){return new Oi(this,e)}createHeatmap(e){return new fi(this,e)}createAutocomplete(e){return new ui(this,e)}createSearchBox(e){return new Pi(this,e)}createPlacesService(e){return new wi(this,e)}createMapUrls(e){return new Te(e)}}const Tt=["3.0"],sn={baidu:{version:"3.0",key:"kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"},google:{version:"quarterly",key:"AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",language:"en-us",libraries:["places","visualization"]},here:{version:Tt[0],key:""}};let Zi;function Yt(){return Zi||I("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})")}function Wi(r){r!=null&&(Zi=ki(sn,r))}class on extends nt{constructor(e,i){var l;super(e);p(this,"map");p(this,"defaultLayers");this.mapOptions=i;const n=Yt().here;Tt.includes(n.version)||I(`不支持${n.version}, HereMap当前只支持如下版本: ${Tt}`);const s=new H.service.Platform({app_id:n.key.split(",")[0],app_code:n.key.split(",")[1]});this.defaultLayers=s.createDefaultLayers(),this.map=new H.Map(e,this.defaultLayers.normal.map,{zoom:i.zoom,center:(l=i.center)==null?void 0:l.toHere(this.coordType)}),new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map)),H.ui.UI.createDefault(this.map,this.defaultLayers)}get innerMap(){return this.map}get coordType(){return R.wgs84}getCenter(){return w.fromHere(this.map.getCenter(),this.coordType)}setCenter(e){this.map.setCenter(e.toHere(this.coordType))}setGestureHandling(e){throw new Error("Method not implemented.")}fromContainerPointToLatLng(e){throw new Error("Method not implemented.")}fromLatLngToContainerPoint(e){throw new Error("Method not implemented.")}setDefaultCursor(e){throw new Error("Method not implemented.")}setDraggable(e){throw new Error("Method not implemented.")}setDoubleClickZoom(e){throw new Error("Method not implemented.")}setMinZoom(e){throw new Error("Method not implemented.")}setMaxZoom(e){throw new Error("Method not implemented.")}setMapStyle(e){throw new Error("Method not implemented.")}setBuildInMapTypeId(e){throw new Error("Method not implemented.")}setMapType(e){throw new Error("Method not implemented.")}getMapType(){throw new Error("Method not implemented.")}addLayer(e){throw new Error("Method not implemented.")}removeLayer(e){throw new Error("Method not implemented.")}panTo(e){throw new Error("Method not implemented.")}panBy(e,i){throw new Error("Method not implemented.")}fitBounds(e,i){throw new Error("Method not implemented.")}getBounds(){throw new Error("Method not implemented.")}addElementOverlay(e){throw new Error("Method not implemented.")}removeElementOverlay(e){throw new Error("Method not implemented.")}addOverlay(e){throw new Error("Method not implemented.")}removeOverlay(e){throw new Error("Method not implemented.")}createMarker(e){throw new Error("Method not implemented.")}createMarkerClusterer(e){throw new Error("Method not implemented.")}createHeatmap(e){throw new Error("Method not implemented.")}createAutocomplete(e){throw new Error("Method not implemented.")}createSearchBox(e){throw new Error("Method not implemented.")}createPlacesService(e){throw new Error("Method not implemented.")}createMapUrls(e){throw new Error("Method not implemented.")}createInfoWindow(e){throw new Error("Method not implemented.")}createInfoBox(e){throw new Error("Method not implemented.")}createPolyline(e){throw new Error("Method not implemented.")}createPolygon(e){throw new Error("Method not implemented.")}createRectangle(e){throw new Error("Method not implemented.")}createCircle(e){throw new Error("Method not implemented.")}createLabel(e){throw new Error("Method not implemented.")}addCustomControl(e){throw new Error("Method not implemented.")}removeCustomControl(e){throw new Error("Method not implemented.")}createMapTypeControl(e){throw new Error("Method not implemented.")}createZoomControl(e){throw new Error("Method not implemented.")}createStreetViewControl(e){throw new Error("Method not implemented.")}createScaleControl(e){throw new Error("Method not implemented.")}}var U=(r=>(r.google="google",r.baidu="baidu",r.here="here",r))(U||{});a.TgMapFactory=void 0,(r=>{function t(e,i,n){const s=a.MapOptions.create(n);switch(e){case"google":return new nn(i,s);case"baidu":return new rn(i,s);case"here":return new on(i,s)}}r.createMap=t})(a.TgMapFactory||(a.TgMapFactory={}));const an={};function Hi(r){return a.Objects.putIfAbsent(an,r,()=>ei(()=>ln({type:r,config:Yt()[r]})))()}function ln({type:r,config:t}){const e=window,i=hn(r);if(a.Objects.get(e,i))return Promise.resolve();switch(r!==U.here&&!t.key&&I(`请先配置${r}地图的key`),r){case U.google:return{}.VITE_FALSE?(Pr({key:t.key,v:"3.52"}),google.maps.importLibrary("core")):Vi(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);case U.baidu:return Vi(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);case U.here:return Le(Pe("core",t.version)).then(()=>Promise.all([Le(Pe("service",t.version)),Le(Pe("mapevents",t.version)),Le(Pe("clustering",t.version)),Le(Pe("ui",t.version))])).catch(n=>(a.Objects.del(e,i),Promise.reject(n)));default:Ge(r)}}function Pe(r,t=Tt[0]){return`https://js.api.here.com/v3/${t}/mapsjs-${r}.js`}function hn(r){switch(r){case U.google:return"google.maps";case U.baidu:return"BMap";case U.here:return"H"}}let cn=0;function Vi(r,t="callback"){return new Promise((e,i)=>{const n=`__callback${cn++}`;window[n]=e;const s=document.createElement("script");s.src=`${r}&${t}=${n}`,s.onerror=i,document.body.appendChild(s)})}function Le(r){return new Promise((t,e)=>{const i=document.createElement("script");i.src=r,i.onload=t,i.onerror=e,document.body.appendChild(i)})}function j(r,t){return{type:String,default:t,validator:e=>Object.values(r).includes(e)}}function ji(r,t){return{type:String,default:t,validator:e=>r.includes(e)}}function G(r){return{type:r,required:!0}}function M(r,t){return{type:r,default:t}}function dn(r){const t={};return Object.entries(r).forEach(([e,i])=>{const n=`__${e}`;t[e]={get(){const s=this[n];return s===void 0?i:s},set(s){this[n]=s}}}),t}const Be={enumerable:!0,configurable:!0,get:le,set:le};function Fi(r){return Object.keys(r).forEach(t=>{const e=r[t];let i=!1;typeof e=="function"?(Be.get=e,Be.set=le,i=!0):typeof e=="object"&&typeof e.get=="function"&&(Be.get=e.get,Be.set=e.set,i=!0),i&&(r[t]=Object.defineProperty(r,t,Be))}),r}function un(r){return Fi(r)}function Ie(){return v.createCommentVNode()}function Se(r,t){const e=r.$options[t];if(e)for(const i of e)i.call(r)}function pn(r,t){for(const e of r)if(e.$options.name===t.name)return e}function gn(r,t){if(!r.default)return;const e=r.default();for(const i of e)if((i==null?void 0:i.type).name===t.name)return i}function Ui(r,t){const e={},i={},n={};return Object.keys(r).forEach(s=>{s.startsWith("on")?e[a.Strings.pascal2kebab(s.substring(2))]=r[s]:i[s]=r[s]}),t&&Object.keys(t).forEach(s=>{s.startsWith("on")&&(n[a.Strings.pascal2kebab(s.substring(2))]=t[s])}),{binds:i,listeners:e,listenerProps:n}}function J(r,t){return v.computed(()=>Ui(r,t))}function x(){return Function}const mn=()=>{let r,t;function e(n){console.log(n),r=n&&n.type,t=Date.now()}function i(n){((n&&n.type)!==r||Date.now()-(t??0)>1e3)&&e(n)}return{eventLog:e,eventLogLess:i}},Ct="$map",me="onCreate",fe="onDestroy",$=v.defineComponent({inject:[Ct],mounted(){Se(this,me)},beforeUnmount(){Se(this,fe)},methods:{recreate(){Se(this,fe),Se(this,me)}},render(){return Ie()}}),fn=v.defineComponent({name:"tg-map",provide(){return{[Ct]:v.computed(()=>this.map)}},inheritAttrs:!1,props:{type:j(U,U.google),center:G(w),centerSyncDelay:M(Number,300),currentCenter:M(w),lastCenter:M(w),zoom:G(Number),infoWindowMode:ji(Di),gestureHandling:j(X),minZoom:M(Number),maxZoom:M(Number),mapStyle:M(Object),mapTypeId:j(At),mapType:M(Object),hideLogo:M(Boolean),onLoad:x(),"onUpdate:center":x(),"onUpdate:current-center":x(),"onUpdate:last-center":x(),"onUpdate:map-type":x(),"onUpdate:map-type-id":x(),"onUpdate:zoom":x(),onError:x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),centerSyncTimeoutId:void 0}},data(){return{map:Ne(),isDestroyed:!1}},computed:{propsJson(){return a.Objects.toJsonSafely(this.$props)}},watch:{gestureHandling(r){var t;r&&((t=this.map)==null||t.setGestureHandling(r))},minZoom(r){var t;(t=this.map)==null||t.setMinZoom(r)},maxZoom(r){var t;(t=this.map)==null||t.setMaxZoom(r)},mapStyle(r){var t;(t=this.map)==null||t.setMapStyle(r)},mapTypeId(r){var t;r&&((t=this.map)==null||t.setBuildInMapTypeId(r))},mapType(r){var t;(t=this.map)==null||t.setMapType(r??a.MapType.NORMAL)}},async mounted(){const r=this.type;try{await Hi(r)}catch(n){this.$emit("error",n);return}if(this.isDestroyed){console.warn(`tg-map(type=${r})已销毁, 不需要继续执行`);return}const t=a.TgMapFactory.createMap(r,this.$refs.map,{center:this.center,zoom:this.zoom,infoWindowMode:this.infoWindowMode,gestureHandling:this.gestureHandling,minZoom:this.minZoom,maxZoom:this.maxZoom,mapStyle:this.mapStyle,buildInMapTypeId:this.mapTypeId});if(this.map=v.markRaw(t),this.mapType&&t.setMapType(this.mapType),"ready"in this.attrs.listeners&&console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"),D(this.attrs.listeners,t,["load"]),this.$emit("load",t),v.watch([()=>this.zoom,()=>this.center],([n,s],[l,d])=>{n!==l&&t.setZoom(n),s!==d&&(t.getCenter().equals(s)||t.setCenter(s))}),"update:center"in this.attrs.listenerProps){const n=()=>this.$emit("update:center",t.getCenter());t.addEventListener("center-changed",()=>{this.centerSyncDelay>0?(clearTimeout(this.centerSyncTimeoutId),this.centerSyncTimeoutId=setTimeout(n,this.centerSyncDelay)):n()})}"update:current-center"in this.attrs.listenerProps&&(this.$emit("update:current-center",this.center),t.addEventListener("center-changed",()=>{this.$emit("update:current-center",t.getCenter())})),"update:zoom"in this.attrs.listenerProps&&t.addEventListener("zoom-changed",()=>{this.$emit("update:zoom",t.getZoom())});const e="update:map-type"in this.attrs.listenerProps,i="update:map-type-id"in this.attrs.listenerProps;(e||i)&&t.addEventListener("map-type-changed",()=>{const n=t.getMapType();e&&this.$emit("update:map-type",n),i&&this.$emit("update:map-type-id",n.id)})},unmounted(){this.isDestroyed=!0,this.map&&("update:last-center"in this.attrs.listenerProps&&this.$emit("update:last-center",this.map.getCenter()),"update:center"in this.attrs.listenerProps&&(clearTimeout(this.centerSyncTimeoutId),this.$emit("update:center",this.map.getCenter())))},methods:{}}),Fn="",Q=(r,t)=>{const e=r.__vccOpts||r;for(const[i,n]of t)e[i]=n;return e};function yn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",v.mergeProps({class:"tg-map"},r.attrs.binds),[v.createElementVNode("div",{ref:"map",class:v.normalizeClass({"tg-map__map":!0,[`tg-map__map--hide-logo-${r.type}`]:r.hideLogo})},null,2),v.createCommentVNode("",!0),r.map?v.renderSlot(r.$slots,"default",{key:1}):v.createCommentVNode("",!0),v.renderSlot(r.$slots,"overlay")],16)}const ye=Q(fn,[["render",yn]]);function vn(r){if(r==null)return;let t;if(typeof r=="string"){if(t=+r,Number.isNaN(t))return r}else t=r;return`${t}px`}const _n=v.defineComponent({name:"tg-map-widget",props:{left:{type:[Number,String],default:null},top:{type:[Number,String],default:null},right:{type:[Number,String],default:null},bottom:{type:[Number,String],default:null}},computed:{topValue(){return this.top==null&&this.bottom==null?0:this.top}},methods:{dimen:vn}}),Un="";function bn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(r.$options.name),style:v.normalizeStyle({left:r.dimen(r.left),top:r.dimen(r.topValue),right:r.dimen(r.right),bottom:r.dimen(r.bottom)})},[v.renderSlot(r.$slots,"default")],6)}const qi=Q(_n,[["render",bn]]),Mn=v.defineComponent({name:"tg-custom-control",mixins:[$],props:{position:j(k,k.RIGHT_BOTTOM)},setup(){return{control:void 0}},watch:{position(){this.recreate()}},onCreate(){It(this.$parent,ye)||console.warn("请将tg-custom-control放到tg-map中");const{$el:r}=this,t=class extends oi{onCreateElement(){return r}};this.control=new t(this.position),this.$map.addCustomControl(this.control)},onDestroy(){this.$map.removeCustomControl(this.control)}}),qn="";function Tn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(r.$options.name)},[v.renderSlot(r.$slots,"default")],2)}const Yi=Q(Mn,[["render",Tn]]),Ki=v.defineComponent({name:"tg-map-type-control",mixins:[$],props:{position:j(k,k.TOP_LEFT),type:j(Rt),mapTypes:M(Array)},setup(){return{control:void 0}},watch:{position(r){this.control.setPosition(r)},type(){this.recreate()},mapTypes:{handler(){this.recreate()},deep:!0}},onCreate(){this.control=this.$map.createMapTypeControl(this),this.$map.addControl(this.control)},onDestroy(){this.$map.removeControl(this.control)}}),Xi=v.defineComponent({name:"tg-scale-control",mixins:[$],props:{position:j(k,k.BOTTOM_RIGHT)},setup(){return{control:void 0}},watch:{position(r){this.control.setPosition(r)}},onCreate(){this.control=this.$map.createScaleControl(this),this.$map.addControl(this.control)},onDestroy(){this.$map.removeControl(this.control)}});function Ji(){var e;const r=(e=v.getCurrentInstance())==null?void 0:e.type;let t=(r==null?void 0:r.name)??(r==null?void 0:r.__name);if(!t){const i=r==null?void 0:r.__file;i&&(t=Gi.basename(i,".vue"))}return t}function Ot(){const r=v.inject(Ct);let t,e;return r==null&&I(`<${Ji()||"unknown"}>必须作为<tg-map>的子代组件`),{mapRef:r,get map(){return r.value??I("map尚未初始化")},[me](i){v.onMounted(i),t&&I(`${me}只能调用一次`),t=i},[fe](i){v.onBeforeUnmount(i),e&&I(`${fe}只能调用一次`),e=i},recreate(){e==null||e(),t==null||t()}}}const Qi=v.defineComponent({name:"tg-street-view-control",props:{position:j(k,k.RIGHT_BOTTOM)},setup(r){let t=void 0;const{map:e,onCreate:i,onDestroy:n}=Ot();return i(()=>{t=e.createStreetViewControl(r),e.addControl(t)}),n(()=>{e.removeControl(t)}),v.watch(()=>r.position,s=>{t.setPosition(s)}),Ie}}),er=v.defineComponent({name:"tg-zoom-control",props:{position:j(k,k.RIGHT_BOTTOM)},setup(r){let t=void 0;const{map:e,onCreate:i,onDestroy:n}=Ot();return i(()=>{t=e.createZoomControl(r),e.addControl(t)}),n(()=>{e.removeControl(t)}),v.watch(()=>r.position,s=>{t.setPosition(s)}),Ie}}),tr=v.defineComponent({name:"tg-heatmap",props:{maxIntensity:M(Number),gradient:M(Object),opacity:M(Number),radius:M(Number),data:G(Array)},setup(r){const{map:t,onCreate:e,onDestroy:i}=Ot();let n=void 0;return e(()=>{n=t.createHeatmap(r)}),i(()=>{n.remove()}),v.watch(()=>r.data,s=>n.setData(s)),v.watch([()=>r.maxIntensity,()=>r.gradient,()=>r.opacity,()=>r.radius],()=>n.setOptions(r)),Ie}}),Cn=v.defineComponent({name:"tg-marker-clusterer",mixins:[$],props:{gridSize:M(Number),maxZoom:M(Number),minClusterSize:M(Number),averageCenter:M(Boolean),styles:M(Array),stylesIndexCalculator:M(Function),zIndex:M(Number)},setup(){return{clusterer:void 0,markers:[]}},watch:{gridSize(){this.recreate()},maxZoom(){this.recreate()},minClusterSize(){this.recreate()},averageCenter(){this.recreate()},styles:{handler(){this.recreate()},deep:!0},stylesIndexCalculator(){this.recreate()},zIndex(){this.recreate()}},onCreate(){this.clusterer=this.$map.createMarkerClusterer(this)},onDestroy(){this.clusterer.clearMarkers()},methods:{isInitiated(){return this.clusterer!=null},onAddMarker(r){this.markers.push(r),this.isInitiated()&&this.clusterer.addMarker(r)},onRemoveMarker(r){this.isInitiated()&&this.clusterer.removeMarker(r),a.Arrays.remove(this.markers,r)}}});function On(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(r.$options.name)},[v.renderSlot(r.$slots,"default")],2)}const Kt=Q(Cn,[["render",On]]),ir=v.defineComponent({name:"tg-traffic-layer",mixins:[$],setup(){return{layer:void 0}},watch:{},onCreate(){this.layer=new li,this.$map.addLayer(this.layer)},onDestroy(){this.$map.removeLayer(this.layer)}}),rr=v.defineComponent({name:"tg-circle",mixins:[$],inheritAttrs:!1,props:{center:G(w),radius:G(Number),clickable:M(Boolean),editable:M(Boolean),strokeColor:M(String),strokeOpacity:M(Number),strokeWeight:M(Number),visible:M(Boolean),fillColor:M(String),fillOpacity:M(Number),"onUpdate:center":x(),"onUpdate:radius":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0,emittedRadius:void 0,emittedCenter:void 0}},watch:{center(r){if(this.emittedCenter!=null){const t=this.emittedCenter;if(this.emittedCenter=void 0,t===v.toRaw(r))return}this.overlay.setCenter(r)},radius(r){if(this.emittedRadius!=null){const t=this.emittedRadius;if(this.emittedRadius=void 0,t===r)return}this.overlay.setRadius(r)},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createCircle(this),this.$map.addOverlay(this.overlay),D(this.attrs.listeners,this.overlay),"update:center"in this.attrs.listenerProps&&this.overlay.addEventListener("center-changed",()=>{this.$emit("update:center",this.emittedCenter=this.overlay.getCenter())}),"update:radius"in this.attrs.listenerProps&&this.overlay.addEventListener("radius-changed",()=>{this.$emit("update:radius",this.emittedRadius=this.overlay.getRadius())})},onDestroy(){this.$map.removeOverlay(this.overlay)}});class wn extends Ni{constructor(t,e,i,n){super(t,e),this.content=i,this.position=n}onCreate(){return this.content}onDraw(t){const e=t.fromLatLngToOverlayPoint(this.position);this.content.style.left=e.x+"px",this.content.style.top=e.y+"px"}setPosition(t){this.position=t,this.draw()}}const En=v.defineComponent({name:"tg-element-overlay",mixins:[$],props:{mapPane:j(ue,ue.overlayMouseTarget),position:G(w)},setup(){return{overlay:void 0}},watch:{position(r){this.overlay.setPosition(r)},mapPane(){this.recreate()}},methods:{content(){return this.$el}},onCreate(){this.overlay=new wn(this.$map,this,this.content(),this.position),this.$map.addElementOverlay(this.overlay)},onDestroy(){this.$map.removeElementOverlay(this.overlay)}}),Yn="";function Pn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",v.mergeProps({class:r.$options.name},r.$attrs),[v.renderSlot(r.$slots,"default")],16)}const nr=Q(En,[["render",Pn]]),Ln=v.defineComponent({name:"tg-marker",mixins:[$],inheritAttrs:!1,props:{position:G(w),title:M(String),icon:M(Object),clickable:M(Boolean),draggable:M(Boolean),crossOnDrag:M(Boolean),cursor:M(String),zIndex:M(Number),visible:M(Boolean),normalizePositionForBaidu:M(Boolean),autoAddToClusterer:M(Boolean,!0),"onUpdate:position":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),marker:void 0,label:Ne(),info:Ne(),emittedPosition:void 0,autoAddToClustererWhenCreate:r.autoAddToClusterer}},watch:{position(r){if(this.emittedPosition!=null){const t=this.emittedPosition;if(this.emittedPosition=void 0,t===v.toRaw(r))return}this.marker.setPosition(r)},title(r){this.marker.setTitle(r)},icon(r){r?this.marker.setIcon(r):this.recreate()},clickable(r){this.marker instanceof ge?this.recreate():this.marker.setClickable(r)},draggable(r){this.marker.setDraggable(r)},crossOnDrag(){this.recreate()},cursor(){this.recreate()},zIndex(r){this.marker instanceof ge?this.recreate():this.marker.setZIndex(r)},visible(r){this.marker.setVisible(r)},normalizePositionForBaidu(){this.recreate()},autoAddToClusterer(){this.recreate()}},onCreate(){this.marker=this.$map.createMarker(this),this.label&&this.marker.setLabel(this.label.overlay),this.$clusterer()&&this.autoAddToClusterer?this.$clusterer().onAddMarker(this.marker):this.$map.addOverlay(this.marker),this.autoAddToClustererWhenCreate=this.autoAddToClusterer,this.info&&this.info.show&&this.info.overlay.open(this.marker),D(this.attrs.listeners,this.marker),"update:position"in this.attrs.listenerProps&&this.marker.addEventListener("dragend",r=>{this.$emit("update:position",this.emittedPosition=r.position)})},onDestroy(){this.$clusterer()&&this.autoAddToClustererWhenCreate?this.$clusterer().onRemoveMarker(this.marker):this.$map.removeOverlay(this.marker)},methods:{$clusterer(){return It(this.$parent,Kt)},onAddLabel(r){this.label=r,this.marker&&this.marker.setLabel(r.overlay)},onRemoveLabel(r){this.marker.setLabel(void 0),this.label=void 0},onAddInfo(r){this.info=r,this.marker&&r.show&&r.overlay.open(this.marker)},onRemoveInfo(r){r.overlay.close(),this.info=void 0},onInfoShowChanged(r,t){t?r.overlay.open(this.marker):r.overlay.close()}}});function Bn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",v.mergeProps({class:r.$options.name},r.attrs.binds),[v.renderSlot(r.$slots,"default")],16)}const ke=Q(Ln,[["render",Bn]]),In=v.defineComponent({name:"tg-info-box",mixins:[$],inheritAttrs:!1,props:{show:G(Boolean),position:M(w),offset:M(Object),maxWidth:M(Number),borderClass:M(String),zIndex:M(Number),"onUpdate:show":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0}},watch:{show(r){this.$marker()?this.$marker().onInfoShowChanged(this,r):r?this.overlay.open():this.overlay.close()},position(r){this.overlay.setPosition(r)},offset(){this.recreate()},maxWidth(r){this.overlay.setMaxWidth(r)},borderClass(){this.recreate()},zIndex(r){this.overlay.setZIndex(r)}},onCreate(){this.overlay=this.$map.createInfoBox(this.getOptions()),this.$marker()?this.$marker().onAddInfo(this):this.show&&this.overlay.open(),"update:show"in this.attrs.listenerProps&&this.overlay.addEventListener("closeclick",()=>{this.$emit("update:show",!1)}),D(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveInfo(this):this.overlay.close()},methods:{getOptions(){return{content:this.content(),position:this.position,offset:this.offset,zIndex:this.zIndex,maxWidth:this.maxWidth,borderClass:this.borderClass}},content(){return this.$el},$marker(){return We(ke,this.$parent,ye)},open(r){this.overlay.open(r)},close(){this.overlay.close()}}}),Kn="";function Sn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",v.mergeProps({class:r.$options.name},r.attrs.binds),[v.renderSlot(r.$slots,"default")],16)}const sr=Q(In,[["render",Sn]]),kn=v.defineComponent({name:"tg-info-window",mixins:[$],inheritAttrs:!1,props:{show:G(Boolean),position:M(w),maxWidth:M(Number),offset:M(Object),disableAutoPan:M(Boolean),"onUpdate:show":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0}},watch:{show(r){this.$marker()?this.$marker().onInfoShowChanged(this,r):r?this.overlay.open():this.overlay.close()},position(r){this.overlay.setPosition(r)},maxWidth(){this.recreate()},offset(){this.recreate()},disableAutoPan(){this.recreate()}},methods:{content(){return this.$el},$marker(){return We(ke,this.$parent,ye)},getOptions(){return{content:this.content(),position:this.position,maxWidth:this.maxWidth,offset:this.offset,disableAutoPan:this.disableAutoPan}}},onCreate(){this.overlay=this.$map.createInfoWindow(this.getOptions()),this.$marker()?this.$marker().onAddInfo(this):this.show&&this.overlay.open(),this.overlay.addEventListener("open",()=>{this.$emit("update:show",!0)}),this.overlay.addEventListener("close",()=>{this.$emit("update:show",!1)}),D(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveInfo(this):this.overlay.close()}});function xn(r,t,e,i,n,s){return v.withDirectives((v.openBlock(),v.createElementBlock("div",v.mergeProps({class:r.$options.name},r.attrs.binds),[v.renderSlot(r.$slots,"default")],16)),[[v.vShow,r.show]])}const or=Q(kn,[["render",xn]]),An=v.defineComponent({name:"tg-label",mixins:[$],inheritAttrs:!1,props:{position:M(w),offset:M(Object),zIndex:M(Number),mapPane:j(ue)},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t),overlay:void 0}},watch:{position(r){this.overlay.setPosition(r)},offset(r){this.overlay.setOffset(r)},zIndex(r){this.overlay.setZIndex(r)},visible(r){this.overlay.setVisible(r)},mapPane(){this.recreate()}},methods:{content(){return this.$el},marker(){var r;return(r=this.$marker())==null?void 0:r.marker},$marker(){return We(ke,this.$parent,ye)},getOptions(){return{content:this.content(),position:this.position,offset:this.offset,zIndex:this.zIndex,mapPane:this.mapPane}}},onCreate(){this.overlay=this.$map.createLabel(this.getOptions()),this.$marker()?this.$marker().onAddLabel(this):this.$map.addOverlay(this.overlay),D(this.attrs.listeners,this.overlay)},onDestroy(){this.$marker()?this.$marker().onRemoveLabel(this):this.$map.removeOverlay(this.overlay)}}),Xn="";function Rn(r,t,e,i,n,s){return v.openBlock(),v.createElementBlock("div",v.mergeProps({class:r.$options.name},r.attrs.binds),[v.renderSlot(r.$slots,"default")],16)}const ar=Q(An,[["render",Rn]]),lr=v.defineComponent({name:"tg-polygon",mixins:[$],inheritAttrs:!1,props:{paths:G(Array),clickable:M(Boolean),editable:M(Boolean),strokeColor:M(String),strokeOpacity:M(Number),strokeWeight:M(Number),visible:M(Boolean),fillColor:M(String),fillOpacity:M(Number),"onUpdate:paths":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0,emittedPaths:void 0}},watch:{paths:{handler(r){if(this.emittedPaths!=null){const t=this.emittedPaths;if(this.emittedPaths=void 0,t.length===r.length&&t.every((e,i)=>e===v.toRaw(r[i])))return}this.overlay.setPaths(r)},deep:!0},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createPolygon(this),this.$map.addOverlay(this.overlay),D(this.attrs.listeners,this.overlay),"update:paths"in this.attrs.listenerProps&&this.overlay.addEventListener("paths-edited",()=>{this.$emit("update:paths",this.emittedPaths=this.overlay.getPaths())})},onDestroy(){this.$map.removeOverlay(this.overlay)}}),hr=v.defineComponent({name:"tg-polyline",mixins:[$],inheritAttrs:!1,props:{path:G(Array),icons:M(Array),clickable:M(Boolean),editable:M(Boolean),strokeColor:M(String),strokeOpacity:M(Number),strokeWeight:M(Number),visible:M(Boolean),"onUpdate:path":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0,emittedPath:void 0}},watch:{path:{handler(r){if(this.emittedPath!=null){const t=this.emittedPath;if(this.emittedPath=void 0,t===v.toRaw(r))return}this.overlay.setPath(r)},deep:!0},icons:{handler(){this.recreate()},deep:!0},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createPolyline(this),this.$map.addOverlay(this.overlay),D(this.attrs.listeners,this.overlay),"update:path"in this.attrs.listenerProps&&this.overlay.addEventListener("path-edited",()=>{this.$emit("update:path",this.emittedPath=this.overlay.getPath())})},onDestroy(){this.overlay.remove()}}),cr=v.defineComponent({name:"tg-rectangle",mixins:[$],inheritAttrs:!1,props:{bounds:G(Object),clickable:M(Boolean),editable:M(Boolean),strokeColor:M(String),strokeOpacity:M(Number),strokeWeight:M(Number),visible:M(Boolean),fillColor:M(String),fillOpacity:M(Number),"onUpdate:bounds":x()},emits:void 0,setup(r,{attrs:t}){return{attrs:J(t,r),overlay:void 0,emittedBounds:void 0}},watch:{bounds(r){if(this.emittedBounds!=null){const t=this.emittedBounds;if(this.emittedBounds=void 0,t.equals(r))return}this.overlay.setBounds(r)},clickable(){this.recreate()},editable(r){this.overlay.setEditable(r)},strokeColor(r){this.overlay.setStrokeColor(r)},strokeOpacity(r){this.overlay.setStrokeOpacity(r)},strokeWeight(r){this.overlay.setStrokeWeight(r)},fillColor(r){this.overlay.setFillColor(r)},fillOpacity(r){this.overlay.setFillOpacity(r)},visible(r){this.overlay.setVisible(r)}},onCreate(){this.overlay=this.$map.createRectangle(this),this.$map.addOverlay(this.overlay),D(this.attrs.listeners,this.overlay),"update:bounds"in this.attrs.listenerProps&&this.overlay.addEventListener("bounds-changed",()=>{this.$emit("update:bounds",this.emittedBounds=this.overlay.getBounds())})},onDestroy(){this.$map.removeOverlay(this.overlay)}}),Dn=["beforeUpdate","updated"],$n={install(r,t={}){if(t.enable!==!1){const e=v.defineComponent({beforeCreate(){const i=Ji()??"",s=(t.nameRegex||/^[A-Z]/).test(i)?l=>{t.hookNames?t.hookNames.includes(l)&&console.debug("[lifecycle]",i,l):Dn.includes(l)||console.debug("[lifecycle]",i,l)}:le;s("beforeCreate"),this.__life_impl=s},created(){this.__life("created")},beforeMount(){this.__life("beforeMount")},mounted(){this.__life("mounted")},beforeUpdate(){this.__life("beforeUpdate")},updated(){this.__life("updated")},beforeUnmount(){this.__life("beforeUnmount")},unmounted(){this.__life("unmounted")},methods:{__life(i){this.__life_impl(i)}},onCreate(){this.__life("onCreate")},onDestroy(){this.__life("onDestroy")}});r.mixin(e)}}},zn=6378137;function xe(r){return r*Math.PI/180}function dr(r){return r*180/Math.PI}function Gn(r,t){if(r.lat===t.lat&&r.lng===t.lng)return 0;const e=xe((r.lat+t.lat)/2),i=xe((r.lat-t.lat)/2),n=xe((r.lng-t.lng)/2);let s=Math.sin(i),l=Math.sin(n),d=Math.sin(e);const o=zn,h=1/298.257;s=s*s,l=l*l,d=d*d;const u=s*(1-l)+(1-d)*l,f=(1-s)*(1-l)+d*l,m=Math.atan(Math.sqrt(u/f)),_=Math.sqrt(u*f)/m,T=2*m*o,b=(3*_-1)/2/f,g=(3*_+1)/2/u;return T*(1+h*(b*d*(1-s)-g*(1-d)*s))}function ur(r,t,e){const n=63567523142e-4,s=1/298.257223563,l=xe(t),d=Math.sin(l),o=Math.cos(l),h=(1-s)*Math.tan(xe(r.lat)),u=1/Math.sqrt(1+h*h),f=h*u,m=Math.atan2(h,o),_=u*d,T=1-_*_,b=T*(6378137*6378137-n*n)/(n*n),g=1+b/16384*(4096+b*(-768+b*(320-175*b))),c=b/1024*(256+b*(-128+b*(74-47*b)));let y=0,O=0,C=0,E=e/(n*g),P=2*Math.PI;for(;Math.abs(E-P)>1e-12;){y=Math.cos(2*m+E),O=Math.sin(E),C=Math.cos(E);const Y=c*O*(y+c/4*(C*(-1+2*y*y)-c/6*y*(-3+4*O*O)*(-3+4*y*y)));P=E,E=e/(n*g)+Y}const B=f*O-u*C*o,z=Math.atan2(f*C+u*O*o,(1-s)*Math.sqrt(_*_+B*B)),q=Math.atan2(O*d,u*C-f*O*o),S=s/16*T*(4+s*(4-3*T)),ee=q-(1-S)*s*_*(E+S*O*(y+S*C*(-1+2*y*y)));return{lng:r.lng+dr(ee),lat:dr(z)}}const Nn={getDistance:Gn,getDestination:ur},Zn={install(r,t){if(Wi(t),{}.VITE_FALSE){const i=Object.assign({"./TgMap.vue":ye,"./TgMapWidget.vue":qi,"./controls/TgCustomControl.vue":Yi,"./controls/TgMapTypeControl.vue":Ki,"./controls/TgScaleControl.vue":Xi,"./controls/TgStreetViewControl.vue":Qi,"./controls/TgZoomControl.vue":er,"./extra/TgHeatmap.vue":tr,"./extra/TgMarkerClusterer.vue":Kt,"./layers/TgTrafficLayer.vue":ir,"./overlays/TgCircle.vue":rr,"./overlays/TgElementOverlay.vue":nr,"./overlays/TgInfoBox.vue":sr,"./overlays/TgInfoWindow.vue":or,"./overlays/TgLabel.vue":ar,"./overlays/TgMarker.vue":ke,"./overlays/TgPolygon.vue":lr,"./overlays/TgPolyline.vue":hr,"./overlays/TgRectangle.vue":cr});Object.keys(i).forEach(n=>{const s=i[n];r.component(s.name??I(`Tg开头的组件必须设置name: ${n}`),s)})}const e=r.config.optionMergeStrategies;e[me]=e[fe]=(i,n)=>i?[...new Set([].concat(i,n))]:Array.isArray(n)?n:[n]}};a.AbstractControl=je,a.AbstractMap=nt,a.Autocomplete=Dt,a.BaiduAutocomplete=pi,a.BaiduCircle=at,a.BaiduControl=Fe,a.BaiduHeatmap=yi,a.BaiduInfoBoxOverlay=ut,a.BaiduInfoWindow=ct,a.BaiduMapTypeControl=Ue,a.BaiduMapUrls=Ce,a.BaiduMarker=ge,a.BaiduMarkerClusterer=Ci,a.BaiduOverlay=we,a.BaiduPlacesService=Ei,a.BaiduPolyShape=mt,a.BaiduPolygon=vt,a.BaiduPolyline=ft,a.BaiduRectangle=bt,a.BaiduScaleControl=qe,a.BaiduSearchBox=Li,a.BaiduStreetViewControl=Ke,a.BaiduZoomControl=Je,a.BuildInMapType=W,a.BuildInMapTypeId=At,a.CachedValue=ce,a.ControlPosition=k,a.CoordType=R,a.CustomControl=oi,a.ElementOverlay=Ni,a.EmptyControl=ai,a.FastFindValues=si,a.GestureHandlingOptions=X,a.GoogleAutocomplete=ui,a.GoogleCircle=lt,a.GoogleControl=_e,a.GoogleHeatmap=fi,a.GoogleInfoBoxOverlay=pt,a.GoogleInfoWindow=dt,a.GoogleMapTypeControl=be,a.GoogleMapUrls=Te,a.GoogleMarker=gt,a.GoogleMarkerClusterer=Oi,a.GoogleOverlay=st,a.GooglePlacesService=wi,a.GooglePolygon=_t,a.GooglePolyline=yt,a.GoogleRectangle=Mt,a.GoogleScaleControl=Ye,a.GoogleSearchBox=Pi,a.GoogleStreetViewControl=Xe,a.GoogleZoomControl=Qe,a.Heatmap=$t,a.ImageMapType=Er,a.InfoWindow=ht,a.InfoWindowModeValues=Di,a.KeyValue=xt,a.LatLng=w,a.LatLngBounds=Z,a.LifecycleLogPlugin=$n,a.MIXIN_HOOK_CREATE=me,a.MIXIN_HOOK_DESTROY=fe,a.MIXIN_MAP_NAME=Ct,a.MapMixin=$,a.MapPane=ue,a.MapTypeControlType=Rt,a.MapUrls=zt,a.MapZoom=Bi,a.MarkerClusterer=Zt,a.Overlay=Vt,a.PlacesService=Wt,a.SearchBox=Ht,a.SphericalUtils=Nn,a.SymbolPath=tn,a.TgCircle=rr,a.TgCustomControl=Yi,a.TgElementOverlay=nr,a.TgHeatmap=tr,a.TgInfoBox=sr,a.TgInfoWindow=or,a.TgLabel=ar,a.TgMap=ye,a.TgMapType=U,a.TgMapTypeControl=Ki,a.TgMapWidget=qi,a.TgMarker=ke,a.TgMarkerClusterer=Kt,a.TgPolygon=lr,a.TgPolyline=hr,a.TgRectangle=cr,a.TgScaleControl=Xi,a.TgStreetViewControl=Qi,a.TgTrafficLayer=ir,a.TgZoomControl=er,a.TrafficLayer=li,a.UnionIcon=Ee,a.assert=re,a.assertNever=Ge,a.callHook=Se,a.computedSaveOnThis=dn,a.createAsyncSingleton=ei,a.createEmptyVNode=Ie,a.createPropertyObject=Fi,a.createPropertyObjectTyped=un,a.debug=Tr,a.default=Zn,a.eventProp=x,a.extractVNodeFromSlotsByComponent=gn,a.findAncestorComponentByType=We,a.findByComponentType=pn,a.getDestination=ur,a.getTgMapConfig=Yt,a.isComponentByType=Ze,a.isDef=Cr,a.isEntryValueDef=Qt,a.isInstanceOf=vr,a.lateinit=yr,a.loadCachedMap=Hi,a.noop=le,a.optionalProp=M,a.path=Gi,a.requiredProp=G,a.safeAs=_r,a.safeAsComponent=It,a.setTgMapConfig=Wi,a.splitAttrs=Ui,a.stringEnumProp=j,a.stringUnionPropFromValues=ji,a.throwError=I,a.throwUnsupported=He,a.todo=Mr,a.typed=Ne,a.unwrapStringEnumValue=br,a.useEventLogMethods=mn,a.useSplittedAttrs=J,a.useTgMapInner=Ot,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
18
18
  //# sourceMappingURL=tg-map.umd.cjs.map