FastBee/docker/data/nginx/vue/static/js/chunk-01bfc955.15000c40.js

1 line
17 KiB
JavaScript
Raw Normal View History

2025-07-07 09:21:15 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01bfc955"],{a00a:function(t,e,a){"use strict";a.r(e),a.d(e,"version",(function(){return d}));var n,i=a("313e");function r(t,e){this._bmap=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=e,this._projection=new BMap.MercatorProjection}function o(t,e){return e=e||[0,0],i["util"].map([0,1],(function(a){var n=e[a],i=t[a]/2,r=[],o=[];return r[a]=n-i,o[a]=n+i,r[1-a]=o[1-a]=e[1-a],Math.abs(this.dataToPoint(r)[a]-this.dataToPoint(o)[a])}),this)}function s(){function t(t){this._root=t}return t.prototype=new BMap.Overlay,t.prototype.initialize=function(t){return t.getPanes().labelPane.appendChild(this._root),this._root},t.prototype.draw=function(){},t}r.prototype.type="bmap",r.prototype.dimensions=["lng","lat"],r.prototype.setZoom=function(t){this._zoom=t},r.prototype.setCenter=function(t){this._center=this._projection.lngLatToPoint(new BMap.Point(t[0],t[1]))},r.prototype.setMapOffset=function(t){this._mapOffset=t},r.prototype.getBMap=function(){return this._bmap},r.prototype.dataToPoint=function(t){var e=new BMap.Point(t[0],t[1]),a=this._bmap.pointToOverlayPixel(e),n=this._mapOffset;return[a.x-n[0],a.y-n[1]]},r.prototype.pointToData=function(t){var e=this._mapOffset;return t=this._bmap.overlayPixelToPoint({x:t[0]+e[0],y:t[1]+e[1]}),[t.lng,t.lat]},r.prototype.getViewRect=function(){var t=this._api;return new i["graphic"].BoundingRect(0,0,t.getWidth(),t.getHeight())},r.prototype.getRoamTransform=function(){return i["matrix"].create()},r.prototype.prepareCustoms=function(){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:i["util"].bind(this.dataToPoint,this),size:i["util"].bind(o,this)}}},r.prototype.convertToPixel=function(t,e,a){return this.dataToPoint(a)},r.prototype.convertFromPixel=function(t,e,a){return this.pointToData(a)},r.dimensions=r.prototype.dimensions,r.create=function(t,e){var a,o=e.getDom();return t.eachComponent("bmap",(function(t){var l,u=e.getZr().painter,p=u.getViewportRoot();if("undefined"===typeof BMap)throw new Error("BMap api is not loaded");if(n=n||s(),a)throw new Error("Only one bmap component can exist");if(!t.__bmap){var d=o.querySelector(".ec-extension-bmap");d&&(p.style.left="0px",p.style.top="0px",o.removeChild(d)),d=document.createElement("div"),d.className="ec-extension-bmap",d.style.cssText="position:absolute;width:100%;height:100%",o.appendChild(d);var h=t.get("mapOptions");h&&(h=i["util"].clone(h),delete h.mapType),l=t.__bmap=new BMap.Map(d,h);var c=new n(p);l.addOverlay(c),u.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}}l=t.__bmap;var m=t.get("center"),f=t.get("zoom");if(m&&f){var v=l.getCenter(),g=l.getZoom(),y=t.centerOrZoomChanged([v.lng,v.lat],g);if(y){var w=new BMap.Point(m[0],m[1]);l.centerAndZoom(w,f)}}a=new r(l,e),a.setMapOffset(t.__mapOffset||[0,0]),a.setZoom(f),a.setCenter(m),t.coordinateSystem=a})),t.eachSeries((function(t){"bmap"===t.get("coordinateSystem")&&(t.coordinateSystem=a)})),a&&[a]};var l=r;function u(t,e){return t&&e&&t[0]===e[0]&&t[1]===e[1]}i["extendComponentModel"]({type:"bmap",getBMap:function(){return this.__bmap},setCenterAndZoom:function(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged:function(t,e){var a=this.option;return!(u(t,a.center)&&e===a.zoom)},defaultOption:{center:[104.114129,37.550339],zoom:5,mapStyle:{},mapStyleV2:{},mapOptions:{},roam:!1}});function p(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}i["extendComponentView"]({type:"bmap",render:function(t,e,a){var n=!0,r=t.getBMap(),o=a.getZr().painter.getViewportRoot(),s=t.coordinateSystem,l=function(e,i){if(!n){var r=o.parentNode.parentNode.parentNode,l=[-parseInt(r.style.left,10)||0,-parseInt(r.style.top,10)||0],u=o.style,p=l[0]+"px",d=l[1]+"px";u.left!==p&&(u.left=p),u.top!==d&&(u.top=d),s.setMapOffset(l),t.__mapOffset=l,a.dispatchAction({type:"bmapRoam",animation:{duration:0}})}};function u(){n||a.dispatchAction({type:"bmapRoam",animation:{duration:0}})}r.removeEventListener("moving",this._oldMoveHandler),r.removeEv